提交 259e820a authored 作者: 窦馨雨's avatar 窦馨雨

合并分支 'qa' 到 'master'

增加飞书表格时间判断逻辑 查看合并请求 !16
......@@ -177,7 +177,7 @@ public class ActivityToFeishuSheetServiceImpl implements ActivityToFeishuSheetSe
// 配发黑鸭试吃品(根) S
row.add(rdo.getBlackDuckTastingNum());
// 配发苦相试吃品(根) T
// 配发卤香试吃品(根) T
row.add(rdo.getBraisedTastingNum());
// 配发赠品个数 U
row.add(rdo.getGiftNum());
......@@ -199,7 +199,7 @@ public class ActivityToFeishuSheetServiceImpl implements ActivityToFeishuSheetSe
String rangFormat = sheetInfoD.getSheetId() + "!%s" + rowNumStr + ":%s" + rowNumStr;
// Y-AA: 上班打卡时间/地点 午休下班打卡时间/地点 午休上班打卡时间/地点 下班打卡时间/地点
// 上班打卡时间/地点 午休下班打卡时间/地点 午休上班打卡时间/地点 下班打卡时间/地点
if (Objects.nonNull(clockDo)) {
List<Object> rowClockData = new ArrayList<>();
// 调用新的时长计算方法(两段相加,缺卡则按上下班总时长)
......@@ -458,7 +458,7 @@ public class ActivityToFeishuSheetServiceImpl implements ActivityToFeishuSheetSe
*/
private String calculateWorkDuration(TemporaryActivityClockDO clockDo) {
// 基础校验:上班/下班时间为空,直接返回0
if (Objects.isNull(clockDo.getClockInTime())) {
if (Objects.isNull(clockDo)||Objects.isNull(clockDo.getClockInTime()) || Objects.isNull(clockDo.getClockOutTime())) {
return "0";
}
......@@ -477,18 +477,13 @@ public class ActivityToFeishuSheetServiceImpl implements ActivityToFeishuSheetSe
boolean isNoonCardMissing = Objects.isNull(noonClockOut) || Objects.isNull(noonClockIn);
if (isNoonCardMissing) {
// 午休缺卡:直接计算上班→下班的总时长
totalMinutes = DateUtil.between(clockIn, clockOut, DateUnit.MINUTE);
totalMinutes += DateUtil.between(clockIn, clockOut, DateUnit.MINUTE);
} else {
// 午休不缺卡:两段时长相加(上午段 + 下午段)
// 上班→午休下班
long morningMinutes = DateUtil.between(clockIn, noonClockOut, DateUnit.MINUTE);
// 午休上班→下班
long afternoonMinutes;
if (Objects.isNull(clockDo.getClockOutTime())){
afternoonMinutes = 0 ;
}else {
afternoonMinutes = DateUtil.between(noonClockIn, clockOut, DateUnit.MINUTE);
}
long afternoonMinutes= DateUtil.between(noonClockIn, clockOut, DateUnit.MINUTE);
totalMinutes = morningMinutes + afternoonMinutes;
}
......
......@@ -18,6 +18,15 @@
<result property="lineName" column="line_name" jdbcType="VARCHAR"/>
<result property="orgName" column="org_name" 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>
<select id="findListByCreateDate" resultMap="BaseResultMap">
......@@ -34,7 +43,16 @@
approve_status,
line_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
where create_time BETWEEN '${dateStr} 00:00:00' and '${dateStr} 23:59:00'
and is_delete = 1
......@@ -55,7 +73,16 @@
approve_status,
line_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
where create_time between #{params.createDateStart} and #{params.createDateEnd}
and is_delete = 1
......@@ -77,7 +104,16 @@
approve_status,
line_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
where id in
<foreach collection="ids" item="id" open="(" close=")" separator=",">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论