Commit b875887b by 丁伟峰

Merge branch 'dev-dingwf-0717' into develop

2 parents 81b0f9b4 130561b8
......@@ -9,4 +9,5 @@
/*/.project
/*/logs/
/*/.gitignore
dispatchSolution-*.json
\ No newline at end of file
dispatchSolution-*.json
/project-order/src/main/resources/application-dev.yaml
......@@ -2,14 +2,21 @@ package com.dituhui.pea.order.dao;
import com.dituhui.pea.order.entity.OrderRequestEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface OrderRequestDao extends JpaRepository <OrderRequestEntity, Long> {
public interface OrderRequestDao extends JpaRepository<OrderRequestEntity, Long> {
OrderRequestEntity getByOrderId(String orderId);
List<OrderRequestEntity> findAllByOrderIdIn(List<String> orderIds);
@Query("SELECT o.orderId, s.skillCategory as skillCaption FROM OrderRequestEntity o JOIN SkillInfoEntity s on o.brand=s.brand and o.type=s.type and o.skill=s.skill WHERE o.orderId = :orderId")
OrderSkillProjection getOrderSkillCaptionByOrderId(@Param("orderId") String orderId);
}
package com.dituhui.pea.order.dao;
public interface OrderSkillProjection {
String getOrderId();
String getSkillCaption();
}
......@@ -80,6 +80,8 @@ public class EngineersGanttDTO {
* 工单ID
*/
private String orderId;
private String caption;
/**
* 排班状态
*/
......
......@@ -117,7 +117,7 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
OrgTeamEntity orgTeamEntity = orgTeamDao.getByTeamId(teamId);
SpanInfo r = new SpanInfo();
if ("全天".equals(timeSpan)) {
r.setTitle("全天都可以");
r.setTitle("全天");
r.setTimeBegin(String.format("%s %s:00", date, orgTeamEntity.getWorkOn()));
r.setTimeEnd(String.format("%s %s:00", date, orgTeamEntity.getWorkOff()));
} else {
......
......@@ -2,16 +2,10 @@ package com.dituhui.pea.order.service.impl;
import com.dituhui.pea.common.Result;
import com.dituhui.pea.order.common.EngineerUtils;
import com.dituhui.pea.order.dao.CapacityEngineerStatDao;
import com.dituhui.pea.order.dao.EngineerInfoDao;
import com.dituhui.pea.order.dao.OrderAppointmentDao;
import com.dituhui.pea.order.dao.OrderRequestDao;
import com.dituhui.pea.order.dao.*;
import com.dituhui.pea.order.dto.EngineersGanttDTO;
import com.dituhui.pea.order.dto.LabelValueDTO;
import com.dituhui.pea.order.entity.CapacityEngineerStatEntity;
import com.dituhui.pea.order.entity.EngineerInfoEntity;
import com.dituhui.pea.order.entity.OrderAppointmentEntity;
import com.dituhui.pea.order.entity.OrderRequestEntity;
import com.dituhui.pea.order.entity.*;
import com.dituhui.pea.order.service.EngineerGanttService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
......@@ -63,6 +57,11 @@ public class EngineerGanttServiceImpl implements EngineerGanttService {
order.setStartTime(e.getExpectStartTime()).setEndTime(e.getExpectEndTime());
order.setOrderId(e.getOrderId()).setPreStatus(e.getPreStatus());
order.setTips(getOrderTips(e.getOrderId()));
OrderSkillProjection orderSkill = orderRequestDao.getOrderSkillCaptionByOrderId(e.getOrderId());
if (orderSkill != null) {
order.setCaption(orderSkill.getSkillCaption());
}
order.setAppointmentStatus(mapOrderRequest.get(e.getOrderId()).getAppointmentStatus());
List<EngineersGanttDTO.Order> orders = null;
if (mapEngineers.containsKey(e.getEngineerCode())) {
......@@ -156,5 +155,4 @@ public class EngineerGanttServiceImpl implements EngineerGanttService {
tips.add(new LabelValueDTO().setLabel("标签").setValue(order.getTags()));
return tips;
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!