Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-export
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
promotion
wangxiaolu-export
Commits
07213037
提交
07213037
authored
1月 15, 2026
作者:
窦馨雨
浏览文件
操作
浏览文件
下载
差异文件
合并分支 'dxy' 到 'qa'
增加飞书计算时间逻辑 查看合并请求
!15
上级
71962279
e0d360cd
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
45 行增加
和
14 行删除
+45
-14
ActivityToFeishuSheetServiceImpl.java
...export/service/impl/ActivityToFeishuSheetServiceImpl.java
+6
-11
TemporaryActivityReportedMapper.xml
...main/resources/mapper/TemporaryActivityReportedMapper.xml
+39
-3
没有找到文件。
src/main/java/com/wangxiaolu/export/service/impl/ActivityToFeishuSheetServiceImpl.java
浏览文件 @
07213037
...
@@ -177,7 +177,7 @@ public class ActivityToFeishuSheetServiceImpl implements ActivityToFeishuSheetSe
...
@@ -177,7 +177,7 @@ public class ActivityToFeishuSheetServiceImpl implements ActivityToFeishuSheetSe
// 配发黑鸭试吃品(根) S
// 配发黑鸭试吃品(根) S
row
.
add
(
rdo
.
getBlackDuckTastingNum
());
row
.
add
(
rdo
.
getBlackDuckTastingNum
());
// 配发
苦相
试吃品(根) T
// 配发
卤香
试吃品(根) T
row
.
add
(
rdo
.
getBraisedTastingNum
());
row
.
add
(
rdo
.
getBraisedTastingNum
());
// 配发赠品个数 U
// 配发赠品个数 U
row
.
add
(
rdo
.
getGiftNum
());
row
.
add
(
rdo
.
getGiftNum
());
...
@@ -199,7 +199,7 @@ public class ActivityToFeishuSheetServiceImpl implements ActivityToFeishuSheetSe
...
@@ -199,7 +199,7 @@ public class ActivityToFeishuSheetServiceImpl implements ActivityToFeishuSheetSe
String
rangFormat
=
sheetInfoD
.
getSheetId
()
+
"!%s"
+
rowNumStr
+
":%s"
+
rowNumStr
;
String
rangFormat
=
sheetInfoD
.
getSheetId
()
+
"!%s"
+
rowNumStr
+
":%s"
+
rowNumStr
;
//
Y-AA:
上班打卡时间/地点 午休下班打卡时间/地点 午休上班打卡时间/地点 下班打卡时间/地点
// 上班打卡时间/地点 午休下班打卡时间/地点 午休上班打卡时间/地点 下班打卡时间/地点
if
(
Objects
.
nonNull
(
clockDo
))
{
if
(
Objects
.
nonNull
(
clockDo
))
{
List
<
Object
>
rowClockData
=
new
ArrayList
<>();
List
<
Object
>
rowClockData
=
new
ArrayList
<>();
// 调用新的时长计算方法(两段相加,缺卡则按上下班总时长)
// 调用新的时长计算方法(两段相加,缺卡则按上下班总时长)
...
@@ -458,7 +458,7 @@ public class ActivityToFeishuSheetServiceImpl implements ActivityToFeishuSheetSe
...
@@ -458,7 +458,7 @@ public class ActivityToFeishuSheetServiceImpl implements ActivityToFeishuSheetSe
*/
*/
private
String
calculateWorkDuration
(
TemporaryActivityClockDO
clockDo
)
{
private
String
calculateWorkDuration
(
TemporaryActivityClockDO
clockDo
)
{
// 基础校验:上班/下班时间为空,直接返回0
// 基础校验:上班/下班时间为空,直接返回0
if
(
Objects
.
isNull
(
clockDo
.
getClockIn
Time
()))
{
if
(
Objects
.
isNull
(
clockDo
)||
Objects
.
isNull
(
clockDo
.
getClockInTime
())
||
Objects
.
isNull
(
clockDo
.
getClockOut
Time
()))
{
return
"0"
;
return
"0"
;
}
}
...
@@ -477,18 +477,13 @@ public class ActivityToFeishuSheetServiceImpl implements ActivityToFeishuSheetSe
...
@@ -477,18 +477,13 @@ public class ActivityToFeishuSheetServiceImpl implements ActivityToFeishuSheetSe
boolean
isNoonCardMissing
=
Objects
.
isNull
(
noonClockOut
)
||
Objects
.
isNull
(
noonClockIn
);
boolean
isNoonCardMissing
=
Objects
.
isNull
(
noonClockOut
)
||
Objects
.
isNull
(
noonClockIn
);
if
(
isNoonCardMissing
)
{
if
(
isNoonCardMissing
)
{
// 午休缺卡:直接计算上班→下班的总时长
// 午休缺卡:直接计算上班→下班的总时长
totalMinutes
=
DateUtil
.
between
(
clockIn
,
clockOut
,
DateUnit
.
MINUTE
);
totalMinutes
+=
DateUtil
.
between
(
clockIn
,
clockOut
,
DateUnit
.
MINUTE
);
}
else
{
}
else
{
// 午休不缺卡:两段时长相加(上午段 + 下午段)
// 午休不缺卡:两段时长相加(上午段 + 下午段)
// 上班→午休下班
// 上班→午休下班
long
morningMinutes
=
DateUtil
.
between
(
clockIn
,
noonClockOut
,
DateUnit
.
MINUTE
);
long
morningMinutes
=
DateUtil
.
between
(
clockIn
,
noonClockOut
,
DateUnit
.
MINUTE
);
// 午休上班→下班
long
afternoonMinutes
=
DateUtil
.
between
(
noonClockIn
,
clockOut
,
DateUnit
.
MINUTE
);
long
afternoonMinutes
;
if
(
Objects
.
isNull
(
clockDo
.
getClockOutTime
())){
afternoonMinutes
=
0
;
}
else
{
afternoonMinutes
=
DateUtil
.
between
(
noonClockIn
,
clockOut
,
DateUnit
.
MINUTE
);
}
totalMinutes
=
morningMinutes
+
afternoonMinutes
;
totalMinutes
=
morningMinutes
+
afternoonMinutes
;
}
}
...
...
src/main/resources/mapper/TemporaryActivityReportedMapper.xml
浏览文件 @
07213037
...
@@ -18,6 +18,15 @@
...
@@ -18,6 +18,15 @@
<result
property=
"lineName"
column=
"line_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"lineName"
column=
"line_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"orgName"
column=
"org_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"orgName"
column=
"org_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"prdClass"
column=
"prd_class"
jdbcType=
"VARCHAR"
/>
<result
property=
"prdClass"
column=
"prd_class"
jdbcType=
"VARCHAR"
/>
<result
property=
"temporaryPhone"
column=
"temporary_phone"
jdbcType=
"VARCHAR"
/>
<result
property=
"executeModePlan"
column=
"execute_mode_plan"
jdbcType=
"VARCHAR"
/>
<result
property=
"hasBlackDuckFlavor"
column=
"has_black_duck_flavor"
jdbcType=
"VARCHAR"
/>
<result
property=
"blackDuckTastingNum"
column=
"black_duck_tasting_num"
jdbcType=
"INTEGER"
/>
<result
property=
"braisedTastingNum"
column=
"braised_tasting_num"
jdbcType=
"INTEGER"
/>
<result
property=
"giftNum"
column=
"gift_num"
jdbcType=
"INTEGER"
/>
<result
property=
"promotionSales"
column=
"promotion_sales"
jdbcType=
"DECIMAL"
/>
<result
property=
"blackDuckSales"
column=
"black_duck_sales"
jdbcType=
"DECIMAL"
/>
<result
property=
"giftBoxSales"
column=
"gift_box_sales"
jdbcType=
"DECIMAL"
/>
</resultMap>
</resultMap>
<select
id=
"findListByCreateDate"
resultMap=
"BaseResultMap"
>
<select
id=
"findListByCreateDate"
resultMap=
"BaseResultMap"
>
...
@@ -34,7 +43,16 @@
...
@@ -34,7 +43,16 @@
approve_status,
approve_status,
line_name,
line_name,
dept_qc_org_name as org_name,
dept_qc_org_name as org_name,
prd_class
prd_class,
temporary_phone,
execute_mode_plan,
has_black_duck_flavor,
black_duck_tasting_num,
braised_tasting_num,
gift_num,
promotion_sales,
black_duck_sales,
gift_box_sales
from temporary_activity_reported
from temporary_activity_reported
where create_time BETWEEN '${dateStr} 00:00:00' and '${dateStr} 23:59:00'
where create_time BETWEEN '${dateStr} 00:00:00' and '${dateStr} 23:59:00'
and is_delete = 1
and is_delete = 1
...
@@ -55,7 +73,16 @@
...
@@ -55,7 +73,16 @@
approve_status,
approve_status,
line_name,
line_name,
dept_qc_org_name as org_name,
dept_qc_org_name as org_name,
prd_class
prd_class,
temporary_phone,
execute_mode_plan,
has_black_duck_flavor,
black_duck_tasting_num,
braised_tasting_num,
gift_num,
promotion_sales,
black_duck_sales,
gift_box_sales
from temporary_activity_reported
from temporary_activity_reported
where create_time between #{params.createDateStart} and #{params.createDateEnd}
where create_time between #{params.createDateStart} and #{params.createDateEnd}
and is_delete = 1
and is_delete = 1
...
@@ -77,7 +104,16 @@
...
@@ -77,7 +104,16 @@
approve_status,
approve_status,
line_name,
line_name,
dept_qc_org_name as org_name,
dept_qc_org_name as org_name,
prd_class
prd_class,
temporary_phone,
execute_mode_plan,
has_black_duck_flavor,
black_duck_tasting_num,
braised_tasting_num,
gift_num,
promotion_sales,
black_duck_sales,
gift_box_sales
from temporary_activity_reported
from temporary_activity_reported
where id in
where id in
<foreach
collection=
"ids"
item=
"id"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"ids"
item=
"id"
open=
"("
close=
")"
separator=
","
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论