Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AmosBankPatrolRoot
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
1
Merge Requests
1
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
bank
AmosBankPatrolRoot
Commits
95218239
Commit
95218239
authored
Jul 28, 2020
by
xinglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重做计划增加修改nextGenDate字段
parent
c2979340
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
87 additions
and
96 deletions
+87
-96
PlanTaskServiceImpl.java
...ol/service/business/service/impl/PlanTaskServiceImpl.java
+63
-91
Safety3DDataSendServiceImpl.java
...ce/business/service/impl/Safety3DDataSendServiceImpl.java
+0
-2
DateUtil.java
...a/com/yeejoin/amos/patrol/service/core/util/DateUtil.java
+24
-0
RemoteSecurityService.java
...oin/amos/patrol/service/remote/RemoteSecurityService.java
+0
-3
No files found.
AmosBankPatrolService/src/main/java/com/yeejoin/amos/patrol/service/business/service/impl/PlanTaskServiceImpl.java
View file @
95218239
...
...
@@ -17,6 +17,7 @@ import com.yeejoin.amos.patrol.common.entity.Plan;
import
com.yeejoin.amos.patrol.common.entity.PlanTask
;
import
com.yeejoin.amos.patrol.common.entity.PlanTaskDetail
;
import
com.yeejoin.amos.patrol.common.entity.UserModel
;
import
com.yeejoin.amos.patrol.common.enums.PlanTypeEnum
;
import
com.yeejoin.amos.patrol.service.business.bo.patrol.CheckChkExListBo
;
import
com.yeejoin.amos.patrol.service.business.bo.patrol.PointCheckDetailBo
;
import
com.yeejoin.amos.patrol.service.business.dao.mapper.PlanMapper
;
...
...
@@ -103,7 +104,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
private
RemoteSecurityService
remoteSecurityService
;
@Override
public
Page
<
HashMap
<
String
,
Object
>>
getPlanTaskInfo
(
String
toke
,
String
product
,
String
appKey
,
PlanTaskPageParam
params
)
{
public
Page
<
HashMap
<
String
,
Object
>>
getPlanTaskInfo
(
String
toke
,
String
product
,
String
appKey
,
PlanTaskPageParam
params
)
{
long
total
=
planTaskMapper
.
countPlanTask
(
params
);
List
<
HashMap
<
String
,
Object
>>
content
=
planTaskMapper
.
getPlanTaskInfo
(
params
);
...
...
@@ -122,31 +123,22 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
List
<
String
>
userList
=
new
ArrayList
<>(
set
);
List
<
String
>
deptList
=
new
ArrayList
<>(
deptIdSet
);
Map
<
String
,
String
>
deptMap
=
new
HashMap
<>();
Map
<
String
,
String
>
userMap
=
new
HashMap
<>();
if
(!
CollectionUtils
.
isEmpty
(
userList
))
{
userIds
=
String
.
join
(
","
,
userList
);
List
<
AgencyUserModel
>
userModelList
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
userIds
);
List
<
AgencyUserModel
>
userModelList
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
userIds
);
userMap
=
userModelList
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
AgencyUserModel:
:
getRealName
,
(
k1
,
k2
)
->
k2
));
}
if
(!
CollectionUtils
.
isEmpty
(
deptList
))
{
deptIds
=
String
.
join
(
","
,
deptList
);
List
<
LinkedHashMap
>
deptBoList
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
deptIds
);
List
<
LinkedHashMap
>
deptBoList
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
deptIds
);
for
(
int
i
=
0
;
i
<
deptBoList
.
size
();
i
++)
{
deptMap
.
put
(
deptBoList
.
get
(
i
).
get
(
"sequenceNbr"
).
toString
(),
deptBoList
.
get
(
i
).
get
(
"departmentName"
).
toString
());
}
// deptMap = deptBoList.stream().collect(Collectors.toMap(DepartmentModel::getSequenceNbr, DepartmentModel::getDepartmentName));
}
...
...
@@ -180,12 +172,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
if
(
plan
==
null
)
{
throw
new
YeeException
(
"计划不存在"
);
}
if
(
plan
.
getStatus
()==
1
){
if
(
plan
.
getStatus
()
==
1
)
{
throw
new
YeeException
(
"1"
);
}
//2.数据必输校验,不满足直接return,不再向下进行
Boolean
fileFlag
=
PlanTaskUtil
.
checkMustFile
(
plan
);
if
(!
fileFlag
)
{
...
...
@@ -198,8 +187,6 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
if
(
null
==
vo
)
{
//计划未开始,则结束
return
;
}
if
(!
vo
.
getIsGenData
())
{
//日期不符合条件直接结束
return
;
}
...
...
@@ -220,6 +207,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
reformStatisticsPlanTask
(
strBginDate
,
strEndDate
,
plan
.
getUserId
(),
plan
.
getOrgCode
());
//8、重新更新nextGenDate字段
plan
.
setNextGenDate
(
getNextDataByPlan
(
plan
));
iplanDao
.
saveAndFlush
(
plan
);
}
...
...
@@ -267,24 +257,16 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
param
.
put
(
"FINISH_YES"
,
XJConstant
.
PLAN_TASK_DET_FINISH_YES
);
planTaskMapper
.
updatePlanTaskPtInfo
(
param
);
// 更新主表,点数量,完成数量
for
(
Long
long1
:
taskNos
)
{
int
num
=
planTaskDetail
.
countByTaskNo
(
long1
);
if
(
num
<=
0
){
int
num
=
planTaskDetail
.
countByTaskNo
(
long1
);
if
(
num
<=
0
)
{
iplanTaskDao
.
deleteById
(
long1
);
}
}
}
@Override
public
List
<
PlanTaskVo
>
planTaskReport
(
String
toke
,
String
product
,
String
appKey
,
PlanTaskPageParam
param
)
{
public
List
<
PlanTaskVo
>
planTaskReport
(
String
toke
,
String
product
,
String
appKey
,
PlanTaskPageParam
param
)
{
List
<
PlanTaskVo
>
content
=
planTaskMapper
.
getPlanTaskInfoList
(
param
);
Set
<
String
>
userIdSet
=
Sets
.
newHashSet
(
Lists
.
transform
(
content
,
PlanTaskVo:
:
getUserName
));
...
...
@@ -298,11 +280,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
Map
<
String
,
String
>
userMap
=
new
HashMap
<>();
Map
<
String
,
String
>
deptMap
=
new
HashMap
<>();
if
(!
CollectionUtils
.
isEmpty
(
userIdSet
))
{
List
<
AgencyUserModel
>
userModels
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIdSet
));
List
<
AgencyUserModel
>
userModels
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIdSet
));
userMap
=
userModels
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
AgencyUserModel:
:
getRealName
,
(
k1
,
k2
)
->
k2
));
}
if
(!
CollectionUtils
.
isEmpty
(
deptIdSet
))
{
List
<
LinkedHashMap
>
departmentBos
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
deptIdSet
));
List
<
LinkedHashMap
>
departmentBos
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
deptIdSet
));
//deptMap = departmentBos.stream().collect(Collectors.toMap(DepartmentModel::getSequenceNbr, DepartmentModel::getDepartmentName));
for
(
int
i
=
0
;
i
<
departmentBos
.
size
();
i
++)
{
deptMap
.
put
(
departmentBos
.
get
(
i
).
get
(
"sequenceNbr"
).
toString
(),
departmentBos
.
get
(
i
).
get
(
"departmentName"
).
toString
());
...
...
@@ -315,15 +297,13 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
content
.
forEach
(
e
->
{
userNames
.
clear
();
List
<
String
>
userIds1
=
Arrays
.
asList
(
e
.
getUserName
().
split
(
","
));
for
(
String
userId
:
userIds1
)
{
for
(
String
userId
:
userIds1
)
{
userNames
.
add
(
finalUserMap1
.
get
(
userId
));
}
userNames
.
remove
(
null
);
e
.
setUserName
(
Joiner
.
on
(
","
).
join
(
userNames
));
e
.
setDeptName
(
finalDeptMap1
.
get
(
String
.
valueOf
(
e
.
getDeptId
())));
});
return
content
;
}
...
...
@@ -387,16 +367,14 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
continue
;
}
//2.4.删除今天可能重做生成的数据(计划重做后进行了计划的编辑)
if
(
iplanTaskDao
.
findById
(
plan
.
getPlanTaskId
())
!=
null
&&
plan
.
getFirstFlag
()
==
XJConstant
.
PLAN_FIRST_STATUS_YES
)
if
(
iplanTaskDao
.
existsById
(
plan
.
getPlanTaskId
()))
{
if
(
iplanTaskDao
.
existsById
(
plan
.
getPlanTaskId
()))
{
iplanTaskDao
.
deleteById
(
plan
.
getPlanTaskId
());
}
//2.5.插入planTask及planTaskDetail
insertPlanTaskAndDet
(
list
,
plan
,
XJConstant
.
SCHED_FLAG
,
now
);
}
}
...
...
@@ -412,7 +390,6 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
for
(
long
id
:
ids
)
{
iplanTaskDao
.
deleteById
(
id
);
}
}
/**
...
...
@@ -572,7 +549,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
@Override
public
Page
<
HashMap
<
String
,
Object
>>
getPlanTasks
(
String
toke
,
String
product
,
String
appKey
,
HashMap
<
String
,
Object
>
params
)
{
public
Page
<
HashMap
<
String
,
Object
>>
getPlanTasks
(
String
toke
,
String
product
,
String
appKey
,
HashMap
<
String
,
Object
>
params
)
{
CommonPageable
pageParam
=
new
CommonPageable
();
List
<
HashMap
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
long
total
=
planTaskMapper
.
getPlanTasksCount
(
params
);
...
...
@@ -588,17 +565,17 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
userIds
.
add
(
userId
);
}
});
List
<
AgencyUserModel
>
userModelList
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIds
));
Map
<
String
,
String
>
userModelMap
=
userModelList
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
AgencyUserModel:
:
getRealName
,(
k1
,
k2
)->
k2
));
List
<
AgencyUserModel
>
userModelList
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIds
));
Map
<
String
,
String
>
userModelMap
=
userModelList
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
AgencyUserModel:
:
getRealName
,
(
k1
,
k2
)
->
k2
));
List
<
String
>
userNames
=
new
ArrayList
<>();
content
.
forEach
(
e
->
{
userNames
.
clear
();
List
<
String
>
userIds1
=
Arrays
.
asList
(
e
.
get
(
"userId"
).
toString
().
split
(
","
));
for
(
String
userId
:
userIds1
)
{
for
(
String
userId
:
userIds1
)
{
userNames
.
add
(
userModelMap
.
get
(
userId
));
}
userNames
.
remove
(
null
);
e
.
put
(
"executiveName"
,
Joiner
.
on
(
","
).
join
(
userNames
));
e
.
put
(
"executiveName"
,
Joiner
.
on
(
","
).
join
(
userNames
));
/*e.put("beginTime",new Date().getTime());
e.put("endTime",new Date().getTime());*/
...
...
@@ -624,8 +601,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
@Override
public
List
<
PlanTaskVo
>
getPlanTaskListByIds
(
String
toke
,
String
product
,
String
appKey
,
Long
[]
ids
)
{
public
List
<
PlanTaskVo
>
getPlanTaskListByIds
(
String
toke
,
String
product
,
String
appKey
,
Long
[]
ids
)
{
List
<
PlanTaskVo
>
content
=
planTaskMapper
.
getPlanTaskListByIds
(
ids
);
...
...
@@ -640,11 +616,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
Map
<
String
,
String
>
userMap
=
new
HashMap
<>();
Map
<
String
,
String
>
deptMap
=
new
HashMap
<>();
if
(!
CollectionUtils
.
isEmpty
(
userIdSet
))
{
List
<
AgencyUserModel
>
userModels
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIdSet
));
List
<
AgencyUserModel
>
userModels
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIdSet
));
userMap
=
userModels
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
AgencyUserModel:
:
getRealName
,
(
k1
,
k2
)
->
k2
));
}
if
(!
CollectionUtils
.
isEmpty
(
deptIdSet
))
{
List
<
LinkedHashMap
>
departmentBos
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
deptIdSet
));
List
<
LinkedHashMap
>
departmentBos
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
deptIdSet
));
//deptMap = departmentBos.stream().collect(Collectors.toMap(DepartmentModel::getSequenceNbr, DepartmentModel::getDepartmentName));
for
(
int
i
=
0
;
i
<
departmentBos
.
size
();
i
++)
{
deptMap
.
put
(
departmentBos
.
get
(
i
).
get
(
"sequenceNbr"
).
toString
(),
departmentBos
.
get
(
i
).
get
(
"departmentName"
).
toString
());
...
...
@@ -657,18 +633,14 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
content
.
forEach
(
e
->
{
userNames
.
clear
();
List
<
String
>
userIds1
=
Arrays
.
asList
(
e
.
getUserName
().
split
(
","
));
for
(
String
userId
:
userIds1
)
{
for
(
String
userId
:
userIds1
)
{
userNames
.
add
(
finalUserMap1
.
get
(
userId
));
}
userNames
.
remove
(
null
);
e
.
setUserName
(
Joiner
.
on
(
","
).
join
(
userNames
));
e
.
setDeptName
(
finalDeptMap1
.
get
(
String
.
valueOf
(
e
.
getDeptId
())));
});
return
content
;
}
@Override
...
...
@@ -685,11 +657,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
@Override
public
AppPointCheckRespone
queryPointPlanTaskDetail
(
String
toke
,
String
product
,
String
appKey
,
Long
planTaskId
,
Long
pointId
)
{
public
AppPointCheckRespone
queryPointPlanTaskDetail
(
String
toke
,
String
product
,
String
appKey
,
Long
planTaskId
,
Long
pointId
)
{
AppPointCheckRespone
pointCheckRespone
=
new
AppPointCheckRespone
();
Check
check
=
checkDao
.
findByPlanTaskIdAndPointId
(
planTaskId
,
pointId
);
if
(
check
!=
null
)
{
pointCheckRespone
=
checkService
.
queryCheckPointDetail
(
toke
,
product
,
appKey
,
check
.
getId
());
pointCheckRespone
=
checkService
.
queryCheckPointDetail
(
toke
,
product
,
appKey
,
check
.
getId
());
}
else
{
PointCheckDetailBo
planPointInfo
=
planTaskMapper
.
getPointPlanTaskInfo
(
planTaskId
,
pointId
);
if
(
planPointInfo
!=
null
)
{
...
...
@@ -751,35 +723,28 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Override
public
PlanTask
selectPlanTaskStatus
(
Long
id
)
{
// TODO Auto-generated method stub
Optional
<
PlanTask
>
date
=
iplanTaskDao
.
findById
(
id
);
if
(
iplanTaskDao
.
findById
(
id
)!=
null
)
{
Optional
<
PlanTask
>
date
=
iplanTaskDao
.
findById
(
id
);
if
(
iplanTaskDao
.
findById
(
id
)
!=
null
)
{
return
date
.
get
();
}
else
{
}
else
{
return
null
;
}
}
@Override
public
CommonResponse
startplan
(
List
<
String
>
ids
)
{
try
{
List
<
Plan
>
plans
=
iplanDao
.
findByids
(
ids
);
if
(
plans
!=
null
&&
plans
.
size
()>
0
)
{
Plan
plan
=
plans
.
get
(
0
);
if
(
plans
!=
null
&&
plans
.
size
()
>
0
)
{
Plan
plan
=
plans
.
get
(
0
);
plan
.
setStatus
(
Byte
.
parseByte
(
XJConstant
.
PLAN_STATUS_START
));
iplanDao
.
save
(
plan
);
//1.公共参数准备
String
planId
=
plan
.
getId
()+
""
;
//重做的计划编号id
SimpleDateFormat
sdf1
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
date
=
new
Date
();
String
planId
=
plan
.
getId
()
+
""
;
//重做的计划编号id
SimpleDateFormat
sdf1
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
date
=
new
Date
();
Date
datef
=
null
;
try
{
datef
=
sdf1
.
parse
(
plan
.
getPlanEnd
());
...
...
@@ -789,16 +754,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
e1
.
printStackTrace
();
}
if
(
date
.
getTime
()>
datef
.
getTime
()){
if
(
date
.
getTime
()
>
datef
.
getTime
())
{
return
CommonResponseUtil
.
failure
(
"计划结束时间小于等于当前时间,计划不生成!"
);
}
String
strBginDate
=
sdf1
.
format
(
date
);
String
strBginDate
=
sdf1
.
format
(
date
);
String
strEndDate
=
plan
.
getPlanEnd
();
plan
.
setPlanBegin
(
strBginDate
);
String
flag
=
"0"
;
...
...
@@ -808,11 +768,10 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
throw
new
YeeException
(
"计划不存在"
);
}
if
(
plan
.
getStatus
()==
1
)
{
if
(
plan
.
getStatus
()
==
1
)
{
throw
new
YeeException
(
"1"
);
}
//2.数据必输校验,不满足直接return,不再向下进行
Boolean
fileFlag
=
PlanTaskUtil
.
checkMustFile
(
plan
);
if
(!
fileFlag
)
{
...
...
@@ -826,16 +785,15 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
return
CommonResponseUtil
.
failure
();
}
if
(!
vo
.
getIsGenData
())
{
//日期不符合条件直接结束
return
CommonResponseUtil
.
failure
();
}
//3.删除planTask表,按照计划id+日期
HashMap
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"beginDate"
,
strBginDate
);
param
.
put
(
"endDate"
,
strEndDate
);
param
.
put
(
"planId"
,
planId
);
HashMap
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"beginDate"
,
strBginDate
);
param
.
put
(
"endDate"
,
strEndDate
);
param
.
put
(
"planId"
,
planId
);
deletePlanTaskAndDet
(
param
);
//5.执行数据生成(具体时间 + 人员)
...
...
@@ -848,24 +806,38 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
if
(
ObjectUtils
.
isEmpty
(
plan
.
getUserId
()))
{
return
CommonResponseUtil
.
failure
();
}
try
{
reformStatisticsPlanTask
(
strBginDate
,
strEndDate
,
plan
.
getUserId
(),
plan
.
getOrgCode
());
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
}
}
catch
(
Exception
e
)
{
}
return
CommonResponseUtil
.
success
();
}
/**
* 根据计划获取下一次执行时间
*
* @param plan
* @return
*/
private
Date
getNextDataByPlan
(
Plan
plan
)
{
Date
date
=
DateUtil
.
format
();
switch
(
plan
.
getPlanType
())
{
case
"1"
:
date
=
DateUtil
.
getDateByNumber
(
date
,
plan
.
getExecuteInterval
());
break
;
case
"2"
:
date
=
DateUtil
.
getDateByWeek
(
date
,
plan
.
getExecuteInterval
());
break
;
case
"3"
:
date
=
DateUtil
.
getDateByMonth
(
date
,
plan
.
getExecuteInterval
());
break
;
}
return
date
;
}
}
AmosBankPatrolService/src/main/java/com/yeejoin/amos/patrol/service/business/service/impl/Safety3DDataSendServiceImpl.java
View file @
95218239
...
...
@@ -294,7 +294,5 @@ public class Safety3DDataSendServiceImpl implements ISafety3DDataSendService {
remoteSpcService
.
pushSpcCheckResult
(
checkResultPushSpcRequest
);
return
checkResultPushSpcRequest
;
}
}
AmosBankPatrolService/src/main/java/com/yeejoin/amos/patrol/service/core/util/DateUtil.java
View file @
95218239
...
...
@@ -589,6 +589,20 @@ public class DateUtil {
return
cal
.
getTime
();
}
public
static
Date
getDateByWeek
(
Date
date
,
Integer
dayNumber
)
{
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
date
);
cal
.
add
(
Calendar
.
WEEK_OF_YEAR
,
dayNumber
);
return
cal
.
getTime
();
}
public
static
Date
getDateByMonth
(
Date
date
,
Integer
dayNumber
)
{
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
date
);
cal
.
add
(
Calendar
.
MONTH
,
dayNumber
);
return
cal
.
getTime
();
}
public
static
Date
getHourBeginOfDay
(
int
hour
)
{
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
set
(
Calendar
.
HOUR_OF_DAY
,
hour
);
...
...
@@ -596,4 +610,14 @@ public class DateUtil {
cal
.
set
(
Calendar
.
SECOND
,
0
);
return
cal
.
getTime
();
}
/**
* 获取当前时间
*
* @return
*/
public
static
Date
format
()
{
Date
date
=
new
Date
();
return
date
;
}
}
AmosBankPatrolService/src/main/java/com/yeejoin/amos/patrol/service/remote/RemoteSecurityService.java
View file @
95218239
...
...
@@ -80,8 +80,6 @@ public class RemoteSecurityService {
}
//登录
public
Toke
come
()
{
IdPasswordAuthModel
dPasswordAuthModel
=
new
IdPasswordAuthModel
();
dPasswordAuthModel
.
setLoginId
(
loginId
);
dPasswordAuthModel
.
setPassword
(
password
);
...
...
@@ -97,7 +95,6 @@ public class RemoteSecurityService {
oked
.
setToke
(
map
.
get
(
"token"
).
toString
());
oked
.
setProduct
(
productWeb
);
oked
.
setAppKey
(
appKeyWeb
);
}
...
...
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