提交 bf8011e2 authored 作者: 000516's avatar 000516 提交者: Coding

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

Merge Request: 创建稽查任务时,计划部分参数放到后端补充 Created By: @李秋林 Accepted By: @李秋林 URL: https://g-pkkp8204.coding.net/p/promotion/d/promotion-service/git/merge/262?initial=true
...@@ -32,10 +32,10 @@ public class ExaPlanCoreController { ...@@ -32,10 +32,10 @@ public class ExaPlanCoreController {
BeanUtils.copyProperties(exaPlanVo, examineDto); BeanUtils.copyProperties(exaPlanVo, examineDto);
ActivityExamineDto examineN = null; ActivityExamineDto examineN = null;
if (Objects.isNull(exaPlanVo.getId())) { if (Objects.isNull(exaPlanVo.getId())) {
examineDto.setCreateBy(exaPlanVo.getOperName()); examineDto.setCreateBy(exaPlanVo.getEmployeeName());
examineN = saveOne(examineDto); examineN = saveOne(examineDto);
} else { } else {
examineDto.setModifyBy(exaPlanVo.getOperName()); examineDto.setModifyBy(exaPlanVo.getEmployeeName());
examineN = updateById(examineDto); examineN = updateById(examineDto);
} }
return R.success(examineN); return R.success(examineN);
......
...@@ -95,16 +95,12 @@ public class ActivityExamineDaoImpl implements ActivityExamineDao { ...@@ -95,16 +95,12 @@ public class ActivityExamineDaoImpl implements ActivityExamineDao {
if (Objects.isNull(dto)){ if (Objects.isNull(dto)){
return null; 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.setTemWorkPhotos(Objects.isNull(activityExamineDO.getTemWorkPhotos()) ? null : JSONArray.parseArray(activityExamineDO.getTemWorkPhotos()));
dto.setPosPhotos(Objects.isNull(activityExamineDO.getPosPhotos()) ? null : JSONArray.parseArray(activityExamineDO.getPosPhotos())); dto.setPosPhotos(Objects.isNull(activityExamineDO.getPosPhotos()) ? null : JSONArray.parseArray(activityExamineDO.getPosPhotos()));
return dto; return dto;
} }
private void arrayToStringByDo(ActivityExamineDO examineDO, ActivityExamineDto examineDto) { 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.setTemWorkPhotos(Objects.isNull(examineDto.getTemWorkPhotos()) ? null : JSONObject.toJSONString(examineDto.getTemWorkPhotos()));
examineDO.setPosPhotos(Objects.isNull(examineDto.getPosPhotos()) ? null : JSONObject.toJSONString(examineDto.getPosPhotos())); examineDO.setPosPhotos(Objects.isNull(examineDto.getPosPhotos()) ? null : JSONObject.toJSONString(examineDto.getPosPhotos()));
} }
......
...@@ -51,17 +51,6 @@ public class ActivityExamineDO implements Serializable { ...@@ -51,17 +51,6 @@ public class ActivityExamineDO implements Serializable {
* 计划状态:执行/未执行 * 计划状态:执行/未执行
*/ */
private String planStatus; private String planStatus;
/**
* 上报ID
*/
private String reportedIds;
/**
* 打卡ID
*/
private String clockIds;
/** /**
* 所属战区名称 * 所属战区名称
*/ */
......
...@@ -49,16 +49,6 @@ public class ActivityExamineDto { ...@@ -49,16 +49,6 @@ public class ActivityExamineDto {
*/ */
private String planStatus; private String planStatus;
/**
* 上报ID
*/
private JSONArray reportedIds;
/**
* 打卡ID
*/
private JSONArray clockIds;
/** /**
* 所属战区名称 * 所属战区名称
*/ */
......
...@@ -50,52 +50,52 @@ public class ExaPlanVo { ...@@ -50,52 +50,52 @@ public class ExaPlanVo {
/** /**
* 上报ID * 上报ID
*/ */
private JSONArray reportedIds; // private JSONArray reportedIds;
/** /**
* 打卡ID * 打卡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 { ...@@ -159,5 +159,5 @@ public class ExaPlanVo {
/** /**
* 操作人 * 操作人
*/ */
private String operName; // private String operName;
} }
package com.wangxiaolu.promotion.service.activity.examine.impl; 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.examine.dao.ActivityExamineDao;
import com.wangxiaolu.promotion.exception.ParamException;
import com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto; 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 com.wangxiaolu.promotion.service.activity.examine.ExaPlanCoreService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Objects;
/** /**
* @author : liqiulin * @author : liqiulin
* @date : 2025-04-02 15 * @date : 2025-04-02 15
...@@ -16,9 +22,24 @@ public class ExaPlanCoreServiceImpl implements ExaPlanCoreService { ...@@ -16,9 +22,24 @@ public class ExaPlanCoreServiceImpl implements ExaPlanCoreService {
@Autowired @Autowired
private ActivityExamineDao activityExamineDao; private ActivityExamineDao activityExamineDao;
@Autowired
private ActivityPlanInfoDao activityPlanInfoDao;
@Override @Override
public ActivityExamineDto save(ActivityExamineDto examineDto) { 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); return activityExamineDao.save(examineDto);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论