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

1

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