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
82f1b7a3
Commit
82f1b7a3
authored
Oct 12, 2022
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务 9900
parent
a7450979
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+12
-4
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
82f1b7a3
...
@@ -10,7 +10,9 @@ import com.yeejoin.amos.feign.systemctl.Systemctl;
...
@@ -10,7 +10,9 @@ import com.yeejoin.amos.feign.systemctl.Systemctl;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
com.yeejoin.equipmanage.common.entity.vo.*
;
import
com.yeejoin.equipmanage.common.entity.vo.*
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.fegin.SystemctlFeign
;
import
com.yeejoin.equipmanage.mapper.*
;
import
com.yeejoin.equipmanage.mapper.*
;
import
com.yeejoin.equipmanage.remote.RemoteSecurityService
;
import
com.yeejoin.equipmanage.service.*
;
import
com.yeejoin.equipmanage.service.*
;
import
org.apache.catalina.util.IOTools
;
import
org.apache.catalina.util.IOTools
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -98,6 +100,10 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -98,6 +100,10 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Autowired
@Autowired
IEquPropertyService
equPropertyService
;
IEquPropertyService
equPropertyService
;
@Autowired
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@Autowired
private
SystemctlFeign
systemctlFeign
;
@Autowired
@Lazy
@Lazy
IEquipmentSpecificIndexSerivce
equipmentSpecificIndexSerivce
;
IEquipmentSpecificIndexSerivce
equipmentSpecificIndexSerivce
;
@Autowired
@Autowired
...
@@ -1823,7 +1829,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -1823,7 +1829,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
equipSpecificScrap
.
forEach
(
e
->{
equipSpecificScrap
.
forEach
(
e
->{
try
{
try
{
int
year
=
e
.
get
(
"weExpiry"
)
!=
null
?
Integer
.
parseInt
(
e
.
get
(
"weExpiry"
).
toString
())
:
Integer
.
parseInt
(
e
.
get
(
"wesExpiry"
).
toString
());
int
year
=
e
.
get
(
"weExpiry"
)
!=
null
?
Integer
.
parseInt
(
e
.
get
(
"weExpiry"
).
toString
())
:
Integer
.
parseInt
(
e
.
get
(
"wesExpiry"
).
toString
());
Date
productDate
=
DateUtils
.
dateParse
(
e
.
get
(
"product"
).
toString
(),
DateUtils
.
DATE_TIME_PATTERN
);
Date
productDate
=
DateUtils
.
dateParse
(
e
.
get
(
"product"
).
toString
(),
"yyyy-MM-dd'T'HH:mm"
);
Calendar
calendar
=
Calendar
.
getInstance
();
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
productDate
);
calendar
.
setTime
(
productDate
);
calendar
.
add
(
Calendar
.
YEAR
,
year
);
calendar
.
add
(
Calendar
.
YEAR
,
year
);
...
@@ -1831,7 +1837,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -1831,7 +1837,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
Date
now
=
new
Date
();
Date
now
=
new
Date
();
String
scrapTime
=
new
SimpleDateFormat
(
DateUtils
.
DATE_TIME_PATTERN
).
format
(
calendar
.
getTime
());
String
scrapTime
=
new
SimpleDateFormat
(
DateUtils
.
DATE_TIME_PATTERN
).
format
(
calendar
.
getTime
());
int
i
=
0
;
int
i
=
-
1
;
while
(
now
.
after
(
calendar
.
getTime
()))
{
while
(
now
.
after
(
calendar
.
getTime
()))
{
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
1
);
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
1
);
i
++;
i
++;
...
@@ -1853,7 +1859,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -1853,7 +1859,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
model
.
setTitle
(
"报废到期提醒"
);
model
.
setTitle
(
"报废到期提醒"
);
String
equipName
=
map
.
get
(
"name"
).
toString
();
String
equipName
=
map
.
get
(
"name"
).
toString
();
String
location
=
map
.
get
(
"s
N
ame"
).
toString
()
+
map
.
get
(
"position"
).
toString
()
;
String
location
=
map
.
get
(
"s
n
ame"
).
toString
()
+
map
.
get
(
"position"
).
toString
()
;
String
body
=
String
.
format
(
"%s-%s于%s报废,请提前更换处理"
,
equipName
,
location
,
scrapTime
);
String
body
=
String
.
format
(
"%s-%s于%s报废,请提前更换处理"
,
equipName
,
location
,
scrapTime
);
String
join
=
String
.
format
(
"设备还剩%s天报废,请提前更换"
,
i
);
String
join
=
String
.
format
(
"设备还剩%s天报废,请提前更换"
,
i
);
...
@@ -1874,7 +1880,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -1874,7 +1880,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
ext
.
put
(
"time"
,
new
SimpleDateFormat
(
DateUtils
.
DATE_TIME_PATTERN
).
format
(
new
Date
()));
ext
.
put
(
"time"
,
new
SimpleDateFormat
(
DateUtils
.
DATE_TIME_PATTERN
).
format
(
new
Date
()));
model
.
setExtras
(
ext
);
model
.
setExtras
(
ext
);
model
.
setRecivers
(
receive
);
model
.
setRecivers
(
receive
);
Systemctl
.
messageClient
.
create
(
model
);
// Systemctl.messageClient.create(model);
Token
token
=
remoteSecurityService
.
getServerToken
();
systemctlFeign
.
create
(
token
.
getAppKey
(),
token
.
getProduct
(),
token
.
getToke
(),
model
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
...
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