Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-module-operation
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-module-operation
Commits
1761dd21
提交
1761dd21
authored
9月 24, 2025
作者:
000516
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
档期上报实际执行日期时,判断月份与计划月份是否一致或是下月
上级
2abc943c
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
25 行增加
和
0 行删除
+25
-0
SalesApPromotionImplDao.java
...ration/domain/sales/dao/impl/SalesApPromotionImplDao.java
+25
-0
没有找到文件。
src/main/java/com/sfa/operation/domain/sales/dao/impl/SalesApPromotionImplDao.java
浏览文件 @
1761dd21
...
@@ -3,6 +3,9 @@ package com.sfa.operation.domain.sales.dao.impl;
...
@@ -3,6 +3,9 @@ package com.sfa.operation.domain.sales.dao.impl;
import
com.baomidou.dynamic.datasource.annotation.DS
;
import
com.baomidou.dynamic.datasource.annotation.DS
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.sfa.common.core.enums.ECode
;
import
com.sfa.common.core.exception.CheckedException
;
import
com.sfa.common.core.utils.DateUtils
;
import
com.sfa.common.core.utils.StringUtils
;
import
com.sfa.common.core.utils.StringUtils
;
import
com.sfa.common.core.web.domain.PageInfo
;
import
com.sfa.common.core.web.domain.PageInfo
;
import
com.sfa.common.core.web.page.TableSupport
;
import
com.sfa.common.core.web.page.TableSupport
;
...
@@ -15,6 +18,7 @@ import org.springframework.beans.BeanUtils;
...
@@ -15,6 +18,7 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.Objects
;
import
java.util.Objects
;
/**
/**
...
@@ -38,6 +42,27 @@ public class SalesApPromotionImplDao implements ISalesApPromotionDao {
...
@@ -38,6 +42,27 @@ public class SalesApPromotionImplDao implements ISalesApPromotionDao {
@Override
@Override
public
void
updateById
(
SalesApPromotionDto
dto
)
{
public
void
updateById
(
SalesApPromotionDto
dto
)
{
// 实际-档期开始/结束时间,是否在当月或下月内
if
(
dto
.
getIsActualPromotionStartDate
()
||
dto
.
getIsActualPromotionEndDate
()){
SalesApPromotion
entityOld
=
salesApPromotionMapper
.
selectById
(
dto
.
getSapId
());
if
(
dto
.
getIsActualPromotionStartDate
()
&&
Objects
.
nonNull
(
dto
.
getActualPromotionStartDate
())){
Date
plansDate
=
entityOld
.
getPlannedPromotionStartDate
();
Date
sDate
=
dto
.
getActualPromotionStartDate
();
if
(!(
DateUtils
.
isSameYearMonth
(
sDate
,
plansDate
)
||
DateUtils
.
isNextMonth
(
plansDate
,
sDate
))){
throw
new
CheckedException
(
ECode
.
SAP_EXECUTE_MONTH_ERROR
);
}
}
if
(
dto
.
getIsActualPromotionEndDate
()
&&
Objects
.
nonNull
(
dto
.
getActualPromotionEndDate
())){
Date
plansDate
=
entityOld
.
getPlannedPromotionEndDate
();
Date
sDate
=
dto
.
getActualPromotionEndDate
();
System
.
out
.
println
(
DateUtils
.
isSameYearMonth
(
sDate
,
plansDate
));
System
.
out
.
println
(
DateUtils
.
isNextMonth
(
sDate
,
plansDate
));
if
(!(
DateUtils
.
isSameYearMonth
(
sDate
,
plansDate
)
||
DateUtils
.
isNextMonth
(
plansDate
,
sDate
))){
throw
new
CheckedException
(
ECode
.
SAP_EXECUTE_MONTH_ERROR
);
}
}
}
SalesApPromotion
salesApPromotion
=
new
SalesApPromotion
();
SalesApPromotion
salesApPromotion
=
new
SalesApPromotion
();
BeanUtils
.
copyProperties
(
dto
,
salesApPromotion
);
BeanUtils
.
copyProperties
(
dto
,
salesApPromotion
);
salesApPromotionMapper
.
putById
(
salesApPromotion
);
salesApPromotionMapper
.
putById
(
salesApPromotion
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论