Commit e86e80ad by Ren Ping

Merge remote-tracking branch 'origin/develop' into develop

2 parents e8cce6d9 530fee12
......@@ -9,9 +9,9 @@ public class CalendarDetailDTO {
@lombok.Data
public static class Request {
@NotBlank
@NotBlank(message = "工程师编号不能为空")
private String engineerCode;
@NotBlank
@NotBlank(message = "所属计划配置编码不能为空")
private String planId;
}
......
......@@ -113,9 +113,6 @@ public class InitEngineerCapacityScheduler {
log.warn("工程师:{}存在日期:{}时间切片记录, 无需初始化", engineerCode, date);
return;
}
//TODO 日历需要添加
// 查询工程师正常的工作时间 并按小时切片:
EngineerBusinessEntity businessEntity = engineerBusinessDao.getByEngineerCode(engineerCode);
LocalDateTime workStartTime = DateUtils.localDateTimeFromStr(String.format("%s %s:00", date, businessEntity.getWorkOn()));
......
......@@ -218,7 +218,7 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
public void updateTeamEngineers(OrgTeamEntity targetTeam, List<String> engineerCodes) {
// 获取现有的工作队和技术员之间的所有关系
final String targetTeamId = String.valueOf(targetTeam.getId());
final String targetTeamId = String.valueOf(targetTeam.getTeamId());
List<String> targetTeamWorkDayOfWeek = List.of(targetTeam.getWorkdays().split(","));
List<OrgTeamEngineerEntity> existingRelations = orgTeamEngineerDao.findAllByTeamId(targetTeamId);
......@@ -237,6 +237,7 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
//返回任何一个有工作日冲突的工作队
List<String> fixedWorkDayOfWeek = List.of(team.getWorkdays().split(","));
List<String> workDays = targetTeamWorkDayOfWeek.stream().filter(dayOfWeek -> fixedWorkDayOfWeek.stream().anyMatch(fixDay -> Objects.equals(fixDay, dayOfWeek)))
.map(DateUtils::toWeekChinese)
.collect(Collectors.toList());
if (!CollectionUtils.isEmpty(workDays)) {
warnMessage.add(MessageFormat.format(message, engineerCode, team.getTeamName(), StringUtils.join(workDays, ",")));
......
......@@ -232,9 +232,9 @@ public class DispatchServiceImpl implements DispatchService {
item.setName(o.getName());
item.setPhone(o.getPhone());
String time = TimeUtils.localDateTime2String(o.getPlanStartTime(), "HH:mm");
String timeSlot = this.parseTimeSlot(o.getPlanStartTime());
item.setExpectTimeDesc(String.format("%s/%s", time, timeSlot));
// String time = TimeUtils.localDateTime2String(o.getPlanStartTime(), "HH:mm");
// String timeSlot = this.parseTimeSlot(o.getPlanStartTime());
item.setExpectTimeDesc(o.getExpectTimeDesc());
item.setSource(o.getSource());
item.setDispatcher(o.getDispatcher());
......
......@@ -613,20 +613,11 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
private EngineerCalendarDTO.Calendar getEmptyCalendar(String teamId, String date) {
// 初始化一天的日历
OrgTeamEntity e = orgTeamDao.getByTeamId(teamId);
EngineerCalendarDTO.Calendar calendar = new EngineerCalendarDTO.Calendar();
calendar.setDate(date);
int dayOfWeek = LocalDate.parse(date).getDayOfWeek().getValue();
calendar.setWeek(DateUtils.toWeekChinese(dayOfWeek));
List<String> workdays = Arrays.asList(e.getWorkdays().split(","));
if (!workdays.contains(String.valueOf(dayOfWeek))) {
EngineerCalendarDTO.Content content = new EngineerCalendarDTO.Content();
content.setType("REST");
content.setTitle("休息");
calendar.setContent(Collections.singletonList(content));
} else {
calendar.setContent(new ArrayList<>());
}
calendar.setContent(new ArrayList<>());
return calendar;
}
......
......@@ -129,7 +129,7 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
record.setX(o.getX());
record.setY(o.getY());
record.setSource(o.getSource());
record.setDescription(o.getDescription());
record.setDescription(o.getApplyNote());
record.setPriority(o.getPriority());
record.setOrgBranchName(branchNames.getOrDefault(o.getOrgBranchId(), ""));
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!