Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
51d4afcf
提交
51d4afcf
authored
6月 01, 2022
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(二维码模块): 修改了时区问题
修改了时区问题
上级
02c52416
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
10 行增加
和
3 行删除
+10
-3
DateUtil.java
dev-misc/src/main/java/com/tykj/dev/misc/utils/DateUtil.java
+1
-1
JacksonUtil.java
...sc/src/main/java/com/tykj/dev/misc/utils/JacksonUtil.java
+2
-0
DailyCheckBillServiceImpl.java
...ice/selfcheck/service/impl/DailyCheckBillServiceImpl.java
+7
-2
没有找到文件。
dev-misc/src/main/java/com/tykj/dev/misc/utils/DateUtil.java
浏览文件 @
51d4afcf
...
@@ -21,7 +21,7 @@ public class DateUtil {
...
@@ -21,7 +21,7 @@ public class DateUtil {
public
static
LocalDate
getLocalDate
(
Date
date
){
public
static
LocalDate
getLocalDate
(
Date
date
){
Instant
instant
=
date
.
toInstant
();
Instant
instant
=
date
.
toInstant
();
ZoneId
zoneId
=
ZoneId
.
systemDefault
(
);
ZoneId
zoneId
=
ZoneId
.
of
(
"GMT+0"
);
LocalDateTime
localDateTime
=
instant
.
atZone
(
zoneId
).
toLocalDateTime
();
LocalDateTime
localDateTime
=
instant
.
atZone
(
zoneId
).
toLocalDateTime
();
return
localDateTime
.
toLocalDate
();
return
localDateTime
.
toLocalDate
();
}
}
...
...
dev-misc/src/main/java/com/tykj/dev/misc/utils/JacksonUtil.java
浏览文件 @
51d4afcf
...
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
...
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
java.util.TimeZone
;
/**
/**
* JacksonUtil.
* JacksonUtil.
...
@@ -32,6 +33,7 @@ public final class JacksonUtil {
...
@@ -32,6 +33,7 @@ public final class JacksonUtil {
objectMapper
=
new
ObjectMapper
();
objectMapper
=
new
ObjectMapper
();
}
}
try
{
try
{
TimeZone
.
getTimeZone
(
"GMT+8"
);
return
objectMapper
.
readValue
(
jsonStr
,
valueType
);
return
objectMapper
.
readValue
(
jsonStr
,
valueType
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/impl/DailyCheckBillServiceImpl.java
浏览文件 @
51d4afcf
...
@@ -38,6 +38,7 @@ import org.springframework.stereotype.Service;
...
@@ -38,6 +38,7 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -94,16 +95,20 @@ public class DailyCheckBillServiceImpl implements DailyCheckBillService {
...
@@ -94,16 +95,20 @@ public class DailyCheckBillServiceImpl implements DailyCheckBillService {
Integer
unitId
=
userUtils
.
getCurrentUnitId
();
Integer
unitId
=
userUtils
.
getCurrentUnitId
();
String
currentUserUnitName
=
userUtils
.
getCurrentUserUnitName
();
String
currentUserUnitName
=
userUtils
.
getCurrentUserUnitName
();
dailyCheckBill
.
setUseraId
(
currentUserId
);
dailyCheckBill
.
setUseraId
(
currentUserId
);
LocalDate
localDate
=
DateUtil
.
getLocalDate
(
new
Date
());
//设置状态为待检查
//设置状态为待检查
dailyCheckBill
.
setCheckStatus
(
0
);
dailyCheckBill
.
setCheckStatus
(
0
);
dailyCheckBill
.
setCheckUnitId
(
unitId
);
dailyCheckBill
.
setCheckUnitId
(
unitId
);
dailyCheckBill
.
setCheckUnit
(
currentUserUnitName
);
dailyCheckBill
.
setCheckUnit
(
currentUserUnitName
);
dailyCheckBill
.
setTitle
(
currentUserUnitName
+
"发起的日常检查任务"
);
DateTimeFormatter
df
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
String
format
=
localDate
.
format
(
df
);
dailyCheckBill
.
setTitle
(
format
+
"日常检查"
);
//保存业务
//保存业务
DailyCheckBill
save
=
dailyCheckBillDao
.
save
(
dailyCheckBill
);
DailyCheckBill
save
=
dailyCheckBillDao
.
save
(
dailyCheckBill
);
List
<
Integer
>
userIds
=
new
ArrayList
<>();
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
currentUserId
);
userIds
.
add
(
currentUserId
);
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
WAIT_CHECK
.
id
,
currentUserUnitName
+
"发起的日常检查任务"
,
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
WAIT_CHECK
.
id
,
format
+
"日常检查"
,
null
,
"."
,
save
.
getId
(),
BusinessEnum
.
DAILY_SELF_CHECK
.
id
,
null
,
"."
,
save
.
getId
(),
BusinessEnum
.
DAILY_SELF_CHECK
.
id
,
unitId
,
0
,
null
,
userIds
);
unitId
,
0
,
null
,
userIds
);
TaskBto
start
=
taskService
.
start
(
taskBto
);
TaskBto
start
=
taskService
.
start
(
taskBto
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论