提交 87d5bd0a authored 作者: 李秋林's avatar 李秋林

创建稽查任务时,计划部分参数放到后端补充

上级 76b0c682
......@@ -32,10 +32,10 @@ public class ExaPlanCoreController {
BeanUtils.copyProperties(exaPlanVo, examineDto);
ActivityExamineDto examineN = null;
if (Objects.isNull(exaPlanVo.getId())) {
examineDto.setCreateBy(exaPlanVo.getOperName());
examineDto.setCreateBy(exaPlanVo.getEmployeeName());
examineN = saveOne(examineDto);
} else {
examineDto.setModifyBy(exaPlanVo.getOperName());
examineDto.setModifyBy(exaPlanVo.getEmployeeName());
examineN = updateById(examineDto);
}
return R.success(examineN);
......
......@@ -95,16 +95,12 @@ public class ActivityExamineDaoImpl implements ActivityExamineDao {
if (Objects.isNull(dto)){
return null;
}
dto.setReportedIds(Objects.isNull(activityExamineDO.getReportedIds()) ? null : JSONArray.parseArray(activityExamineDO.getReportedIds()));
dto.setClockIds(Objects.isNull(activityExamineDO.getClockIds()) ? null : JSONArray.parseArray(activityExamineDO.getClockIds()));
dto.setTemWorkPhotos(Objects.isNull(activityExamineDO.getTemWorkPhotos()) ? null : JSONArray.parseArray(activityExamineDO.getTemWorkPhotos()));
dto.setPosPhotos(Objects.isNull(activityExamineDO.getPosPhotos()) ? null : JSONArray.parseArray(activityExamineDO.getPosPhotos()));
return dto;
}
private void arrayToStringByDo(ActivityExamineDO examineDO, ActivityExamineDto examineDto) {
examineDO.setReportedIds(Objects.isNull(examineDto.getReportedIds()) ? null : JSONObject.toJSONString(examineDto.getReportedIds()));
examineDO.setClockIds(Objects.isNull(examineDto.getClockIds()) ? null : JSONObject.toJSONString(examineDto.getClockIds()));
examineDO.setTemWorkPhotos(Objects.isNull(examineDto.getTemWorkPhotos()) ? null : JSONObject.toJSONString(examineDto.getTemWorkPhotos()));
examineDO.setPosPhotos(Objects.isNull(examineDto.getPosPhotos()) ? null : JSONObject.toJSONString(examineDto.getPosPhotos()));
}
......
......@@ -51,17 +51,6 @@ public class ActivityExamineDO implements Serializable {
* 计划状态:执行/未执行
*/
private String planStatus;
/**
* 上报ID
*/
private String reportedIds;
/**
* 打卡ID
*/
private String clockIds;
/**
* 所属战区名称
*/
......
......@@ -49,16 +49,6 @@ public class ActivityExamineDto {
*/
private String planStatus;
/**
* 上报ID
*/
private JSONArray reportedIds;
/**
* 打卡ID
*/
private JSONArray clockIds;
/**
* 所属战区名称
*/
......
......@@ -50,52 +50,52 @@ public class ExaPlanVo {
/**
* 上报ID
*/
private JSONArray reportedIds;
// private JSONArray reportedIds;
/**
* 打卡ID
*/
private JSONArray clockIds;
// private JSONArray clockIds;
/**
* 所属战区名称
*/
private String deptQcOrgName;
// private String deptQcOrgName;
/**
* 负责人姓名
*/
private String manageName;
// private String manageName;
/**
* 执行城市
*/
private String city;
// private String city;
/**
* 计划日期
*/
private Date planDate;
// private Date planDate;
/**
* 系统名称
*/
private String lineName;
// private String lineName;
/**
* 门店名称
*/
private String storeName;
// private String storeName;
/**
* 经销商名称
*/
private String dealerName;
// private String dealerName;
/**
* 活动模式
*/
private String pattern;
// private String pattern;
/**
* 门头照
......@@ -159,5 +159,5 @@ public class ExaPlanVo {
/**
* 操作人
*/
private String operName;
// private String operName;
}
package com.wangxiaolu.promotion.service.activity.examine.impl;
import com.wangxiaolu.promotion.domain.activityplanv2.dao.ActivityPlanInfoDao;
import com.wangxiaolu.promotion.domain.examine.dao.ActivityExamineDao;
import com.wangxiaolu.promotion.exception.ParamException;
import com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto;
import com.wangxiaolu.promotion.pojo.activity.planv2.dto.ActivityPlanInfoDto;
import com.wangxiaolu.promotion.result.basedata.RCode;
import com.wangxiaolu.promotion.service.activity.examine.ExaPlanCoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Objects;
/**
* @author : liqiulin
* @date : 2025-04-02 15
......@@ -16,9 +22,24 @@ public class ExaPlanCoreServiceImpl implements ExaPlanCoreService {
@Autowired
private ActivityExamineDao activityExamineDao;
@Autowired
private ActivityPlanInfoDao activityPlanInfoDao;
@Override
public ActivityExamineDto save(ActivityExamineDto examineDto) {
// 根据促销计划id得到详情并补充
ActivityPlanInfoDto planInfoDto = activityPlanInfoDao.selectById(examineDto.getPlanId());
if (Objects.isNull(planInfoDto)) {
throw new ParamException(RCode.ACTIVITY_PLAN_IS_NULL);
}
examineDto.setDeptQcOrgName(planInfoDto.getOrgName());
examineDto.setManageName(planInfoDto.getEmployeeName());
examineDto.setCity(planInfoDto.getCity());
examineDto.setPlanDate(planInfoDto.getDate());
examineDto.setLineName(planInfoDto.getLineName());
examineDto.setStoreName(planInfoDto.getStoreName());
examineDto.setDealerName(planInfoDto.getDealerName());
examineDto.setPattern(planInfoDto.getPattern());
return activityExamineDao.save(examineDto);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论