提交 890f8c01 authored 作者: 李秋林's avatar 李秋林

1

上级 86ec8424
...@@ -117,9 +117,7 @@ public class TemporaryActivityClockCoreController { ...@@ -117,9 +117,7 @@ public class TemporaryActivityClockCoreController {
// 上班打卡 // 上班打卡
private void builderClockInData(TemporaryClockVo clockVo, TemporaryClockDto clockDto, Date dateTime) { private void builderClockInData(TemporaryClockVo clockVo, TemporaryClockDto clockDto, Date dateTime) {
clockDto.setTemporaryId(clockVo.getTemporaryId()) clockDto.setPlanId(clockVo.getPlanId())
.setTemporaryName(clockVo.getTemporaryName())
.setPlanId(clockVo.getPlanId())
// .setStoreId(clockVo.getStoreId()) // .setStoreId(clockVo.getStoreId())
// .setStoreName(clockVo.getStoreName()) // .setStoreName(clockVo.getStoreName())
.setClockInAddress(clockVo.getClockAddress()) .setClockInAddress(clockVo.getClockAddress())
......
package com.wangxiaolu.promotion.controller.activity.temporary; package com.wangxiaolu.promotion.controller.activity.temporary;
import com.wangxiaolu.promotion.common.redis.service.RedisCache;
import com.wangxiaolu.promotion.enums.activity.TemActApproveStatus; import com.wangxiaolu.promotion.enums.activity.TemActApproveStatus;
import com.wangxiaolu.promotion.exception.ParamException; import com.wangxiaolu.promotion.exception.ParamException;
import com.wangxiaolu.promotion.pojo.activity.temporary.dto.TemporaryActivityReportedDto; import com.wangxiaolu.promotion.pojo.activity.temporary.dto.TemporaryActivityReportedDto;
...@@ -66,12 +65,12 @@ public class TemporaryActivityCoreController { ...@@ -66,12 +65,12 @@ public class TemporaryActivityCoreController {
temActDto.setApproveStatus(TemActApproveStatus.SUBMITTED) temActDto.setApproveStatus(TemActApproveStatus.SUBMITTED)
.setDealerName(clockDto.getDealerName()) .setDealerName(clockDto.getDealerName())
.setLineName(clockDto.getLineName()) .setLineName(clockDto.getLineName())
.setPlanId(clockDto.getPlanId())
.setStoreName(clockDto.getStoreName()) .setStoreName(clockDto.getStoreName())
.setDeptQcId(clockDto.getDeptQcId()) .setDeptQcId(clockDto.getDeptQcId())
.setDeptQcOrgName(clockDto.getDeptQcOrgName()) .setDeptQcOrgName(clockDto.getDeptQcOrgName())
.setApproverId(clockDto.getChargerQcId()) .setApproverId(clockDto.getChargerQcId())
.setApproveName(clockDto.getChargerName()) .setApproveName(clockDto.getChargerName())
.setActivityPatternId(clockDto.getActivityPatternId())
.setActivityPattern(clockDto.getActivityPattern()) .setActivityPattern(clockDto.getActivityPattern())
.setProvince(clockDto.getClockProvince()) .setProvince(clockDto.getClockProvince())
.setCity(clockDto.getClockCity()); .setCity(clockDto.getClockCity());
......
...@@ -37,10 +37,14 @@ public class TemporaryActivityReportedDO implements Serializable { ...@@ -37,10 +37,14 @@ public class TemporaryActivityReportedDO implements Serializable {
/** /**
* 关联—活动店铺id * 关联—活动店铺id
*/ */
private String storeQcId; // private String storeQcId;
private Long storeId; // private Long storeId;
/**
* activity_plan_info表id
*/
private Long planId;
private String lineName; private String lineName;
/** /**
......
...@@ -162,6 +162,9 @@ public class ActivityPlanInfoDaoImpl implements ActivityPlanInfoDao { ...@@ -162,6 +162,9 @@ public class ActivityPlanInfoDaoImpl implements ActivityPlanInfoDao {
} }
qw.eq(ActivityPlanInfoDo::getIsDelete, StatusType.VALID.getType()); qw.eq(ActivityPlanInfoDo::getIsDelete, StatusType.VALID.getType());
qw.orderByDesc(ActivityPlanInfoDo::getDate); qw.orderByDesc(ActivityPlanInfoDo::getDate);
if (Objects.nonNull(wrapper.getLimitNum())){
qw.last(" limit "+wrapper.getLimitNum());
}
return qw; return qw;
} }
......
...@@ -112,6 +112,8 @@ public class ActivityPlanInfoWrapper { ...@@ -112,6 +112,8 @@ public class ActivityPlanInfoWrapper {
private Date activityDate; private Date activityDate;
private Integer limitNum;
public Date getActivityEndDate() { public Date getActivityEndDate() {
String format = DateUtil.format(this.activityEndDate, "yyyy-MM-dd 23:59:59"); String format = DateUtil.format(this.activityEndDate, "yyyy-MM-dd 23:59:59");
return DateUtil.parse(format); return DateUtil.parse(format);
......
...@@ -35,7 +35,10 @@ public class TemporaryActivityReportedDto { ...@@ -35,7 +35,10 @@ public class TemporaryActivityReportedDto {
private String temporaryName; private String temporaryName;
private String dealerName; private String dealerName;
/**
* activity_plan_info表id
*/
private Long planId;
/** /**
* 关联—活动店铺id * 关联—活动店铺id
*/ */
......
...@@ -128,8 +128,10 @@ public class TemporaryActivityClockCoreServiceImpl implements TemporaryActivityC ...@@ -128,8 +128,10 @@ public class TemporaryActivityClockCoreServiceImpl implements TemporaryActivityC
public void clockInTodayPlan(TemporaryClockDto dto, Integer clockType) { public void clockInTodayPlan(TemporaryClockDto dto, Integer clockType) {
if (Objects.isNull(dto.getId())) { if (Objects.isNull(dto.getId())) {
ActivityPlanInfoDto planInfo = promPlanQueryService.selectById(dto.getPlanId()); ActivityPlanInfoDto planInfo = promPlanQueryService.selectById(dto.getPlanId());
if (Objects.isNull(planInfo) || planInfo.getPlanStatus().equals(PlanStatus.EXECUTION.getCode())){
throw new ParamException(RCode.NOT_CLOCK_STORE_ERROR);
}
ManageEmployeeInfoDto employeeDto = manageEmployeeInfoDao.selectById(planInfo.getEmployeeId()); ManageEmployeeInfoDto employeeDto = manageEmployeeInfoDao.selectById(planInfo.getEmployeeId());
dto.setLineName(planInfo.getLineName()) dto.setLineName(planInfo.getLineName())
.setDeptQcId(employeeDto.getDeptQcId()) .setDeptQcId(employeeDto.getDeptQcId())
.setDeptQcOrgName(employeeDto.getDeptQcName()) .setDeptQcOrgName(employeeDto.getDeptQcName())
...@@ -142,7 +144,7 @@ public class TemporaryActivityClockCoreServiceImpl implements TemporaryActivityC ...@@ -142,7 +144,7 @@ public class TemporaryActivityClockCoreServiceImpl implements TemporaryActivityC
// 保存打卡记录 // 保存打卡记录
temporaryActivityClockDao.save(dto); temporaryActivityClockDao.save(dto);
// 促销计划状态修改 // 促销计划状态修改
promPlanCoreService.updatePlanStatus(dto.getPlanId(), PlanStatus.NOT_EXECUTION); promPlanCoreService.updatePlanStatus(dto.getPlanId(), PlanStatus.EXECUTION);
} else { } else {
temporaryActivityClockDao.updateById(dto); temporaryActivityClockDao.updateById(dto);
} }
......
...@@ -83,13 +83,9 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe ...@@ -83,13 +83,9 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe
// 售卖单元新增保存 // 售卖单元新增保存
// String key = temMarketCellRedisKey(temActDto.getTemporaryId()); // String key = temMarketCellRedisKey(temActDto.getTemporaryId());
// temporaryActivityMarketCellDao.saveList(reportedId,redisCache.getToJsonArray(key)); // temporaryActivityMarketCellDao.saveList(reportedId,redisCache.getToJsonArray(key));
/**
* 日志保存
*/
tempActivityLogDao.save(temActDto.getTemporaryId(), temActDto.getTemporaryName(), LogType.t_2, temActDto.getId(), temActDto);
// redisCache.removeKey(key); // redisCache.removeKey(key);
// tempActivityLogDao.save(temActDto.getTemporaryId(), temActDto.getTemporaryName(), LogType.t_2, temActDto.getId(), temActDto);
return reportedId; return reportedId;
} }
...@@ -109,7 +105,7 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe ...@@ -109,7 +105,7 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe
// temporaryActivityMarketCellDao.saveList(temActDto.getId(),redisCache.getToJsonArray(key)); // temporaryActivityMarketCellDao.saveList(temActDto.getId(),redisCache.getToJsonArray(key));
// redisCache.removeKey(key); // redisCache.removeKey(key);
// 日志保存 // 日志保存
tempActivityLogDao.save(temActDto.getTemporaryId(), temActDto.getTemporaryName(), LogType.t_2, temActDto.getId(), temActDto); // tempActivityLogDao.save(temActDto.getTemporaryId(), temActDto.getTemporaryName(), LogType.t_2, temActDto.getId(), temActDto);
} }
/** /**
......
...@@ -41,6 +41,7 @@ public class PromPlanQueryServiceImpl implements PromPlanQueryService { ...@@ -41,6 +41,7 @@ public class PromPlanQueryServiceImpl implements PromPlanQueryService {
ActivityPlanInfoWrapper wrapper = JSONObject.parseObject(JSONObject.toJSONString(temporaryActivityPlanVo), ActivityPlanInfoWrapper.class); ActivityPlanInfoWrapper wrapper = JSONObject.parseObject(JSONObject.toJSONString(temporaryActivityPlanVo), ActivityPlanInfoWrapper.class);
wrapper.setActivityDate(Date.from(LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toInstant())); wrapper.setActivityDate(Date.from(LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toInstant()));
wrapper.setPlanStatus(PlanStatus.NOT_EXECUTION); wrapper.setPlanStatus(PlanStatus.NOT_EXECUTION);
wrapper.setLimitNum(50);
return activityPlanInfoDao.findList(wrapper); return activityPlanInfoDao.findList(wrapper);
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<id property="id" column="id" jdbcType="BIGINT"/> <id property="id" column="id" jdbcType="BIGINT"/>
<result property="temporaryId" column="temporary_id" jdbcType="INTEGER"/> <result property="temporaryId" column="temporary_id" jdbcType="INTEGER"/>
<result property="temporaryName" column="temporary_name" jdbcType="VARCHAR"/> <result property="temporaryName" column="temporary_name" jdbcType="VARCHAR"/>
<result property="storeQcId" column="store_qc_id" jdbcType="BIGINT"/> <!-- <result property="storeQcId" column="store_qc_id" jdbcType="BIGINT"/>-->
<result property="storeName" column="store_name" jdbcType="VARCHAR"/> <result property="storeName" column="store_name" jdbcType="VARCHAR"/>
<result property="storeAddr" column="store_addr" jdbcType="VARCHAR"/> <result property="storeAddr" column="store_addr" jdbcType="VARCHAR"/>
<result property="approverId" column="approver_id" jdbcType="BIGINT"/> <result property="approverId" column="approver_id" jdbcType="BIGINT"/>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论