Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
promotion-service
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
promotion
promotion-service
Commits
57a9c31f
提交
57a9c31f
authored
1月 08, 2026
作者:
douxy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
CP稽核信息保存接口改造
上级
efb77995
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
987 行增加
和
12 行删除
+987
-12
pom.xml
pom.xml
+4
-0
ExaPlanCoreController.java
...on/controller/activity/examine/ExaPlanCoreController.java
+28
-11
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
InspectionInfoDto.java
...n/pojo/activity/inspectionInfo/dto/InspectionInfoDto.java
+301
-0
InspectionInfoVO.java
...ion/pojo/activity/inspectionInfo/vo/InspectionInfoVO.java
+266
-0
ExaPlanCoreService.java
...romotion/service/activity/examine/ExaPlanCoreService.java
+5
-0
ExaPlanCoreServiceImpl.java
...service/activity/examine/impl/ExaPlanCoreServiceImpl.java
+28
-0
InspectionInfoMapper.xml
...main/resources/mapper/inspection/InspectionInfoMapper.xml
+92
-0
没有找到文件。
pom.xml
浏览文件 @
57a9c31f
...
...
@@ -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
浏览文件 @
57a9c31f
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/domain/examine/mapper/ActivityExamineMapper.java
浏览文件 @
57a9c31f
...
...
@@ -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
浏览文件 @
57a9c31f
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
浏览文件 @
57a9c31f
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
浏览文件 @
57a9c31f
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
浏览文件 @
57a9c31f
差异被折叠。
点击展开。
src/main/java/com/wangxiaolu/promotion/domain/inspection/wrapper/InspectionInfoWrapper.java
0 → 100644
浏览文件 @
57a9c31f
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/pojo/activity/inspectionInfo/dto/InspectionInfoDto.java
0 → 100644
浏览文件 @
57a9c31f
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
浏览文件 @
57a9c31f
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/service/activity/examine/ExaPlanCoreService.java
浏览文件 @
57a9c31f
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/impl/ExaPlanCoreServiceImpl.java
浏览文件 @
57a9c31f
...
...
@@ -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,31 @@ 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
.
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/resources/mapper/inspection/InspectionInfoMapper.xml
0 → 100644
浏览文件 @
57a9c31f
<?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_after_5min"
jdbcType=
"VARCHAR"
/>
<result
property=
"isBackToWorkWithin10min"
column=
"is_back_to_work_within_10min"
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_within_10_min"
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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论