Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
promotion-service
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
promotion
promotion-service
Commits
b87acfcc
提交
b87acfcc
authored
1月 09, 2026
作者:
窦馨雨
浏览文件
操作
浏览文件
下载
差异文件
合并分支 'qa' 到 'master'
新增CP稽查接口改造 查看合并请求
!56
上级
424bf62f
924008a1
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
30 个修改的文件
包含
1206 行增加
和
27 行删除
+1206
-27
pom.xml
pom.xml
+4
-0
ExaPlanCoreController.java
...on/controller/activity/examine/ExaPlanCoreController.java
+28
-11
ExaPlanQueryController.java
...n/controller/activity/examine/ExaPlanQueryController.java
+8
-2
TemporaryActivityCoreController.java
...r/activity/temporary/TemporaryActivityCoreController.java
+1
-1
PromPlanQueryController.java
...on/controller/activityplanv2/PromPlanQueryController.java
+2
-1
TemporaryInfoQueryController.java
...ion/controller/user/tem/TemporaryInfoQueryController.java
+16
-4
ActivityPlanInfoDao.java
...motion/domain/activityplanv2/dao/ActivityPlanInfoDao.java
+11
-0
ActivityPlanInfoDaoImpl.java
...main/activityplanv2/dao/impl/ActivityPlanInfoDaoImpl.java
+30
-3
ActivityExamineMapper.java
...romotion/domain/examine/mapper/ActivityExamineMapper.java
+1
-1
InspectionInfoDao.java
...lu/promotion/domain/inspection/dao/InspectionInfoDao.java
+24
-0
InspectionInfoDaoImpl.java
...ion/domain/inspection/dao/impl/InspectionInfoDaoImpl.java
+178
-0
InspectionInfoMapper.java
...motion/domain/inspection/mapper/InspectionInfoMapper.java
+20
-0
InspectionInfoDO.java
...ion/domain/inspection/mapper/entity/InspectionInfoDO.java
+0
-0
InspectionInfoWrapper.java
...tion/domain/inspection/wrapper/InspectionInfoWrapper.java
+40
-0
TemporaryInfoDO.java
.../promotion/domain/user/mapper/entity/TemporaryInfoDO.java
+9
-0
InspectionInfoDto.java
...n/pojo/activity/inspectionInfo/dto/InspectionInfoDto.java
+301
-0
InspectionInfoVO.java
...ion/pojo/activity/inspectionInfo/vo/InspectionInfoVO.java
+266
-0
ActivityResponse.java
...otion/pojo/activity/planv2/response/ActivityResponse.java
+3
-1
TemporaryActivityReportedDto.java
.../activity/temporary/dto/TemporaryActivityReportedDto.java
+19
-0
TemporaryActivityDataVo.java
...n/pojo/activity/temporary/vo/TemporaryActivityDataVo.java
+20
-0
WxTemporaryInfoDto.java
...angxiaolu/promotion/pojo/user/dto/WxTemporaryInfoDto.java
+8
-0
TemporaryRegisterVo.java
...angxiaolu/promotion/pojo/user/vo/TemporaryRegisterVo.java
+35
-0
WxTemporaryEnrollVo.java
...angxiaolu/promotion/pojo/user/vo/WxTemporaryEnrollVo.java
+11
-0
ExaPlanCoreService.java
...romotion/service/activity/examine/ExaPlanCoreService.java
+5
-0
ExaPlanQueryService.java
...omotion/service/activity/examine/ExaPlanQueryService.java
+7
-0
ExaPlanCoreServiceImpl.java
...service/activity/examine/impl/ExaPlanCoreServiceImpl.java
+29
-0
ExaPlanQueryServiceImpl.java
...ervice/activity/examine/impl/ExaPlanQueryServiceImpl.java
+21
-0
WeChatUserQueryService.java
...aolu/promotion/service/wechat/WeChatUserQueryService.java
+6
-0
WeChatUserQueryServiceImpl.java
...otion/service/wechat/impl/WeChatUserQueryServiceImpl.java
+11
-3
InspectionInfoMapper.xml
...main/resources/mapper/inspection/InspectionInfoMapper.xml
+92
-0
没有找到文件。
pom.xml
浏览文件 @
b87acfcc
...
...
@@ -275,6 +275,10 @@
<artifactId>
jackson-databind
</artifactId>
<version>
2.11.4
</version>
<!-- 与SpringBoot版本兼容的版本 -->
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-actuator-autoconfigure
</artifactId>
</dependency>
</dependencies>
<build>
...
...
src/main/java/com/wangxiaolu/promotion/controller/activity/examine/ExaPlanCoreController.java
浏览文件 @
b87acfcc
package
com
.
wangxiaolu
.
promotion
.
controller
.
activity
.
examine
;
import
com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto
;
import
com.wangxiaolu.promotion.pojo.activity.examine.vo.ExaPlanVo
;
import
com.wangxiaolu.promotion.pojo.activity.inspectionInfo.dto.InspectionInfoDto
;
import
com.wangxiaolu.promotion.pojo.activity.inspectionInfo.vo.InspectionInfoVO
;
import
com.wangxiaolu.promotion.result.basedata.R
;
import
com.wangxiaolu.promotion.service.activity.examine.ExaPlanCoreService
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -25,19 +28,33 @@ public class ExaPlanCoreController {
@Autowired
private
ExaPlanCoreService
exaPlanCoreService
;
// @PostMapping("/save")
// 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.getEmployeeName());
// examineN = saveOne(examineDto);
// } else {
// examineDto.setModifyBy(exaPlanVo.getEmployeeName());
// examineN = updateById(examineDto);
// }
// return R.success(examineN);
// }
@PostMapping
(
"/save"
)
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
.
getEmployeeName
());
examineN
=
saveOne
(
examineDto
);
public
R
saveOne
(
@RequestBody
InspectionInfoVO
inspectionInfoVO
)
{
InspectionInfoDto
inspectionInfoDto
=
new
InspectionInfoDto
();
BeanUtils
.
copyProperties
(
inspectionInfoVO
,
inspectionInfoDto
);
InspectionInfoDto
inspection
=
null
;
if
(
Objects
.
isNull
(
inspectionInfoVO
.
getId
()))
{
inspection
=
exaPlanCoreService
.
saveV2
(
inspectionInfoDto
);
}
else
{
examineDto
.
setModifyBy
(
exaPlanVo
.
getEmployeeName
());
examineN
=
updateById
(
examineDto
);
inspection
=
exaPlanCoreService
.
updateByIdV2
(
inspectionInfoDto
);
}
return
R
.
success
(
examineN
);
return
R
.
success
(
inspection
);
}
private
ActivityExamineDto
saveOne
(
ActivityExamineDto
examineDto
)
{
...
...
src/main/java/com/wangxiaolu/promotion/controller/activity/examine/ExaPlanQueryController.java
浏览文件 @
b87acfcc
...
...
@@ -2,6 +2,7 @@ package com.wangxiaolu.promotion.controller.activity.examine;
import
com.wangxiaolu.promotion.pojo.PageInfo
;
import
com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto
;
import
com.wangxiaolu.promotion.pojo.activity.inspectionInfo.dto.InspectionInfoDto
;
import
com.wangxiaolu.promotion.result.basedata.R
;
import
com.wangxiaolu.promotion.service.activity.examine.ExaPlanQueryService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -21,15 +22,20 @@ public class ExaPlanQueryController {
@Autowired
private
ExaPlanQueryService
exaPlanQueryService
;
@GetMapping
(
"/{id}"
)
public
R
selectById
(
@PathVariable
@PathParam
(
"id"
)
Long
id
)
{
ActivityExamineDto
examineDto
=
exaPlanQueryService
.
selectById
(
id
);
return
R
.
success
(
examineDto
);
if
(
examineDto
!=
null
)
{
return
R
.
success
(
examineDto
);
}
InspectionInfoDto
inspectionInfoDto
=
exaPlanQueryService
.
selectNewByID
(
id
);
return
R
.
success
(
inspectionInfoDto
);
}
@PostMapping
(
"/page"
)
public
R
page
(
@RequestBody
PageInfo
pageInfo
){
exaPlanQueryService
.
page
(
pageInfo
);
exaPlanQueryService
.
page
V2
(
pageInfo
);
return
R
.
success
(
pageInfo
);
}
...
...
src/main/java/com/wangxiaolu/promotion/controller/activity/temporary/TemporaryActivityCoreController.java
浏览文件 @
b87acfcc
package
com
.
wangxiaolu
.
promotion
.
controller
.
activity
.
temporary
;
import
com.wangxiaolu.promotion.domain.user.dao.TemporaryInfoDao
;
import
com.wangxiaolu.promotion.enums.activity.TemActApproveStatus
;
import
com.wangxiaolu.promotion.exception.DataException
;
import
com.wangxiaolu.promotion.exception.ParamException
;
...
...
@@ -53,7 +54,6 @@ public class TemporaryActivityCoreController {
TemporaryActivityReportedDto
temActDto
=
new
TemporaryActivityReportedDto
();
BeanUtils
.
copyProperties
(
activityVo
,
temActDto
);
temActDto
.
setId
(
activityVo
.
getActivityReportedId
());
/**
* 已有id,修改任务
*/
...
...
src/main/java/com/wangxiaolu/promotion/controller/activityplanv2/PromPlanQueryController.java
浏览文件 @
b87acfcc
...
...
@@ -5,6 +5,7 @@ import com.wangxiaolu.promotion.domain.activity.wrapperQo.TemporaryActivityWrapp
import
com.wangxiaolu.promotion.domain.activity.wrapperQo.TemporaryClockWrapper
;
import
com.wangxiaolu.promotion.pojo.PageInfo
;
import
com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto
;
import
com.wangxiaolu.promotion.pojo.activity.inspectionInfo.dto.InspectionInfoDto
;
import
com.wangxiaolu.promotion.pojo.activity.planv2.response.ActivityResponse
;
import
com.wangxiaolu.promotion.pojo.activity.temporary.dto.TemporaryActivityReportedDto
;
import
com.wangxiaolu.promotion.pojo.activity.temporary.dto.TemporaryClockDto
;
...
...
@@ -53,7 +54,7 @@ public class PromPlanQueryController {
// 查询计划
ActivityResponse
activityResponse
=
promPlanQueryService
.
queryPlanById
(
id
);
// 查询当前计划是否被稽查
ActivityExamineDto
examineDto
=
exaPlanQueryService
.
selectByPlanId
(
id
);
InspectionInfoDto
examineDto
=
exaPlanQueryService
.
selectByPlanIdV2
(
id
);
activityResponse
.
setExamine
(
examineDto
);
// 查询促销上报任务
List
<
TemporaryActivityReportedDto
>
reportedDtos
=
temporaryActivityQueryService
.
findListByPlan
(
id
);
...
...
src/main/java/com/wangxiaolu/promotion/controller/user/tem/TemporaryInfoQueryController.java
浏览文件 @
b87acfcc
...
...
@@ -4,6 +4,7 @@ import com.wangxiaolu.promotion.common.redis.service.RedisCache;
import
com.wangxiaolu.promotion.common.util.DataUtils
;
import
com.wangxiaolu.promotion.exception.ParamException
;
import
com.wangxiaolu.promotion.pojo.user.vo.LoginVo
;
import
com.wangxiaolu.promotion.pojo.user.vo.TemporaryRegisterVo
;
import
com.wangxiaolu.promotion.pojo.user.vo.WxTemporaryLoginVo
;
import
com.wangxiaolu.promotion.result.basedata.R
;
import
com.wangxiaolu.promotion.result.basedata.RCode
;
...
...
@@ -11,10 +12,8 @@ import com.wangxiaolu.promotion.service.wechat.WeChatUserQueryService;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.web.bind.annotation.*
;
/**
* @author : liqiulin
...
...
@@ -57,6 +56,7 @@ public class TemporaryInfoQueryController {
}
/**
* 促销员信息查询
*/
...
...
@@ -70,9 +70,21 @@ public class TemporaryInfoQueryController {
// return R.success(userJson);
// }
/**
* 注册时获取门店列表
* @param temporaryRegisterVo 临时注册信息
* @return 门店列表
*/
@PostMapping
(
"/temporary/findStoreList"
)
public
R
findStoreList
(
@RequestBody
TemporaryRegisterVo
temporaryRegisterVo
)
{
return
R
.
success
(
weChatUserQueryService
.
findStoreList
(
temporaryRegisterVo
));
}
private
void
phontAndOpenIdVerify
(
WxTemporaryLoginVo
wxTemporaryLoginVo
)
{
if
(
StringUtils
.
isBlank
(
wxTemporaryLoginVo
.
getOpenId
())
||
StringUtils
.
isBlank
(
wxTemporaryLoginVo
.
getPhone
()))
{
throw
new
ParamException
(
RCode
.
LOGIN_PARAM_ERROR
,
null
);
}
}
}
src/main/java/com/wangxiaolu/promotion/domain/activityplanv2/dao/ActivityPlanInfoDao.java
浏览文件 @
b87acfcc
package
com
.
wangxiaolu
.
promotion
.
domain
.
activityplanv2
.
dao
;
import
com.alibaba.fastjson.JSONArray
;
import
com.wangxiaolu.promotion.domain.activityplanv2.mapper.entity.ActivityPlanInfoDo
;
import
com.wangxiaolu.promotion.domain.manage.wrapperQo.ActivityPlanInfoWrapper
;
import
com.wangxiaolu.promotion.enums.plan.PlanStatus
;
import
com.wangxiaolu.promotion.pojo.PageInfo
;
import
com.wangxiaolu.promotion.pojo.activity.planv2.dto.ActivityPlanInfoDto
;
import
com.wangxiaolu.promotion.pojo.user.vo.TemporaryRegisterVo
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author : liqiulin
...
...
@@ -36,4 +39,12 @@ public interface ActivityPlanInfoDao {
void
updatePlanStatus
(
Long
planId
,
PlanStatus
planStatus
);
void
updateByIds
(
List
<
Long
>
planIds
,
ActivityPlanInfoDto
planDto
);
/**
* 根据位置信息查询当前月份的促销门店
* @param temporaryRegisterVo 查询条件参数
* @return 门店信息列表
*/
List
<
Map
<
String
,
String
>>
findThisMonthStoreListByLocation
(
TemporaryRegisterVo
temporaryRegisterVo
);
}
src/main/java/com/wangxiaolu/promotion/domain/activityplanv2/dao/impl/ActivityPlanInfoDaoImpl.java
浏览文件 @
b87acfcc
...
...
@@ -14,6 +14,7 @@ import com.wangxiaolu.promotion.exception.DataException;
import
com.wangxiaolu.promotion.exception.FlowException
;
import
com.wangxiaolu.promotion.pojo.PageInfo
;
import
com.wangxiaolu.promotion.pojo.activity.planv2.dto.ActivityPlanInfoDto
;
import
com.wangxiaolu.promotion.pojo.user.vo.TemporaryRegisterVo
;
import
com.wangxiaolu.promotion.result.basedata.RCode
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.exceptions.PersistenceException
;
...
...
@@ -22,9 +23,8 @@ import org.springframework.stereotype.Service;
import
java.time.LocalDateTime
;
import
java.time.LocalTime
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* @author : liqiulin
...
...
@@ -126,6 +126,33 @@ public class ActivityPlanInfoDaoImpl implements ActivityPlanInfoDao {
errorMoreDate
(
planIds
);
activityPlanInfoMapper
.
updateIsDelete
(
planIds
,
operNo
);
}
/**
* 根据地理位置信息查询本店本月门店列表
* @param temporaryRegisterVo 查询条件参数
* @return 门店列表
*/
@Override
public
List
<
Map
<
String
,
String
>>
findThisMonthStoreListByLocation
(
TemporaryRegisterVo
temporaryRegisterVo
)
{
LambdaQueryWrapper
<
ActivityPlanInfoDo
>
qw
=
new
LambdaQueryWrapper
<>();
qw
.
likeRight
(
ActivityPlanInfoDo:
:
getDate
,
temporaryRegisterVo
.
getMonth
());
if
(
StringUtils
.
isNotBlank
(
temporaryRegisterVo
.
getProvince
())){
qw
.
eq
(
ActivityPlanInfoDo:
:
getProvince
,
temporaryRegisterVo
.
getProvince
());
}
if
(
StringUtils
.
isNotBlank
(
temporaryRegisterVo
.
getCity
())){
qw
.
eq
(
ActivityPlanInfoDo:
:
getCity
,
temporaryRegisterVo
.
getCity
());
}
List
<
ActivityPlanInfoDo
>
activityPlanInfoDoList
=
activityPlanInfoMapper
.
selectList
(
qw
);
List
<
Map
<
String
,
String
>>
resultList
=
activityPlanInfoDoList
.
stream
().
map
(
activityPlanInfoDo
->
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"storeCode"
,
activityPlanInfoDo
.
getStoreCode
());
map
.
put
(
"storeName"
,
activityPlanInfoDo
.
getStoreName
());
return
map
;
}).
collect
(
Collectors
.
toList
());
return
resultList
;
}
private
LambdaQueryWrapper
<
ActivityPlanInfoDo
>
buildWrapper
(
ActivityPlanInfoWrapper
wrapper
)
{
LambdaQueryWrapper
<
ActivityPlanInfoDo
>
qw
=
new
LambdaQueryWrapper
<>();
if
(
wrapper
.
rangeDate
()){
...
...
src/main/java/com/wangxiaolu/promotion/domain/examine/mapper/ActivityExamineMapper.java
浏览文件 @
b87acfcc
...
...
@@ -3,7 +3,7 @@ package com.wangxiaolu.promotion.domain.examine.mapper;
import
com.wangxiaolu.promotion.domain.examine.mapper.entity.ActivityExamineDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
/**
* @author a02200059
...
...
src/main/java/com/wangxiaolu/promotion/domain/inspection/dao/InspectionInfoDao.java
0 → 100644
浏览文件 @
b87acfcc
package
com
.
wangxiaolu
.
promotion
.
domain
.
inspection
.
dao
;
import
com.wangxiaolu.promotion.domain.inspection.wrapper.InspectionInfoWrapper
;
import
com.wangxiaolu.promotion.pojo.PageInfo
;
import
com.wangxiaolu.promotion.pojo.activity.inspectionInfo.dto.InspectionInfoDto
;
/**
* @author DouXinYu
* @description 针对表【inspection_info(稽查信息表)】的数据库操作Service
* @createDate 2026-01-08 17:03:39
*/
public
interface
InspectionInfoDao
{
InspectionInfoDto
selectById
(
Long
id
);
InspectionInfoDto
selectByPlanId
(
Long
planId
);
InspectionInfoDto
save
(
InspectionInfoDto
inspectionInfoDto
);
InspectionInfoDto
updateById
(
InspectionInfoDto
inspectionInfoDto
);
void
page
(
PageInfo
pageInfo
,
InspectionInfoWrapper
wrapper
);
}
\ No newline at end of file
src/main/java/com/wangxiaolu/promotion/domain/inspection/dao/impl/InspectionInfoDaoImpl.java
0 → 100644
浏览文件 @
b87acfcc
package
com
.
wangxiaolu
.
promotion
.
domain
.
inspection
.
dao
.
impl
;
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
;
import
com.wangxiaolu.promotion.domain.inspection.dao.InspectionInfoDao
;
import
com.wangxiaolu.promotion.domain.inspection.mapper.InspectionInfoMapper
;
import
com.wangxiaolu.promotion.domain.inspection.mapper.entity.InspectionInfoDO
;
import
com.wangxiaolu.promotion.domain.inspection.wrapper.InspectionInfoWrapper
;
import
com.wangxiaolu.promotion.exception.ParamException
;
import
com.wangxiaolu.promotion.pojo.PageInfo
;
import
com.wangxiaolu.promotion.pojo.activity.inspectionInfo.dto.InspectionInfoDto
;
import
com.wangxiaolu.promotion.result.basedata.RCode
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.StringUtils
;
import
java.util.Objects
;
/**
* @author DouXinYu
* @description 针对表【inspection_info(稽查信息表)】的数据库操作Service实现
* @createDate 2026-01-08 17:03:39
*/
@Service
public
class
InspectionInfoDaoImpl
implements
InspectionInfoDao
{
@Autowired
private
InspectionInfoMapper
inspectionInfoMapper
;
/**
* 根据ID查询稽查信息
* @param id 稽核ID
* @return 稽查信息DTO
*/
@Override
public
InspectionInfoDto
selectById
(
Long
id
)
{
InspectionInfoDO
inspectionInfoDO
=
inspectionInfoMapper
.
selectById
(
id
);
return
convertDoToDto
(
inspectionInfoDO
);
}
/**
* 根据计划ID查询稽查信息
* @param planId 门店对应的计划ID
* @return 稽查信息DTO
*/
@Override
public
InspectionInfoDto
selectByPlanId
(
Long
planId
)
{
InspectionInfoDO
inspectionInfoDO
=
inspectionInfoMapper
.
selectByPlanId
(
planId
);
return
convertDoToDto
(
inspectionInfoDO
);
}
/**
* 保存稽查信息
* @param inspectionDto 稽查信息DTO
* @return 保存后的稽查信息DTO
*/
@Override
public
InspectionInfoDto
save
(
InspectionInfoDto
inspectionDto
)
{
try
{
InspectionInfoDO
inspectionDO
=
new
InspectionInfoDO
();
// 拷贝基础属性
BeanUtils
.
copyProperties
(
inspectionDto
,
inspectionDO
);
// 处理JSON数组类型字段(照片链接)
convertArrayToString
(
inspectionDO
,
inspectionDto
);
// 插入数据库
inspectionInfoMapper
.
insert
(
inspectionDO
);
// 查询插入后的完整数据并返回
InspectionInfoDO
savedDO
=
inspectionInfoMapper
.
selectById
(
inspectionDO
.
getId
());
return
convertDoToDto
(
savedDO
);
}
catch
(
Exception
e
)
{
String
eMsg
=
e
.
getCause
()
!=
null
?
e
.
getCause
().
getMessage
()
:
""
;
// 处理plan_id唯一键冲突(对应数据库plan_id_unique索引)
if
(
eMsg
.
contains
(
"for key 'plan_id_unique'"
))
{
throw
new
ParamException
(
RCode
.
DATA_HAVE_ERROR
);
}
return
null
;
}
}
/**
* 根据ID更新稽查信息
* @param inspectionDto 稽查信息DTO
* @return 更新后的稽查信息DTO
*/
@Override
public
InspectionInfoDto
updateById
(
InspectionInfoDto
inspectionDto
)
{
InspectionInfoDO
inspectionDO
=
new
InspectionInfoDO
();
// 拷贝基础属性
BeanUtils
.
copyProperties
(
inspectionDto
,
inspectionDO
);
// 处理JSON数组类型字段(照片链接)
convertArrayToString
(
inspectionDO
,
inspectionDto
);
// 更新数据库
inspectionInfoMapper
.
updateById
(
inspectionDO
);
// 查询更新后的完整数据并返回
InspectionInfoDO
updatedDO
=
inspectionInfoMapper
.
selectById
(
inspectionDO
.
getId
());
return
convertDoToDto
(
updatedDO
);
}
/**
* 分页查询稽查信息
* @param pageInfo 分页参数
* @param wrapper 查询条件封装
*/
@Override
public
void
page
(
PageInfo
pageInfo
,
InspectionInfoWrapper
wrapper
)
{
LambdaQueryWrapper
<
InspectionInfoDO
>
queryWrapper
=
buildQueryWrapper
(
wrapper
);
// 构建MyBatis-Plus分页对象
Page
<
InspectionInfoDO
>
page
=
new
Page
<>(
pageInfo
.
getPageNum
(),
pageInfo
.
getPageSize
());
// 执行分页查询
Page
<
InspectionInfoDO
>
doPage
=
inspectionInfoMapper
.
selectPage
(
page
,
queryWrapper
);
// 转换分页结果
pageInfo
.
pageCovert
(
doPage
);
pageInfo
.
setRecords
(
doPage
.
getRecords
());
}
/**
* 构建查询条件
* @param wrapper 查询条件封装类
* @return LambdaQueryWrapper
*/
private
LambdaQueryWrapper
<
InspectionInfoDO
>
buildQueryWrapper
(
InspectionInfoWrapper
wrapper
)
{
LambdaQueryWrapper
<
InspectionInfoDO
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
// 根据经销商ID查询
if
(
Objects
.
nonNull
(
wrapper
.
getDealerId
()))
{
queryWrapper
.
eq
(
InspectionInfoDO:
:
getDealerId
,
wrapper
.
getDealerId
());
}
// 根据门店编码查询
if
(
Objects
.
nonNull
(
wrapper
.
getStoreCode
()))
{
queryWrapper
.
eq
(
InspectionInfoDO:
:
getStoreCode
,
wrapper
.
getStoreCode
());
}
// 根据计划ID查询
if
(
Objects
.
nonNull
(
wrapper
.
getPlanId
()))
{
queryWrapper
.
eq
(
InspectionInfoDO:
:
getPlanId
,
wrapper
.
getPlanId
());
}
// 根据ID查询
if
(
Objects
.
nonNull
(
wrapper
.
getId
())){
queryWrapper
.
eq
(
InspectionInfoDO:
:
getId
,
wrapper
.
getId
());
}
// 根据门店名称模糊查询
if
(!
StringUtils
.
isEmpty
(
wrapper
.
getStoreName
())){
queryWrapper
.
like
(
InspectionInfoDO:
:
getStoreName
,
wrapper
.
getStoreName
());
}
return
queryWrapper
;
}
/**
* 将DO转换为DTO(处理JSON字段)
* @param inspectionInfoDO 数据库实体
* @return 前端展示DTO
*/
private
InspectionInfoDto
convertDoToDto
(
InspectionInfoDO
inspectionInfoDO
)
{
if
(
Objects
.
isNull
(
inspectionInfoDO
))
{
return
null
;
}
// 基础属性转换
InspectionInfoDto
dto
=
BeanUtils
.
transitionDto
(
inspectionInfoDO
,
InspectionInfoDto
.
class
);
// 处理JSON数组类型的照片字段(促销员在岗/离岗佐证照)
dto
.
setTemWorkPhotos
(
Objects
.
isNull
(
inspectionInfoDO
.
getTemWorkPhotos
())
?
null
:
JSONArray
.
parseArray
(
inspectionInfoDO
.
getTemWorkPhotos
()));
return
dto
;
}
/**
* 将DTO中的JSON数组转换为字符串(存入数据库)
* @param inspectionDO 数据库实体
* @param inspectionDto 前端传输DTO
*/
private
void
convertArrayToString
(
InspectionInfoDO
inspectionDO
,
InspectionInfoDto
inspectionDto
)
{
// 处理促销员在岗/离岗佐证照(JSONArray -> String)
inspectionDO
.
setTemWorkPhotos
(
Objects
.
isNull
(
inspectionDto
.
getTemWorkPhotos
())
?
null
:
JSONObject
.
toJSONString
(
inspectionDto
.
getTemWorkPhotos
()));
}
}
src/main/java/com/wangxiaolu/promotion/domain/inspection/mapper/InspectionInfoMapper.java
0 → 100644
浏览文件 @
b87acfcc
package
com
.
wangxiaolu
.
promotion
.
domain
.
inspection
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.wangxiaolu.promotion.domain.inspection.mapper.entity.InspectionInfoDO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Select
;
/**
* @author DouXinYu
* @description 针对表【inspection_info(稽查信息表)】的数据库操作Mapper
* @createDate 2026-01-08 17:03:39
*/
@Mapper
public
interface
InspectionInfoMapper
extends
BaseMapper
<
InspectionInfoDO
>
{
@Select
(
"select * from inspection_info where plan_id = #{planId}"
)
InspectionInfoDO
selectByPlanId
(
Long
planId
);
}
src/main/java/com/wangxiaolu/promotion/domain/inspection/mapper/entity/InspectionInfoDO.java
0 → 100644
浏览文件 @
b87acfcc
差异被折叠。
点击展开。
src/main/java/com/wangxiaolu/promotion/domain/inspection/wrapper/InspectionInfoWrapper.java
0 → 100644
浏览文件 @
b87acfcc
package
com
.
wangxiaolu
.
promotion
.
domain
.
inspection
.
wrapper
;
import
lombok.Data
;
/**
* @Author: DouXinYu
* @Date: 2026-01-08 17:17
* @Description:
*/
@Data
public
class
InspectionInfoWrapper
{
/**
* 当前稽核ID
*/
Long
id
;
/**
* 当前门店对应的计划
*/
Long
planId
;
/**
* 经销商代码
*/
private
String
dealerId
;
/**
* 经销商名称
*/
private
String
dealerName
;
/**
* 门店编码
*/
private
String
storeCode
;
/**
* 门店名称
*/
private
String
storeName
;
}
src/main/java/com/wangxiaolu/promotion/domain/user/mapper/entity/TemporaryInfoDO.java
浏览文件 @
b87acfcc
...
...
@@ -90,5 +90,14 @@ public class TemporaryInfoDO implements Serializable {
private
Date
modifyTime
;
/**
* 门店编号
*/
private
String
storeCode
;
/**
* 门店名称
*/
private
String
storeName
;
}
src/main/java/com/wangxiaolu/promotion/pojo/activity/inspectionInfo/dto/InspectionInfoDto.java
0 → 100644
浏览文件 @
b87acfcc
package
com
.
wangxiaolu
.
promotion
.
pojo
.
activity
.
inspectionInfo
.
dto
;
import
com.alibaba.fastjson2.JSONArray
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @Author: DouXinYu
* @Date: 2026-01-08 17:12
* @Description: 稽核信息表V2.0 数据模型
*/
@Data
public
class
InspectionInfoDto
{
/**
* 当前稽核ID
*/
private
Long
id
;
/**
* 当前门店对应的计划
*/
private
Long
planId
;
/**
* 所属战区名称
*/
private
String
depQcOrgName
;
/**
* 经销商代码
*/
private
String
dealerId
;
/**
* 经销商名称
*/
private
String
dealerName
;
/**
* 门店编码
*/
private
String
storeCode
;
/**
* 门店名称
*/
private
String
storeName
;
/**
* 门店地址
*/
private
String
addr
;
/**
* 当前稽查的活动形式
*/
private
String
pattern
;
/**
* 稽查店铺的日期
*/
private
Date
inspectionDate
;
/**
* 开始稽查的具体时间
*/
private
String
inspectionTime
;
/**
* 结束稽查离开店铺的时间
*/
private
String
leaveStoreTime
;
/**
* 促销员是否在岗的状态(是/否)
*/
private
String
onDutyStatus
;
/**
* 促销员的在岗率(百分比)
*/
private
BigDecimal
onDutyRate
;
/**
* 实际在岗的促销人员数量
*/
private
Integer
onDutyCount
;
/**
* 促销员当前是否在岗(是/否)
*/
private
String
isOnDuty
;
/**
* 促销员未在岗时电话拨出的时间
*/
private
String
offDutyCallTime
;
/**
* 电话是否接通(是/否)
*/
private
String
isCallConnected
;
/**
* 5分钟后再次拨打电话是否接通(是/否)
*/
private
String
isReconnectedAfter5min
;
/**
* 10分钟内是否返回岗位(是/否)
*/
private
String
isBackToWorkWithin10min
;
/**
* 本次稽查的总得分
*/
private
Integer
totalScore
;
/**
* 销售相关考核得分(满分50分)
*/
private
Integer
salesAssessmentScore
;
/**
* 促销相关考核得分(满分50分)
*/
private
Integer
promotionAssessmentScore
;
/**
* 是否有档期或特价活动得分(满分20分)
*/
private
Integer
hasSchedulePromotionScore
;
/**
* 地堆上是否陈列主推产品得分(满分8分)
*/
private
Integer
groundStackHasMainProductScore
;
/**
* 地堆上是否只陈列王小卤产品得分(满分8分)
*/
private
Integer
groundStackOnlyWangxiaoluScore
;
/**
* 地堆铺货是否饱满得分(满分4分)
*/
private
Integer
groundStackStockFullScore
;
/**
* 是否配备各类宣传物料得分(满分10分)
*/
private
Integer
hasPromotionMaterialsScore
;
/**
* 是否穿着王小卤品牌围裙得分(满分3分)
*/
private
Integer
wearsWangxiaoluApronScore
;
/**
* 是否准备试吃品得分(满分5分)
*/
private
Integer
hasTastingProductScore
;
/**
* 是否设置试吃台得分(满分3分)
*/
private
Integer
hasTastingTableScore
;
/**
* 是否准备试吃盘得分(满分3分)
*/
private
Integer
hasTastingPlateScore
;
/**
* 是否准备试吃杯得分(满分3分)
*/
private
Integer
hasTastingCupScore
;
/**
* 是否佩戴口罩和手套得分(满分3分)
*/
private
Integer
wearsMaskGlovesScore
;
/**
* 是否提供牙签加分(满分2分)
*/
private
Integer
hasToothpickBonusScore
;
/**
* 是否配备垃圾桶加分(满分2分)
*/
private
Integer
hasGarbageCanBonusScore
;
/**
* 是否知晓远距离招揽话术得分(满分5分)
*/
private
Integer
knowsDistanceSolicitSkillScore
;
/**
* 是否知晓黑鸭或卤香产品卖点得分(满分5分)
*/
private
Integer
knowsProductSellingPointsScore
;
/**
* 人流经过时是否主动迎接得分(满分5分)
*/
private
Integer
greetsCustomersActivelyScore
;
/**
* 是否讲解产品卖点推荐产品得分(满分3分)
*/
private
Integer
introducesProductScoresScore
;
/**
* 是否有促进销售的动作得分(满分2分)
*/
private
Integer
promotesSalesActivelyScore
;
/**
* 是否配置活动赠品得分(满分5分)
*/
private
Integer
hasPromotionGiftsScore
;
/**
* 是否主动销售非王小卤产品得分(满分5分)
*/
private
Integer
sellsNonWangxiaoluProductsScore
;
/**
* 促销活动的具体内容描述
*/
private
String
promotionActivityContent
;
/**
* 是否设置了地堆陈列(是/否)
*/
private
String
hasGroundStack
;
/**
* 是否有黑鸭产品陈列(是/否)
*/
private
String
hasBlackDuckDisplay
;
/**
* 是否有黑鸭产品试吃品(是/否)
*/
private
String
hasBlackDuckTasting
;
/**
* 其他品牌是否设置了试吃台(是/否)
*/
private
String
otherBrandHasTastingTable
;
/**
* 10分钟内经过促销人员的人流数量
*/
private
BigDecimal
pedestrianCountWithin10min
;
/**
* 试吃品的总数量
*/
private
BigDecimal
totalTastingProductCount
;
/**
* 按口味统计的试吃品数量
*/
private
String
tastingProductCountByFlavor
;
/**
* 其他品牌试吃台的佐证照片链接
*/
private
String
otherBrandTastingTableProofUrl
;
/**
* 销售非王小卤产品的佐证照片链接
*/
private
String
nonWangxiaoluSalesProofUrl
;
/**
* 门头照
*/
private
String
storePicture
;
/**
* 促销员在岗/离岗佐证照
*/
private
JSONArray
temWorkPhotos
;
/**
* 特殊陈列照片
*/
private
String
storeTcPhoto
;
/**
* 主货架照片
*/
private
String
storeZhiPhoto
;
}
src/main/java/com/wangxiaolu/promotion/pojo/activity/inspectionInfo/vo/InspectionInfoVO.java
0 → 100644
浏览文件 @
b87acfcc
package
com
.
wangxiaolu
.
promotion
.
pojo
.
activity
.
inspectionInfo
.
vo
;
import
com.alibaba.fastjson2.JSONArray
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @Author: DouXinYu
* @Date: 2026-01-08 17:14
* @Description: 稽核信息 V2.0 临时接收信息表
*/
@Data
public
class
InspectionInfoVO
{
/**
* 当前稽核ID
*/
private
Long
id
;
/**
* 当前门店对应的计划
*/
private
Long
planId
;
/**
* 稽查店铺的日期
*/
private
Date
inspectionDate
;
/**
* 开始稽查的具体时间
*/
private
String
inspectionTime
;
/**
* 结束稽查离开店铺的时间
*/
private
String
leaveStoreTime
;
/**
* 促销员是否在岗的状态(是/否)
*/
private
String
onDutyStatus
;
/**
* 促销员的在岗率(百分比)
*/
private
BigDecimal
onDutyRate
;
/**
* 实际在岗的促销人员数量
*/
private
Integer
onDutyCount
;
/**
* 促销员当前是否在岗(是/否)
*/
private
String
isOnDuty
;
/**
* 促销员未在岗时电话拨出的时间
*/
private
String
offDutyCallTime
;
/**
* 电话是否接通(是/否)
*/
private
String
isCallConnected
;
/**
* 5分钟后再次拨打电话是否接通(是/否)
*/
private
String
isReconnectedAfter5min
;
/**
* 10分钟内是否返回岗位(是/否)
*/
private
String
isBackToWorkWithin10min
;
/**
* 本次稽查的总得分
*/
private
Integer
totalScore
;
/**
* 销售相关考核得分(满分50分)
*/
private
Integer
salesAssessmentScore
;
/**
* 促销相关考核得分(满分50分)
*/
private
Integer
promotionAssessmentScore
;
/**
* 是否有档期或特价活动得分(满分20分)
*/
private
Integer
hasSchedulePromotionScore
;
/**
* 地堆上是否陈列主推产品得分(满分8分)
*/
private
Integer
groundStackHasMainProductScore
;
/**
* 地堆上是否只陈列王小卤产品得分(满分8分)
*/
private
Integer
groundStackOnlyWangxiaoluScore
;
/**
* 地堆铺货是否饱满得分(满分4分)
*/
private
Integer
groundStackStockFullScore
;
/**
* 是否配备各类宣传物料得分(满分10分)
*/
private
Integer
hasPromotionMaterialsScore
;
/**
* 是否穿着王小卤品牌围裙得分(满分3分)
*/
private
Integer
wearsWangxiaoluApronScore
;
/**
* 是否准备试吃品得分(满分5分)
*/
private
Integer
hasTastingProductScore
;
/**
* 是否设置试吃台得分(满分3分)
*/
private
Integer
hasTastingTableScore
;
/**
* 是否准备试吃盘得分(满分3分)
*/
private
Integer
hasTastingPlateScore
;
/**
* 是否准备试吃杯得分(满分3分)
*/
private
Integer
hasTastingCupScore
;
/**
* 是否佩戴口罩和手套得分(满分3分)
*/
private
Integer
wearsMaskGlovesScore
;
/**
* 是否提供牙签加分(满分2分)
*/
private
Integer
hasToothpickBonusScore
;
/**
* 是否配备垃圾桶加分(满分2分)
*/
private
Integer
hasGarbageCanBonusScore
;
/**
* 是否知晓远距离招揽话术得分(满分5分)
*/
private
Integer
knowsDistanceSolicitSkillScore
;
/**
* 是否知晓黑鸭或卤香产品卖点得分(满分5分)
*/
private
Integer
knowsProductSellingPointsScore
;
/**
* 人流经过时是否主动迎接得分(满分5分)
*/
private
Integer
greetsCustomersActivelyScore
;
/**
* 是否讲解产品卖点推荐产品得分(满分3分)
*/
private
Integer
introducesProductScoresScore
;
/**
* 是否有促进销售的动作得分(满分2分)
*/
private
Integer
promotesSalesActivelyScore
;
/**
* 是否配置活动赠品得分(满分5分)
*/
private
Integer
hasPromotionGiftsScore
;
/**
* 是否主动销售非王小卤产品得分(满分5分)
*/
private
Integer
sellsNonWangxiaoluProductsScore
;
/**
* 促销活动的具体内容描述
*/
private
String
promotionActivityContent
;
/**
* 是否设置了地堆陈列(是/否)
*/
private
String
hasGroundStack
;
/**
* 是否有黑鸭产品陈列(是/否)
*/
private
String
hasBlackDuckDisplay
;
/**
* 是否有黑鸭产品试吃品(是/否)
*/
private
String
hasBlackDuckTasting
;
/**
* 其他品牌是否设置了试吃台(是/否)
*/
private
String
otherBrandHasTastingTable
;
/**
* 10分钟内经过促销人员的人流数量
*/
private
BigDecimal
pedestrianCountWithin10min
;
/**
* 试吃品的总数量
*/
private
BigDecimal
totalTastingProductCount
;
/**
* 按口味统计的试吃品数量
*/
private
String
tastingProductCountByFlavor
;
/**
* 其他品牌试吃台的佐证照片链接
*/
private
String
otherBrandTastingTableProofUrl
;
/**
* 销售非王小卤产品的佐证照片链接
*/
private
String
nonWangxiaoluSalesProofUrl
;
/**
* 门头照
*/
private
String
storePicture
;
/**
* 促销员在岗/离岗佐证照
*/
private
JSONArray
temWorkPhotos
;
/**
* 特殊陈列照片
*/
private
String
storeTcPhoto
;
/**
* 主货架照片
*/
private
String
storeZhiPhoto
;
}
src/main/java/com/wangxiaolu/promotion/pojo/activity/planv2/response/ActivityResponse.java
浏览文件 @
b87acfcc
...
...
@@ -2,6 +2,7 @@ package com.wangxiaolu.promotion.pojo.activity.planv2.response;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto
;
import
com.wangxiaolu.promotion.pojo.activity.inspectionInfo.dto.InspectionInfoDto
;
import
com.wangxiaolu.promotion.pojo.activity.planv2.dto.ActivityPlanInfoDto
;
import
com.wangxiaolu.promotion.pojo.activity.temporary.dto.TemporaryActivityReportedDto
;
import
com.wangxiaolu.promotion.pojo.activity.temporary.dto.TemporaryClockDto
;
...
...
@@ -26,7 +27,8 @@ public class ActivityResponse {
List
<
ActivityReported
>
reporteds
;
ActivityExamineDto
examine
;
// ActivityExamineDto examine;
InspectionInfoDto
examine
;
@JsonIgnore
List
<
TemporaryActivityReportedDto
>
reportedDtos
;
...
...
src/main/java/com/wangxiaolu/promotion/pojo/activity/temporary/dto/TemporaryActivityReportedDto.java
浏览文件 @
b87acfcc
...
...
@@ -6,6 +6,7 @@ import lombok.Data;
import
lombok.NoArgsConstructor
;
import
lombok.experimental.Accessors
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -183,6 +184,24 @@ public class TemporaryActivityReportedDto {
* 1:有效;0:删除;
*/
private
Integer
isDelete
;
// 促销员联系电话
private
String
temporaryPhone
;
// 执行方式
private
String
executeModePlan
;
// 配发试吃品是否有黑鸭口味
private
String
hasBlackDuckFlavor
;
// 配发黑鸭试吃品(根)
private
Integer
blackDuckTastingNum
;
// 配发卤香试吃品(根)
private
Integer
braisedTastingNum
;
// 配发赠品个数
private
Integer
giftNum
;
// 推广活动销额(元)
private
BigDecimal
promotionSales
;
// 黑鸭销售(元)
private
BigDecimal
blackDuckSales
;
// 礼盒销售(元)
private
BigDecimal
giftBoxSales
;
public
void
approvedDataVerify
(){
...
...
src/main/java/com/wangxiaolu/promotion/pojo/activity/temporary/vo/TemporaryActivityDataVo.java
浏览文件 @
b87acfcc
...
...
@@ -6,6 +6,7 @@ import lombok.NoArgsConstructor;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
...
...
@@ -66,4 +67,23 @@ public class TemporaryActivityDataVo {
*/
private
List
<
String
>
psvPhotoUrls
;
private
List
<
String
>
psvChangePhotoUrls
;
// 促销员联系电话
private
String
temporaryPhone
;
// 执行方式
private
String
executeModePlan
;
// 配发试吃品是否有黑鸭口味
private
String
hasBlackDuckFlavor
;
// 配发黑鸭试吃品(根)
private
Integer
blackDuckTastingNum
;
// 配发卤香试吃品(根)
private
Integer
braisedTastingNum
;
// 配发赠品个数
private
Integer
giftNum
;
// 推广活动销额(元)
private
BigDecimal
promotionSales
;
// 黑鸭销售(元)
private
BigDecimal
blackDuckSales
;
// 礼盒销售(元)
private
BigDecimal
giftBoxSales
;
}
src/main/java/com/wangxiaolu/promotion/pojo/user/dto/WxTemporaryInfoDto.java
浏览文件 @
b87acfcc
...
...
@@ -82,4 +82,12 @@ public class WxTemporaryInfoDto {
* 创建时间
*/
Date
createTime
;
/**
* 所属门店编码
*/
String
storeCode
;
/**
* 所属门店名称
*/
String
storeName
;
}
src/main/java/com/wangxiaolu/promotion/pojo/user/vo/TemporaryRegisterVo.java
0 → 100644
浏览文件 @
b87acfcc
package
com
.
wangxiaolu
.
promotion
.
pojo
.
user
.
vo
;
import
lombok.Data
;
import
java.time.YearMonth
;
import
java.util.Date
;
/**
* @Author: DouXinYu
* @Date: 2026-01-09 14:06
* @Description: 临时人员注册获取门店下拉列表的参数
*/
@Data
public
class
TemporaryRegisterVo
{
/**
* 当前月份 YYYY-MM
*/
private
YearMonth
month
;
/**
* 省份
*/
private
String
province
;
/**
* 城市
*/
private
String
city
;
/**
* 区
*/
private
String
area
;
}
src/main/java/com/wangxiaolu/promotion/pojo/user/vo/WxTemporaryEnrollVo.java
浏览文件 @
b87acfcc
...
...
@@ -89,6 +89,17 @@ public class WxTemporaryEnrollVo {
*/
String
chargerName
;
/**
* 所属门店编码
*/
String
storeCode
;
/**
* 门店名称
*/
String
storeName
;
public
void
validate
()
{
if
(
StringUtils
.
isBlank
(
openId
))
{
throw
new
ParamException
(
RCode
.
WX_OPENID_PARAM_ERROR
,
null
);
...
...
src/main/java/com/wangxiaolu/promotion/service/activity/examine/ExaPlanCoreService.java
浏览文件 @
b87acfcc
package
com
.
wangxiaolu
.
promotion
.
service
.
activity
.
examine
;
import
com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto
;
import
com.wangxiaolu.promotion.pojo.activity.inspectionInfo.dto.InspectionInfoDto
;
/**
* @author : liqiulin
...
...
@@ -11,4 +12,8 @@ public interface ExaPlanCoreService {
ActivityExamineDto
save
(
ActivityExamineDto
examineDto
);
ActivityExamineDto
updateById
(
ActivityExamineDto
examineDto
);
InspectionInfoDto
saveV2
(
InspectionInfoDto
inspectionInfoDto
);
InspectionInfoDto
updateByIdV2
(
InspectionInfoDto
inspectionInfoDto
);
}
src/main/java/com/wangxiaolu/promotion/service/activity/examine/ExaPlanQueryService.java
浏览文件 @
b87acfcc
...
...
@@ -2,6 +2,7 @@ package com.wangxiaolu.promotion.service.activity.examine;
import
com.wangxiaolu.promotion.pojo.PageInfo
;
import
com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto
;
import
com.wangxiaolu.promotion.pojo.activity.inspectionInfo.dto.InspectionInfoDto
;
/**
* @author : liqiulin
...
...
@@ -14,4 +15,10 @@ public interface ExaPlanQueryService {
ActivityExamineDto
selectByPlanId
(
Long
planId
);
void
page
(
PageInfo
pageInfo
);
InspectionInfoDto
selectNewByID
(
Long
id
);
void
pageV2
(
PageInfo
pageInfo
);
InspectionInfoDto
selectByPlanIdV2
(
Long
id
);
}
src/main/java/com/wangxiaolu/promotion/service/activity/examine/impl/ExaPlanCoreServiceImpl.java
浏览文件 @
b87acfcc
...
...
@@ -2,8 +2,10 @@ 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.domain.inspection.dao.InspectionInfoDao
;
import
com.wangxiaolu.promotion.exception.ParamException
;
import
com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto
;
import
com.wangxiaolu.promotion.pojo.activity.inspectionInfo.dto.InspectionInfoDto
;
import
com.wangxiaolu.promotion.pojo.activity.planv2.dto.ActivityPlanInfoDto
;
import
com.wangxiaolu.promotion.result.basedata.RCode
;
import
com.wangxiaolu.promotion.service.activity.examine.ExaPlanCoreService
;
...
...
@@ -26,6 +28,9 @@ public class ExaPlanCoreServiceImpl implements ExaPlanCoreService {
@Autowired
private
ActivityPlanInfoDao
activityPlanInfoDao
;
@Autowired
private
InspectionInfoDao
inspectionInfoDao
;
@Override
public
ActivityExamineDto
save
(
ActivityExamineDto
examineDto
)
{
// 根据促销计划id得到详情并补充
...
...
@@ -50,8 +55,32 @@ public class ExaPlanCoreServiceImpl implements ExaPlanCoreService {
return
activityExamineDao
.
save
(
examineDto
);
}
@Override
public
InspectionInfoDto
saveV2
(
InspectionInfoDto
inspectionInfoDto
)
{
ActivityPlanInfoDto
activityPlanInfoDto
=
activityPlanInfoDao
.
selectById
(
inspectionInfoDto
.
getPlanId
());
if
(
Objects
.
isNull
(
activityPlanInfoDto
))
{
throw
new
ParamException
(
RCode
.
ACTIVITY_PLAN_IS_NULL
);
}
inspectionInfoDto
.
setDepQcOrgName
(
activityPlanInfoDto
.
getOrgName
());
inspectionInfoDto
.
setAddr
(
activityPlanInfoDto
.
getAddr
());
inspectionInfoDto
.
setDealerId
(
activityPlanInfoDto
.
getDealerId
());
inspectionInfoDto
.
setDealerName
(
activityPlanInfoDto
.
getDealerName
());
inspectionInfoDto
.
setStoreCode
(
activityPlanInfoDto
.
getStoreCode
());
inspectionInfoDto
.
setStoreName
(
activityPlanInfoDto
.
getStoreName
());
inspectionInfoDto
.
setPattern
(
activityPlanInfoDto
.
getPattern
());
return
inspectionInfoDao
.
save
(
inspectionInfoDto
);
}
@Override
public
InspectionInfoDto
updateByIdV2
(
InspectionInfoDto
inspectionInfoDto
)
{
return
inspectionInfoDao
.
updateById
(
inspectionInfoDto
);
}
@Override
public
ActivityExamineDto
updateById
(
ActivityExamineDto
examineDto
)
{
return
activityExamineDao
.
updateById
(
examineDto
);
}
}
src/main/java/com/wangxiaolu/promotion/service/activity/examine/impl/ExaPlanQueryServiceImpl.java
浏览文件 @
b87acfcc
...
...
@@ -3,8 +3,11 @@ package com.wangxiaolu.promotion.service.activity.examine.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.wangxiaolu.promotion.domain.examine.dao.ActivityExamineDao
;
import
com.wangxiaolu.promotion.domain.examine.wrapperQo.ExamineWrapper
;
import
com.wangxiaolu.promotion.domain.inspection.dao.InspectionInfoDao
;
import
com.wangxiaolu.promotion.domain.inspection.wrapper.InspectionInfoWrapper
;
import
com.wangxiaolu.promotion.pojo.PageInfo
;
import
com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto
;
import
com.wangxiaolu.promotion.pojo.activity.inspectionInfo.dto.InspectionInfoDto
;
import
com.wangxiaolu.promotion.service.activity.examine.ExaPlanQueryService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -20,6 +23,9 @@ public class ExaPlanQueryServiceImpl implements ExaPlanQueryService {
@Autowired
private
ActivityExamineDao
activityExamineDao
;
@Autowired
private
InspectionInfoDao
inspectionInfoDao
;
@Override
public
ActivityExamineDto
selectById
(
Long
id
)
{
return
activityExamineDao
.
selectById
(
id
);
...
...
@@ -36,4 +42,19 @@ public class ExaPlanQueryServiceImpl implements ExaPlanQueryService {
activityExamineDao
.
page
(
pageInfo
,
wq
);
}
@Override
public
InspectionInfoDto
selectNewByID
(
Long
id
)
{
return
inspectionInfoDao
.
selectById
(
id
);
}
@Override
public
void
pageV2
(
PageInfo
pageInfo
)
{
InspectionInfoWrapper
wq
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
pageInfo
.
getQueryParams
()),
InspectionInfoWrapper
.
class
);
inspectionInfoDao
.
page
(
pageInfo
,
wq
);
}
@Override
public
InspectionInfoDto
selectByPlanIdV2
(
Long
id
)
{
return
inspectionInfoDao
.
selectByPlanId
(
id
);
}
}
src/main/java/com/wangxiaolu/promotion/service/wechat/WeChatUserQueryService.java
浏览文件 @
b87acfcc
package
com
.
wangxiaolu
.
promotion
.
service
.
wechat
;
import
com.wangxiaolu.promotion.pojo.user.vo.LoginVo
;
import
com.wangxiaolu.promotion.pojo.user.vo.TemporaryRegisterVo
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author : liqiulin
...
...
@@ -12,4 +16,6 @@ public interface WeChatUserQueryService {
LoginVo
loginTemporaryByOpenIdAndPhone
(
String
openId
,
String
phone
);
LoginVo
temporaryLoginByPhone
(
String
phone
);
List
<
Map
<
String
,
String
>>
findStoreList
(
TemporaryRegisterVo
temporaryRegisterVo
);
}
src/main/java/com/wangxiaolu/promotion/service/wechat/impl/WeChatUserQueryServiceImpl.java
浏览文件 @
b87acfcc
...
...
@@ -6,18 +6,20 @@ import com.wangxiaolu.promotion.common.redis.RedisKeys;
import
com.wangxiaolu.promotion.common.redis.service.RedisCache
;
import
com.wangxiaolu.promotion.common.util.JwtTokenUtils
;
import
com.wangxiaolu.promotion.common.util.JwtUtils
;
import
com.wangxiaolu.promotion.domain.activityplanv2.dao.ActivityPlanInfoDao
;
import
com.wangxiaolu.promotion.domain.activityplanv2.mapper.entity.ActivityPlanInfoDo
;
import
com.wangxiaolu.promotion.domain.user.dao.TemporaryInfoDao
;
import
com.wangxiaolu.promotion.exception.DataException
;
import
com.wangxiaolu.promotion.pojo.user.dto.WxTemporaryInfoDto
;
import
com.wangxiaolu.promotion.pojo.user.vo.LoginVo
;
import
com.wangxiaolu.promotion.pojo.user.vo.TemporaryRegisterVo
;
import
com.wangxiaolu.promotion.result.basedata.RCode
;
import
com.wangxiaolu.promotion.service.wechat.WeChatUserQueryService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.w3c.dom.stylesheets.LinkStyle
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.*
;
/**
* @author : liqiulin
...
...
@@ -33,6 +35,8 @@ public class WeChatUserQueryServiceImpl implements WeChatUserQueryService {
RedisCache
redisCache
;
@Autowired
JwtUtils
jwtUtils
;
@Autowired
private
ActivityPlanInfoDao
activityPlanInfoDao
;
/**
* 根据openId、手机号登录
...
...
@@ -86,4 +90,8 @@ public class WeChatUserQueryServiceImpl implements WeChatUserQueryService {
return
loginVo
;
}
@Override
public
List
<
Map
<
String
,
String
>>
findStoreList
(
TemporaryRegisterVo
temporaryRegisterVo
)
{
return
activityPlanInfoDao
.
findThisMonthStoreListByLocation
(
temporaryRegisterVo
);
}
}
src/main/resources/mapper/inspection/InspectionInfoMapper.xml
0 → 100644
浏览文件 @
b87acfcc
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.wangxiaolu.promotion.domain.inspection.mapper.InspectionInfoMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wangxiaolu.promotion.domain.inspection.mapper.entity.InspectionInfoDO"
>
<!-- 1. 主键 & 大整数类型(bigint(20)) -->
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<result
property=
"planId"
column=
"plan_id"
jdbcType=
"BIGINT"
/>
<!-- 2. 字符串类型(varchar,不同长度统一映射为VARCHAR) -->
<result
property=
"depQcOrgName"
column=
"dep_qc_org_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"dealerId"
column=
"dealer_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"dealerName"
column=
"dealer_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"storeCode"
column=
"store_code"
jdbcType=
"VARCHAR"
/>
<result
property=
"storeName"
column=
"store_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"addr"
column=
"addr"
jdbcType=
"VARCHAR"
/>
<result
property=
"pattern"
column=
"pattern"
jdbcType=
"VARCHAR"
/>
<result
property=
"inspectionTime"
column=
"inspection_time"
jdbcType=
"VARCHAR"
/>
<result
property=
"leaveStoreTime"
column=
"leave_store_time"
jdbcType=
"VARCHAR"
/>
<result
property=
"onDutyStatus"
column=
"on_duty_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"isOnDuty"
column=
"is_on_duty"
jdbcType=
"VARCHAR"
/>
<result
property=
"offDutyCallTime"
column=
"off_duty_call_time"
jdbcType=
"VARCHAR"
/>
<result
property=
"isCallConnected"
column=
"is_call_connected"
jdbcType=
"VARCHAR"
/>
<result
property=
"isReconnectedAfter5min"
column=
"is_reconnected_after5min"
jdbcType=
"VARCHAR"
/>
<result
property=
"isBackToWorkWithin10min"
column=
"is_back_to_work_within10min"
jdbcType=
"VARCHAR"
/>
<result
property=
"promotionActivityContent"
column=
"promotion_activity_content"
jdbcType=
"VARCHAR"
/>
<result
property=
"hasGroundStack"
column=
"has_ground_stack"
jdbcType=
"VARCHAR"
/>
<result
property=
"hasBlackDuckDisplay"
column=
"has_black_duck_display"
jdbcType=
"VARCHAR"
/>
<result
property=
"hasBlackDuckTasting"
column=
"has_black_duck_tasting"
jdbcType=
"VARCHAR"
/>
<result
property=
"otherBrandHasTastingTable"
column=
"other_brand_has_tasting_table"
jdbcType=
"VARCHAR"
/>
<result
property=
"tastingProductCountByFlavor"
column=
"tasting_product_count_by_flavor"
jdbcType=
"VARCHAR"
/>
<result
property=
"otherBrandTastingTableProofUrl"
column=
"other_brand_tasting_table_proof_url"
jdbcType=
"VARCHAR"
/>
<result
property=
"nonWangxiaoluSalesProofUrl"
column=
"non_wangxiaolu_sales_proof_url"
jdbcType=
"VARCHAR"
/>
<result
property=
"storePicture"
column=
"store_picture"
jdbcType=
"VARCHAR"
/>
<result
property=
"storeTcPhoto"
column=
"store_tc_photo"
jdbcType=
"VARCHAR"
/>
<result
property=
"storeZhiPhoto"
column=
"store_zhi_photo"
jdbcType=
"VARCHAR"
/>
<!-- 3. 整数类型(int(11)) -->
<result
property=
"onDutyCount"
column=
"on_duty_count"
jdbcType=
"INTEGER"
/>
<result
property=
"totalScore"
column=
"total_score"
jdbcType=
"INTEGER"
/>
<result
property=
"salesAssessmentScore"
column=
"sales_assessment_score"
jdbcType=
"INTEGER"
/>
<result
property=
"promotionAssessmentScore"
column=
"promotion_assessment_score"
jdbcType=
"INTEGER"
/>
<result
property=
"hasSchedulePromotionScore"
column=
"has_schedule_promotion_score"
jdbcType=
"INTEGER"
/>
<result
property=
"groundStackHasMainProductScore"
column=
"ground_stack_has_main_product_score"
jdbcType=
"INTEGER"
/>
<result
property=
"groundStackOnlyWangxiaoluScore"
column=
"ground_stack_only_wangxiaolu_score"
jdbcType=
"INTEGER"
/>
<result
property=
"groundStackStockFullScore"
column=
"ground_stack_stock_full_score"
jdbcType=
"INTEGER"
/>
<result
property=
"hasPromotionMaterialsScore"
column=
"has_promotion_materials_score"
jdbcType=
"INTEGER"
/>
<result
property=
"wearsWangxiaoluApronScore"
column=
"wears_wangxiaolu_apron_score"
jdbcType=
"INTEGER"
/>
<result
property=
"hasTastingProductScore"
column=
"has_tasting_product_score"
jdbcType=
"INTEGER"
/>
<result
property=
"hasTastingTableScore"
column=
"has_tasting_table_score"
jdbcType=
"INTEGER"
/>
<result
property=
"hasTastingPlateScore"
column=
"has_tasting_plate_score"
jdbcType=
"INTEGER"
/>
<result
property=
"hasTastingCupScore"
column=
"has_tasting_cup_score"
jdbcType=
"INTEGER"
/>
<result
property=
"wearsMaskGlovesScore"
column=
"wears_mask_gloves_score"
jdbcType=
"INTEGER"
/>
<result
property=
"hasToothpickBonusScore"
column=
"has_toothpick_bonus_score"
jdbcType=
"INTEGER"
/>
<result
property=
"hasGarbageCanBonusScore"
column=
"has_garbage_can_bonus_score"
jdbcType=
"INTEGER"
/>
<result
property=
"knowsDistanceSolicitSkillScore"
column=
"knows_distance_solicit_skill_score"
jdbcType=
"INTEGER"
/>
<result
property=
"knowsProductSellingPointsScore"
column=
"knows_product_selling_points_score"
jdbcType=
"INTEGER"
/>
<result
property=
"greetsCustomersActivelyScore"
column=
"greets_customers_actively_score"
jdbcType=
"INTEGER"
/>
<result
property=
"introducesProductScoresScore"
column=
"introduces_product_scores_score"
jdbcType=
"INTEGER"
/>
<result
property=
"promotesSalesActivelyScore"
column=
"promotes_sales_actively_score"
jdbcType=
"INTEGER"
/>
<result
property=
"hasPromotionGiftsScore"
column=
"has_promotion_gifts_score"
jdbcType=
"INTEGER"
/>
<result
property=
"sellsNonWangxiaoluProductsScore"
column=
"sells_non_wangxiaolu_products_score"
jdbcType=
"INTEGER"
/>
<!-- 4. 小数类型(decimal,不同精度统一映射为DECIMAL) -->
<result
property=
"onDutyRate"
column=
"on_duty_rate"
jdbcType=
"DECIMAL"
/>
<result
property=
"pedestrianCountWithin10min"
column=
"pedestrian_count_within10min"
jdbcType=
"DECIMAL"
/>
<result
property=
"totalTastingProductCount"
column=
"total_tasting_product_count"
jdbcType=
"DECIMAL"
/>
<!-- 5. 日期类型(date) -->
<result
property=
"inspectionDate"
column=
"inspection_date"
jdbcType=
"DATE"
/>
<!-- 6. JSON类型 -->
<result
property=
"temWorkPhotos"
column=
"tem_work_photos"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,plan_id,dep_qc_org_name,dealer_id,dealer_name,store_code,
store_name,addr,pattern,inspection_date,inspection_time,
leave_store_time,on_duty_status,on_duty_rate,on_duty_count,is_on_duty,
off_duty_call_time,is_call_connected,is_reconnected_after_5min,is_back_to_work_within_10min,total_score,
sales_assessment_score,promotion_assessment_score,has_schedule_promotion_score,ground_stack_has_main_product_score,ground_stack_only_wangxiaolu_score,
ground_stack_stock_full_score,has_promotion_materials_score,wears_wangxiaolu_apron_score,has_tasting_product_score,has_tasting_table_score,
has_tasting_plate_score,has_tasting_cup_score,wears_mask_gloves_score,has_toothpick_bonus_score,has_garbage_can_bonus_score,
knows_distance_solicit_skill_score,knows_product_selling_points_score,greets_customers_actively_score,introduces_product_scores_score,promotes_sales_actively_score,
has_promotion_gifts_score,sells_non_wangxiaolu_products_score,promotion_activity_content,has_ground_stack,has_black_duck_display,
has_black_duck_tasting,other_brand_has_tasting_table,pedestrian_count_within_10_min,total_tasting_product_count,tasting_product_count_by_flavor,
other_brand_tasting_table_proof_url,non_wangxiaolu_sales_proof_url,store_picture,tem_work_photos,store_tc_photo,
store_zhi_photo
</sql>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论