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
8f1f8af5
Commit
8f1f8af5
authored
Dec 14, 2023
by
李秀明
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
4110860e
2b8dc876
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
257 additions
and
13 deletions
+257
-13
JyjcOpeningApplication.java
...s/boot/module/jyjc/api/entity/JyjcOpeningApplication.java
+5
-3
JyjcOpeningApplicationModel.java
...ot/module/jyjc/api/model/JyjcOpeningApplicationModel.java
+4
-1
JyjcOpeningApplicationController.java
...jyjc/biz/controller/JyjcOpeningApplicationController.java
+19
-9
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+2
-0
CreateCodeController.java
.../boot/module/tcm/api/controller/CreateCodeController.java
+58
-0
ApplicationFormTypeEnum.java
...os/boot/module/tcm/api/enums/ApplicationFormTypeEnum.java
+25
-0
ICreateCodeService.java
.../amos/boot/module/tcm/api/service/ICreateCodeService.java
+14
-0
CreateCodeServiceImpl.java
...ot/module/tcm/biz/service/impl/CreateCodeServiceImpl.java
+130
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/entity/JyjcOpeningApplication.java
View file @
8f1f8af5
...
@@ -3,12 +3,14 @@ package com.yeejoin.amos.boot.module.jyjc.api.entity;
...
@@ -3,12 +3,14 @@ package com.yeejoin.amos.boot.module.jyjc.api.entity;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
*
*
...
@@ -19,7 +21,7 @@ import java.util.Date;
...
@@ -19,7 +21,7 @@ import java.util.Date;
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"tz_jyjc_opening_application"
)
@TableName
(
value
=
"tz_jyjc_opening_application"
,
autoResultMap
=
true
)
public
class
JyjcOpeningApplication
extends
BaseEntity
{
public
class
JyjcOpeningApplication
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -39,8 +41,8 @@ public class JyjcOpeningApplication extends BaseEntity {
...
@@ -39,8 +41,8 @@ public class JyjcOpeningApplication extends BaseEntity {
/**
/**
* 检测区域编码
* 检测区域编码
*/
*/
@TableField
(
"detection_region"
)
@TableField
(
value
=
"detection_region"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
String
detectionRegion
;
private
List
<
String
>
detectionRegion
;
/**
/**
* 检测区域名称(冗余)
* 检测区域名称(冗余)
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcOpeningApplicationModel.java
View file @
8f1f8af5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
model
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
model
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto
;
...
@@ -29,7 +31,8 @@ public class JyjcOpeningApplicationModel extends BaseModel {
...
@@ -29,7 +31,8 @@ public class JyjcOpeningApplicationModel extends BaseModel {
private
String
unitCodeName
;
private
String
unitCodeName
;
@ApiModelProperty
(
value
=
"检测区域编码"
)
@ApiModelProperty
(
value
=
"检测区域编码"
)
private
String
detectionRegion
;
@TableField
(
value
=
"detection_region"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
String
>
detectionRegion
;
@ApiModelProperty
(
value
=
"检测区域名称(冗余)"
)
@ApiModelProperty
(
value
=
"检测区域名称(冗余)"
)
private
String
detectionRegionName
;
private
String
detectionRegionName
;
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcOpeningApplicationController.java
View file @
8f1f8af5
...
@@ -48,7 +48,7 @@ public class JyjcOpeningApplicationController extends BaseController {
...
@@ -48,7 +48,7 @@ public class JyjcOpeningApplicationController extends BaseController {
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
JyjcOpeningApplicationModel
>
save
(
@RequestBody
JyjcOpeningApplicationModel
model
)
{
public
ResponseModel
<
JyjcOpeningApplicationModel
>
save
(
@RequestBody
JyjcOpeningApplicationModel
model
)
{
model
=
jyjcOpeningApplicationServiceImpl
.
saveModel
(
model
,
tru
e
);
model
=
jyjcOpeningApplicationServiceImpl
.
saveModel
(
model
,
fals
e
);
return
ResponseHelper
.
buildResponse
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
}
...
@@ -60,12 +60,28 @@ public class JyjcOpeningApplicationController extends BaseController {
...
@@ -60,12 +60,28 @@ public class JyjcOpeningApplicationController extends BaseController {
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"
根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr
更新"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"
更新"
,
notes
=
"
更新"
)
public
ResponseModel
<
JyjcOpeningApplicationModel
>
updateBySequenceNbrJyjcOpeningApplication
(
@RequestBody
JyjcOpeningApplicationModel
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
JyjcOpeningApplicationModel
>
updateBySequenceNbrJyjcOpeningApplication
(
@RequestBody
JyjcOpeningApplicationModel
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
updateModel
(
model
,
false
));
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
updateModel
(
model
,
false
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}/submit"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"保存并提交"
,
notes
=
"保存并提交"
)
public
ResponseModel
<
JyjcOpeningApplicationModel
>
updateBySequenceNbrAndStartFlow
(
@RequestBody
JyjcOpeningApplicationModel
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
updateModel
(
model
,
true
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/startFlow/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"重新提交开通申请"
,
notes
=
"重新提交开通申请"
)
public
ResponseModel
<
JyjcOpeningApplicationModel
>
resubmitJyjcOpeningApplication
(
@RequestBody
JyjcOpeningApplicationModel
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
updateModel
(
model
,
true
));
}
/**
/**
* 根据sequenceNbr删除
* 根据sequenceNbr删除
*
*
...
@@ -148,13 +164,7 @@ public class JyjcOpeningApplicationController extends BaseController {
...
@@ -148,13 +164,7 @@ public class JyjcOpeningApplicationController extends BaseController {
jyjcOpeningApplicationServiceImpl
.
stopFlow
(
instanceId
);
jyjcOpeningApplicationServiceImpl
.
stopFlow
(
instanceId
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/startFlow/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"重新提交开通申请"
,
notes
=
"重新提交开通申请"
)
public
ResponseModel
<
JyjcOpeningApplicationModel
>
resubmitJyjcOpeningApplication
(
@RequestBody
JyjcOpeningApplicationModel
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
updateModel
(
model
,
true
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserRole"
)
@GetMapping
(
value
=
"/getUserRole"
)
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
View file @
8f1f8af5
...
@@ -147,11 +147,13 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -147,11 +147,13 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
}
public
void
updateModelByInstanceId
(
String
instanceId
)
{
public
void
updateModelByInstanceId
(
String
instanceId
)
{
log
.
info
(
"updateModelByInstanceId, instanceId={}"
,
instanceId
);
JyjcOpeningApplication
entity
=
this
.
lambdaQuery
().
eq
(
JyjcOpeningApplication:
:
getWorkflowProstanceId
,
instanceId
).
one
();
JyjcOpeningApplication
entity
=
this
.
lambdaQuery
().
eq
(
JyjcOpeningApplication:
:
getWorkflowProstanceId
,
instanceId
).
one
();
if
(
entity
==
null
)
{
if
(
entity
==
null
)
{
return
;
return
;
}
}
JSONObject
taskJson
=
getTask
(
instanceId
);
JSONObject
taskJson
=
getTask
(
instanceId
);
log
.
info
(
"taskJson => {}"
,
taskJson
);
entity
.
setWorkflowRole
(
getWorkflowRoleGroups
(
taskJson
));
entity
.
setWorkflowRole
(
getWorkflowRoleGroups
(
taskJson
));
entity
.
setStatus
(
getWorkflowStatus
(
taskJson
));
entity
.
setStatus
(
getWorkflowStatus
(
taskJson
));
this
.
updateById
(
entity
);
this
.
updateById
(
entity
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/controller/CreateCodeController.java
0 → 100644
View file @
8f1f8af5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
controller
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ICreateCodeService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
/**
*
* 生成顺序码
* @author LiuLin
* @date 2023-12-14
*/
@RestController
@Api
(
tags
=
"生成顺序码"
)
@RequestMapping
(
value
=
"/code"
)
public
class
CreateCodeController
extends
BaseController
{
@Autowired
private
ICreateCodeService
createCodeService
;
/**
* 申请单编号生成
* @param type
* @param num
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/ANCode"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"申请单编号生成"
,
notes
=
"申请单编号生成"
)
public
ResponseModel
<
List
<
String
>>
CreateANCode
(
@RequestParam
(
"type"
)
String
type
,
@RequestParam
(
"num"
)
int
num
)
{
return
ResponseHelper
.
buildResponse
(
createCodeService
.
createApplicationFormCode
(
type
,
num
));
}
/**
* 申请单编号生成
* @param type
* @param num
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/Device registration code"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"申请单编号生成"
,
notes
=
"申请单编号生成"
)
public
ResponseModel
<
List
<
String
>>
CreateANCode1
(
@RequestParam
(
"type"
)
String
type
,
@RequestParam
(
"num"
)
int
num
)
{
return
ResponseHelper
.
buildResponse
(
createCodeService
.
CreateANCode
(
type
,
num
));
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/enums/ApplicationFormTypeEnum.java
0 → 100644
View file @
8f1f8af5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* 申请单枚举
* @author LiuLin
*/
@Getter
@AllArgsConstructor
public
enum
ApplicationFormTypeEnum
{
/**
* 申请单枚举
*/
GZ
(
"GZ"
),
JY
(
"JY"
),
SY
(
"SY"
);
/**
* 编号
*/
private
final
String
code
;
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/service/ICreateCodeService.java
0 → 100644
View file @
8f1f8af5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
service
;
import
java.util.List
;
public
interface
ICreateCodeService
{
/**
* 生成申请单编号
* @param type 枚举类型
* @param num 生成个数
* @return List
*/
List
<
String
>
createApplicationFormCode
(
String
type
,
int
num
);
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/CreateCodeServiceImpl.java
0 → 100644
View file @
8f1f8af5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ICreateCodeService
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.ValueOperations
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
/**
* @author LiuLin
* @date 2023-12-14
*/
@Service
public
class
CreateCodeServiceImpl
implements
ICreateCodeService
{
private
static
final
String
LOCK_VALUE
=
"locked"
;
private
static
final
String
LOCK_KEY
=
"sequence_lock"
;
private
final
RedisTemplate
<
String
,
String
>
redisTemplate
;
private
String
rulePrefix
;
public
CreateCodeServiceImpl
(
RedisTemplate
<
String
,
String
>
redisTemplate
)
{
this
.
redisTemplate
=
redisTemplate
;
}
@Override
public
List
<
String
>
createApplicationFormCode
(
String
type
,
int
batchSize
)
{
if
(!
isValueInEnum
(
type
))
{
return
Collections
.
emptyList
();
}
rulePrefix
=
type
+
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyyMMdd"
));
return
this
.
generateBatchSequence
(
type
,
batchSize
);
}
public
boolean
isValueInEnum
(
String
value
)
{
return
EnumSet
.
allOf
(
ApplicationFormTypeEnum
.
class
)
.
stream
()
.
anyMatch
(
enumValue
->
enumValue
.
name
().
equals
(
value
));
}
public
List
<
String
>
generateBatchSequence
(
String
sequenceKey
,
int
batchSize
)
{
// 使用分布式锁,确保在并发情况下只有一个线程能够生成顺序码
Boolean
lockAcquired
=
redisTemplate
.
opsForValue
().
setIfAbsent
(
LOCK_KEY
,
LOCK_VALUE
);
if
(
Boolean
.
TRUE
.
equals
(
lockAcquired
))
{
try
{
// 获取当前顺序码
ValueOperations
<
String
,
String
>
valueOps
=
redisTemplate
.
opsForValue
();
String
currentSequenceStr
=
valueOps
.
get
(
sequenceKey
);
// 如果为空,则初始化为0
if
(
currentSequenceStr
==
null
)
{
currentSequenceStr
=
"0"
;
}
// 将当前顺序码加1
Long
currentSequence
=
Long
.
parseLong
(
currentSequenceStr
);
// 生成批量顺序码
List
<
String
>
sequenceList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
batchSize
;
i
++)
{
currentSequence
++;
// 生成3位顺序码
String
formattedSequence
=
String
.
format
(
"%03d"
,
currentSequence
);
sequenceList
.
add
(
rulePrefix
+
formattedSequence
);
// 更新顺序码
setValueWithDailyExpiration
(
sequenceKey
,
String
.
valueOf
(
formattedSequence
));
}
return
sequenceList
;
}
finally
{
redisTemplate
.
delete
(
LOCK_KEY
);
}
}
else
{
// 获取锁失败,可以选择重试或采取其他策略
throw
new
RuntimeException
(
"Failed to acquire lock for sequence generation"
);
}
}
/**
* redis 根据自然月过期
*
* @param key key
* @param value value
*/
public
void
setValueWithMonthlyExpiration
(
String
key
,
String
value
)
{
ValueOperations
<
String
,
String
>
valueOps
=
redisTemplate
.
opsForValue
();
valueOps
.
set
(
key
,
value
);
Date
currentDate
=
new
Date
();
Date
endOfMonth
=
calculateEndOfMonth
(
currentDate
);
long
expirationTimeInSeconds
=
endOfMonth
.
getTime
()
-
currentDate
.
getTime
();
redisTemplate
.
expire
(
key
,
expirationTimeInSeconds
,
TimeUnit
.
MILLISECONDS
);
}
public
void
setValueWithDailyExpiration
(
String
key
,
String
value
)
{
ValueOperations
<
String
,
String
>
valueOps
=
redisTemplate
.
opsForValue
();
valueOps
.
set
(
key
,
value
);
Date
currentDate
=
new
Date
();
Date
endOfDay
=
calculateEndOfDay
(
currentDate
);
long
expirationTimeInSeconds
=
endOfDay
.
getTime
()
-
currentDate
.
getTime
();
redisTemplate
.
expire
(
key
,
expirationTimeInSeconds
,
TimeUnit
.
MILLISECONDS
);
}
private
Date
calculateEndOfMonth
(
Date
currentDate
)
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
currentDate
);
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
23
);
calendar
.
set
(
Calendar
.
MINUTE
,
59
);
calendar
.
set
(
Calendar
.
SECOND
,
59
);
calendar
.
set
(
Calendar
.
MILLISECOND
,
999
);
return
calendar
.
getTime
();
}
private
Date
calculateEndOfDay
(
Date
currentDate
)
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
currentDate
);
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
23
);
calendar
.
set
(
Calendar
.
MINUTE
,
59
);
calendar
.
set
(
Calendar
.
SECOND
,
59
);
calendar
.
set
(
Calendar
.
MILLISECOND
,
999
);
return
calendar
.
getTime
();
}
}
\ No newline at end of file
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