Commit 8c72e2f5 by 刘鑫

Merge branch 'develop_16542_system_auth' into 'develop'

7. BEAN调用PEA接口/临时加单

See merge request !342
2 parents 72d89c41 1dfded4c
......@@ -130,6 +130,19 @@
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>com.github.shalousun</groupId>
<artifactId>smart-doc-maven-plugin</artifactId>
<version>2.7.6</version>
<configuration>
<configFile>./src/main/resources/smart-doc.json</configFile>
<projectName>${project.description}</projectName>
<includes>
<!-- 使用了jpa的分页需要include所使用的源码包 -->
<include>org.springframework.data:spring-data-commons</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -3,7 +3,11 @@ package com.dituhui.pea.order.controller;
import com.dituhui.pea.common.Result;
import com.dituhui.pea.order.dto.OrganizationTreeDTO;
import com.dituhui.pea.order.dto.param.CapacityQueryDTO;
import com.dituhui.pea.order.dto.param.EngineerOrderParam;
import com.dituhui.pea.order.dto.param.EngineerParamDTO;
import com.dituhui.pea.order.dto.param.Order;
import com.dituhui.pea.order.dto.param.OrderConfirmParam;
import com.dituhui.pea.order.dto.param.OrderConfirmResult;
import com.dituhui.pea.order.dto.param.ValidGroup;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.RequiredArgsConstructor;
......@@ -18,7 +22,9 @@ import org.springframework.web.bind.annotation.RestController;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Collections;
import java.util.Date;
import java.util.List;
/**
* PEA 调用API
......@@ -81,7 +87,7 @@ public class PeaApiController {
public Result<CapacityQueryDTO.Result> capacityQuery(@Validated @RequestBody CapacityQueryDTO.Request reqDTO) {
//TODO 查询日期起止参数限制为一月
CapacityQueryDTO.Result result = new CapacityQueryDTO.Result();
CapacityQueryDTO.Result result = new CapacityQueryDTO.Result();
return Result.success(result);
}
......@@ -108,4 +114,31 @@ public class PeaApiController {
return Result.success(new CapacityQueryDTO.PersonalResult());
}
/**
* 7.1POST 申请加单
*
* @param requestParam 申请加单请求参数
* @return 订单列表
* @apiNote 技术员发起申请,根据技术员当前位置和空闲时间段,返回附近的n张尚未分配,且不需要备件的工单,技术员逐条顺序联系客户确认
*/
@PostMapping("/order/increase/query")
public Result<List<Order>> orderIncrease(@Validated @RequestBody EngineerOrderParam requestParam) {
return Result.success(Collections.emptyList());
}
/**
* 7.2POST 加单确认
*
* @param requestParam 加单确认参数
* @return 工单确认信息
* @apiNote 技术员和客户沟通后,确认沟通状态(未打通/客户同意上门服务/客户不同意改期);PEA系统对客户同意上门服务工单做系统确认后,分派该订单给技术员;
*/
@PostMapping("/order/increase/confirm")
public Result<OrderConfirmResult> orderConfirm(@Validated @RequestBody OrderConfirmParam requestParam) {
return Result.success(new OrderConfirmResult());
}
}
......@@ -9,7 +9,6 @@ import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
......
package com.dituhui.pea.order.dto.param;
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotBlank;
/**
* 申请加单 参数
*/
@Setter
@Getter
public class EngineerOrderParam {
/**
* 工程师工号
*/
@NotBlank
private String engineerCode;
/**
* 地址坐标信息
*/
private Location location;
/**
* 空闲时长 至少空闲多久以上,单位:分钟
*/
private Integer idleDuration;
}
......@@ -39,6 +39,8 @@ public class EngineerParamDTO {
/**
* 技术员信息
*/
@Setter
@Getter
public static class Engineer {
/**
......
package com.dituhui.pea.order.dto.param;
import lombok.Getter;
import lombok.Setter;
import java.util.Date;
/**
* 订单返回值
*/
@Setter
@Getter
public class Order {
/**
* 距离,当前位置路程距离,单位: 米
*/
private Integer distance;
/**
* 工单号
*/
private String orderId;
/**
* 客户姓名
*/
private String name;
/**
* 客户电话
*/
private String phone;
/**
* 品牌
*/
private String brand;
/**
* 分类
*/
private String product_type;
/**
* 需要的技能
*/
private String service_type;
/**
* 预计需要服务的时长
*/
private Integer takeTime;
/**
* 故障描述
*/
private String faultDescribe;
/**
* 客户期望上门最早时间
*/
private Date expectTimeBegin;
/**
* 客户期望上门最晚时间
*/
private Date expectTimeEnd;
/**
* 备注信息
*/
private String memo;
/**
* 地址坐标信息
*/
private Location location;
/**
* 其他参考信息
*/
private String applyNote;
}
package com.dituhui.pea.order.dto.param;
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotBlank;
/**
* 加单基础实体
*/
@Setter
@Getter
public class OrderConfirmBaseParam {
/**
* 工程师工号
*/
@NotBlank
private String engineerCode;
/**
* 工单号
*/
@NotBlank
private String orderId;
}
package com.dituhui.pea.order.dto.param;
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotBlank;
import java.util.Date;
/**
* 预约加单请求参数
*/
@Setter
@Getter
public class OrderConfirmParam extends OrderConfirmBaseParam{
/**
* 预约沟通结果, confirmed预约成功;other预约失败
*/
@NotBlank
private String appointmentResult;
/**
* 预约上门时间,预约成功时候填写
*/
private Date appointmentTime;
}
package com.dituhui.pea.order.dto.param;
import lombok.Getter;
import lombok.Setter;
/**
* 预约加单返回值
*/
@Setter
@Getter
public class OrderConfirmResult extends OrderConfirmBaseParam{
/**
* 预约状态
*/
private String appointmentStatus;
}
{
"serverUrl": "http://{{server}}",
"serverEnv": "http://{{server}}",
"pathPrefix": "",
"isStrict": false,
"allInOne": true,
"outPath": "../doc",
"randomMock": false,
"coverOld": true,
"createDebugPage": true,
"packageFilters": "",
"packageExcludeFilters": "",
"md5EncryptedHtmlName": false,
"style":"xt256",
"framework": "spring",
"skipTransientField": true,
"sortByTitle":false,
"showAuthor":false,
"requestFieldToUnderline":false,
"responseFieldToUnderline":false,
"inlineEnum":true,
"recursionLimit":3,
"allInOneDocFileName":"index.html",
"requestExample":"true",
"responseExample":"true",
"requestParamsTable": true,
"responseParamsTable": true,
"urlSuffix":"",
"displayActualType":false
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!