Commit 3fe57b20 authored by suhuiguang's avatar suhuiguang

feat(重要提醒):设备新增提醒开发

1.重要提醒设备开发联调测试
parent 9143938c
......@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.jg.biz.reminder.dto.MatchItemDto;
import com.yeejoin.amos.boot.module.jg.biz.reminder.dto.ReminderItemDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
......@@ -55,7 +56,7 @@ public class NewEquipReminderAdapter extends DefaultReminder {
IdxBizJgRegisterInfo registerInfo = newEquipParseService.geEquipInfoFromJson(formData, IdxBizJgRegisterInfo.class);
IdxBizJgUseInfo bizJgUseInfo = newEquipParseService.geEquipInfoFromJson(formData, IdxBizJgUseInfo.class);
ReminderItemDto reminderItemDto = new ReminderItemDto();
reminderItemDto.setEquipId(bizId == null ? "1" : bizId);
reminderItemDto.setEquipId(StringUtils.isEmpty(bizId) ? "1" : bizId);
reminderItemDto.setEquipNo(bizJgUseInfo.getUseInnerCode());
reminderItemDto.setEquipName(registerInfo.getProductName());
reminderItemDto.setDetailData(newEquipParseService.getDetailInfoFromJson(formData));
......@@ -68,7 +69,7 @@ public class NewEquipReminderAdapter extends DefaultReminder {
public MatchItemDto setMatchItem(String bizId, Map<String, Object> formData) {
MatchItemDto matchItemDto = MatchItemDto.builder().build();
newEquipParseService.setEquCateInfoForInsert(formData, matchItemDto);
matchItemDto.setRegType(bizId != null ? newEquipParseService.getRegTypeForEdit(bizId) : newEquipParseService.getRegTypeForInsert(formData));
matchItemDto.setRegType(StringUtils.isNotEmpty(bizId) ? newEquipParseService.getRegTypeForEdit(bizId) : newEquipParseService.getRegTypeForInsert(formData));
return matchItemDto;
}
......
......@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.module.jg.biz.reminder.core.IReminderHandler;
import com.yeejoin.amos.boot.module.jg.biz.reminder.core.ReminderFactory;
import com.yeejoin.amos.boot.module.jg.biz.reminder.dto.ReminderItemDto;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
......@@ -17,7 +18,7 @@ public class RemindServiceImpl {
private final ReminderFactory reminderFactory;
public IPage<ReminderItemDto> getReminderItems(Page<ReminderItemDto> page, String bizId, String bizType, IReminderHandler.SourceType sourceType, Map<String, Object> formData) {
return reminderFactory.getReminderHandler(bizType).remindersPage(page, bizId, sourceType, formData);
return reminderFactory.getReminderHandler(bizType).remindersPage(page, StringUtils.isEmpty(bizId) ? null : bizId, sourceType, formData);
}
public Integer getReminderLevel(String bizId, String bizType) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment