Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
promotion-service
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
promotion
promotion-service
Commits
6276b643
提交
6276b643
authored
4月 10, 2025
作者:
000516
提交者:
Coding
4月 10, 2025
浏览文件
操作
浏览文件
下载
差异文件
在勤策APP - CP计划中,进行稽核任务创建;
Merge Request: 在勤策APP - CP计划中,进行稽核任务创建; Created By: @李秋林 Accepted By: @李秋林 URL:
https://g-pkkp8204.coding.net/p/promotion/d/promotion-service/git/merge/268?initial=true
上级
edf43d1f
124644d7
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
87 行增加
和
62 行删除
+87
-62
ExaPlanCoreController.java
...on/controller/activity/examine/ExaPlanCoreController.java
+12
-9
ActivityExamineDao.java
...aolu/promotion/domain/examine/dao/ActivityExamineDao.java
+2
-2
ActivityExamineDaoImpl.java
...otion/domain/examine/dao/impl/ActivityExamineDaoImpl.java
+24
-10
ActivityExamineDO.java
...otion/domain/examine/mapper/entity/ActivityExamineDO.java
+0
-11
PlanStatus.java
.../java/com/wangxiaolu/promotion/enums/plan/PlanStatus.java
+9
-0
ActivityExamineDto.java
...omotion/pojo/activity/examine/dto/ActivityExamineDto.java
+2
-12
ExaPlanVo.java
...gxiaolu/promotion/pojo/activity/examine/vo/ExaPlanVo.java
+11
-11
ExaPlanCoreService.java
...romotion/service/activity/examine/ExaPlanCoreService.java
+2
-2
ExaPlanCoreServiceImpl.java
...service/activity/examine/impl/ExaPlanCoreServiceImpl.java
+25
-5
没有找到文件。
src/main/java/com/wangxiaolu/promotion/controller/activity/examine/ExaPlanCoreController.java
浏览文件 @
6276b643
package
com
.
wangxiaolu
.
promotion
.
controller
.
activity
.
examine
;
import
com.alibaba.fastjson.JSONObject
;
import
com.wangxiaolu.promotion.enums.plan.PlanStatus
;
import
com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto
;
import
com.wangxiaolu.promotion.pojo.activity.examine.vo.ExaPlanVo
;
import
com.wangxiaolu.promotion.result.basedata.R
;
...
...
@@ -29,22 +31,23 @@ public class ExaPlanCoreController {
public
R
saveOne
(
@RequestBody
ExaPlanVo
exaPlanVo
)
{
ActivityExamineDto
examineDto
=
new
ActivityExamineDto
();
BeanUtils
.
copyProperties
(
exaPlanVo
,
examineDto
);
ActivityExamineDto
examineN
=
null
;
if
(
Objects
.
isNull
(
exaPlanVo
.
getId
()))
{
examineDto
.
setCreateBy
(
exaPlanVo
.
get
Oper
Name
());
saveOne
(
examineDto
);
examineDto
.
setCreateBy
(
exaPlanVo
.
get
Employee
Name
());
examineN
=
saveOne
(
examineDto
);
}
else
{
examineDto
.
setModifyBy
(
exaPlanVo
.
get
Oper
Name
());
updateById
(
examineDto
);
examineDto
.
setModifyBy
(
exaPlanVo
.
get
Employee
Name
());
examineN
=
updateById
(
examineDto
);
}
return
R
.
success
();
return
R
.
success
(
examineN
);
}
private
void
saveOne
(
ActivityExamineDto
examineDto
)
{
exaPlanCoreService
.
save
(
examineDto
);
private
ActivityExamineDto
saveOne
(
ActivityExamineDto
examineDto
)
{
return
exaPlanCoreService
.
save
(
examineDto
);
}
private
void
updateById
(
ActivityExamineDto
examineDto
)
{
exaPlanCoreService
.
updateById
(
examineDto
);
private
ActivityExamineDto
updateById
(
ActivityExamineDto
examineDto
)
{
return
exaPlanCoreService
.
updateById
(
examineDto
);
}
}
...
...
src/main/java/com/wangxiaolu/promotion/domain/examine/dao/ActivityExamineDao.java
浏览文件 @
6276b643
...
...
@@ -14,9 +14,9 @@ public interface ActivityExamineDao {
ActivityExamineDto
selectByPlanId
(
Long
planId
);
void
save
(
ActivityExamineDto
examineDto
);
ActivityExamineDto
save
(
ActivityExamineDto
examineDto
);
void
updateById
(
ActivityExamineDto
examineDto
);
ActivityExamineDto
updateById
(
ActivityExamineDto
examineDto
);
void
page
(
PageInfo
pageInfo
,
ExamineWrapper
wq
);
}
src/main/java/com/wangxiaolu/promotion/domain/examine/dao/impl/ActivityExamineDaoImpl.java
浏览文件 @
6276b643
package
com
.
wangxiaolu
.
promotion
.
domain
.
examine
.
dao
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson2.JSONArray
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.wangxiaolu.promotion.common.util.BeanUtils
;
...
...
@@ -31,36 +32,41 @@ public class ActivityExamineDaoImpl implements ActivityExamineDao {
@Override
public
ActivityExamineDto
selectById
(
Long
id
)
{
ActivityExamineDO
activityExamineDO
=
activityExamineMapper
.
selectById
(
id
);
return
BeanUtils
.
transitionDto
(
activityExamineDO
,
ActivityExamineDto
.
class
);
return
returnDo
(
activityExamineDO
);
}
@Override
public
ActivityExamineDto
selectByPlanId
(
Long
planId
)
{
ActivityExamineDO
examineDO
=
activityExamineMapper
.
selectByPlanId
(
planId
);
return
BeanUtils
.
transitionDto
(
examineDO
,
ActivityExamineDto
.
class
);
return
returnDo
(
examineDO
);
}
@Override
public
void
save
(
ActivityExamineDto
examineDto
)
{
public
ActivityExamineDto
save
(
ActivityExamineDto
examineDto
)
{
try
{
ActivityExamineDO
examineDO
=
new
ActivityExamineDO
();
BeanUtils
.
copyProperties
(
examineDto
,
examineDO
);
arrayToStringByDo
(
examineDO
,
examineDto
);
activityExamineMapper
.
insert
(
examineDO
);
ActivityExamineDO
examineDO1
=
activityExamineMapper
.
selectById
(
examineDO
.
getId
());
return
returnDo
(
examineDO1
);
}
catch
(
Exception
e
)
{
String
eMsg
=
e
.
getCause
().
getMessage
();
if
(
eMsg
.
contains
(
"for key 'plan_id_unique'"
))
{
throw
new
ParamException
(
RCode
.
DATA_HAVE_ERROR
);
}
return
null
;
}
}
@Override
public
void
updateById
(
ActivityExamineDto
examineDto
)
{
public
ActivityExamineDto
updateById
(
ActivityExamineDto
examineDto
)
{
ActivityExamineDO
examineDO
=
new
ActivityExamineDO
();
BeanUtils
.
copyProperties
(
examineDto
,
examineDO
);
arrayToStringByDo
(
examineDO
,
examineDto
);
activityExamineMapper
.
updateById
(
examineDO
);
ActivityExamineDO
examineDO1
=
activityExamineMapper
.
selectById
(
examineDO
.
getId
());
return
returnDo
(
examineDO1
);
}
@Override
...
...
@@ -84,11 +90,19 @@ public class ActivityExamineDaoImpl implements ActivityExamineDao {
}
private
void
arrayToStringByDo
(
ActivityExamineDO
examineDO
,
ActivityExamineDto
examineDto
){
examineDO
.
setReportedIds
(
JSONObject
.
toJSONString
(
examineDto
.
getReportedIds
()));
examineDO
.
setClockIds
(
JSONObject
.
toJSONString
(
examineDto
.
getClockIds
()));
examineDO
.
setTemWorkPhotos
(
JSONObject
.
toJSONString
(
examineDto
.
getTemWorkPhotos
()));
examineDO
.
setPosPhotos
(
JSONObject
.
toJSONString
(
examineDto
.
getPosPhotos
()));
private
ActivityExamineDto
returnDo
(
ActivityExamineDO
activityExamineDO
)
{
ActivityExamineDto
dto
=
BeanUtils
.
transitionDto
(
activityExamineDO
,
ActivityExamineDto
.
class
);
if
(
Objects
.
isNull
(
dto
)){
return
null
;
}
dto
.
setTemWorkPhotos
(
Objects
.
isNull
(
activityExamineDO
.
getTemWorkPhotos
())
?
null
:
JSONArray
.
parseArray
(
activityExamineDO
.
getTemWorkPhotos
()));
dto
.
setPosPhotos
(
Objects
.
isNull
(
activityExamineDO
.
getPosPhotos
())
?
null
:
JSONArray
.
parseArray
(
activityExamineDO
.
getPosPhotos
()));
return
dto
;
}
private
void
arrayToStringByDo
(
ActivityExamineDO
examineDO
,
ActivityExamineDto
examineDto
)
{
examineDO
.
setTemWorkPhotos
(
Objects
.
isNull
(
examineDto
.
getTemWorkPhotos
())
?
null
:
JSONObject
.
toJSONString
(
examineDto
.
getTemWorkPhotos
()));
examineDO
.
setPosPhotos
(
Objects
.
isNull
(
examineDto
.
getPosPhotos
())
?
null
:
JSONObject
.
toJSONString
(
examineDto
.
getPosPhotos
()));
}
}
src/main/java/com/wangxiaolu/promotion/domain/examine/mapper/entity/ActivityExamineDO.java
浏览文件 @
6276b643
...
...
@@ -51,17 +51,6 @@ public class ActivityExamineDO implements Serializable {
* 计划状态:执行/未执行
*/
private
String
planStatus
;
/**
* 上报ID
*/
private
String
reportedIds
;
/**
* 打卡ID
*/
private
String
clockIds
;
/**
* 所属战区名称
*/
...
...
src/main/java/com/wangxiaolu/promotion/enums/plan/PlanStatus.java
浏览文件 @
6276b643
...
...
@@ -20,6 +20,15 @@ public enum PlanStatus {
this
.
desc
=
desc
;
}
public
static
String
getDesc
(
Integer
code
)
{
for
(
PlanStatus
planStatus
:
PlanStatus
.
values
())
{
if
(
planStatus
.
getCode
().
equals
(
code
))
{
return
planStatus
.
desc
;
}
}
return
null
;
}
public
Integer
getCode
()
{
return
code
;
}
...
...
src/main/java/com/wangxiaolu/promotion/pojo/activity/examine/dto/ActivityExamineDto.java
浏览文件 @
6276b643
...
...
@@ -49,16 +49,6 @@ public class ActivityExamineDto {
*/
private
String
planStatus
;
/**
* 上报ID
*/
private
String
reportedIds
;
/**
* 打卡ID
*/
private
String
clockIds
;
/**
* 所属战区名称
*/
...
...
@@ -142,7 +132,7 @@ public class ActivityExamineDto {
/**
* 工作取证照片
*/
private
String
temWorkPhotos
;
private
JSONArray
temWorkPhotos
;
/**
* 特陈照
...
...
@@ -162,7 +152,7 @@ public class ActivityExamineDto {
/**
* pos照片
*/
private
String
posPhotos
;
private
JSONArray
posPhotos
;
/**
*
...
...
src/main/java/com/wangxiaolu/promotion/pojo/activity/examine/vo/ExaPlanVo.java
浏览文件 @
6276b643
...
...
@@ -50,52 +50,52 @@ public class ExaPlanVo {
/**
* 上报ID
*/
private
JSONArray
reportedIds
;
//
private JSONArray reportedIds;
/**
* 打卡ID
*/
private
JSONArray
clockIds
;
//
private JSONArray clockIds;
/**
* 所属战区名称
*/
private
String
deptQcOrgName
;
//
private String deptQcOrgName;
/**
* 负责人姓名
*/
private
String
manageName
;
//
private String manageName;
/**
* 执行城市
*/
private
String
city
;
//
private String city;
/**
* 计划日期
*/
private
Date
planDate
;
//
private Date planDate;
/**
* 系统名称
*/
private
String
lineName
;
//
private String lineName;
/**
* 门店名称
*/
private
String
storeName
;
//
private String storeName;
/**
* 经销商名称
*/
private
String
dealerName
;
//
private String dealerName;
/**
* 活动模式
*/
private
String
pattern
;
//
private String pattern;
/**
* 门头照
...
...
@@ -159,5 +159,5 @@ public class ExaPlanVo {
/**
* 操作人
*/
private
String
operName
;
//
private String operName;
}
src/main/java/com/wangxiaolu/promotion/service/activity/examine/ExaPlanCoreService.java
浏览文件 @
6276b643
...
...
@@ -8,7 +8,7 @@ import com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto;
* @describe :
*/
public
interface
ExaPlanCoreService
{
void
save
(
ActivityExamineDto
examineDto
);
ActivityExamineDto
save
(
ActivityExamineDto
examineDto
);
void
updateById
(
ActivityExamineDto
examineDto
);
ActivityExamineDto
updateById
(
ActivityExamineDto
examineDto
);
}
src/main/java/com/wangxiaolu/promotion/service/activity/examine/impl/ExaPlanCoreServiceImpl.java
浏览文件 @
6276b643
package
com
.
wangxiaolu
.
promotion
.
service
.
activity
.
examine
.
impl
;
import
com.wangxiaolu.promotion.domain.activityplanv2.dao.ActivityPlanInfoDao
;
import
com.wangxiaolu.promotion.domain.examine.dao.ActivityExamineDao
;
import
com.wangxiaolu.promotion.exception.ParamException
;
import
com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto
;
import
com.wangxiaolu.promotion.pojo.activity.planv2.dto.ActivityPlanInfoDto
;
import
com.wangxiaolu.promotion.result.basedata.RCode
;
import
com.wangxiaolu.promotion.service.activity.examine.ExaPlanCoreService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Objects
;
/**
* @author : liqiulin
* @date : 2025-04-02 15
...
...
@@ -16,15 +22,29 @@ public class ExaPlanCoreServiceImpl implements ExaPlanCoreService {
@Autowired
private
ActivityExamineDao
activityExamineDao
;
@Autowired
private
ActivityPlanInfoDao
activityPlanInfoDao
;
@Override
public
void
save
(
ActivityExamineDto
examineDto
)
{
activityExamineDao
.
save
(
examineDto
);
public
ActivityExamineDto
save
(
ActivityExamineDto
examineDto
)
{
// 根据促销计划id得到详情并补充
ActivityPlanInfoDto
planInfoDto
=
activityPlanInfoDao
.
selectById
(
examineDto
.
getPlanId
());
if
(
Objects
.
isNull
(
planInfoDto
))
{
throw
new
ParamException
(
RCode
.
ACTIVITY_PLAN_IS_NULL
);
}
examineDto
.
setDeptQcOrgName
(
planInfoDto
.
getOrgName
());
examineDto
.
setManageName
(
planInfoDto
.
getEmployeeName
());
examineDto
.
setCity
(
planInfoDto
.
getCity
());
examineDto
.
setPlanDate
(
planInfoDto
.
getDate
());
examineDto
.
setLineName
(
planInfoDto
.
getLineName
());
examineDto
.
setStoreName
(
planInfoDto
.
getStoreName
());
examineDto
.
setDealerName
(
planInfoDto
.
getDealerName
());
examineDto
.
setPattern
(
planInfoDto
.
getPattern
());
return
activityExamineDao
.
save
(
examineDto
);
}
@Override
public
void
updateById
(
ActivityExamineDto
examineDto
)
{
activityExamineDao
.
updateById
(
examineDto
);
public
ActivityExamineDto
updateById
(
ActivityExamineDto
examineDto
)
{
return
activityExamineDao
.
updateById
(
examineDto
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论