Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b26343c0
authored
Sep 21, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
暂不提供示例数据
1 parent
062bcaf6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
89 deletions
project-order/src/main/java/com/dituhui/pea/order/controller/PeaApiController.java
project-order/src/main/java/com/dituhui/pea/order/controller/PeaApiController.java
View file @
b26343c
package
com
.
dituhui
.
pea
.
order
.
controller
;
import
cn.hutool.json.JSONUtil
;
import
com.dituhui.pea.common.Result
;
import
com.dituhui.pea.order.dto.OrganizationTreeDTO
;
import
com.dituhui.pea.order.dto.param.CapacityQueryDTO
;
...
...
@@ -82,56 +81,7 @@ public class PeaApiController {
public
Result
<
CapacityQueryDTO
.
Result
>
capacityQuery
(
@Validated
@RequestBody
CapacityQueryDTO
.
Request
reqDTO
)
{
//TODO 查询日期起止参数限制为一月
String
json
=
"{\n"
+
" \"groupId\": \"G100038\",\n"
+
" \"params\": {\n"
+
" \"beginDate\": \"2023-07-21\",\n"
+
" \"endDate\": \"2023-07-27\",\n"
+
" \"brand\": \"嘉格纳\",\n"
+
" \"product_type\": \"洗衣机\",\n"
+
" \"service_type\": \"商场样机安装\",\n"
+
" \"location\": {\n"
+
" \"latitude\": 120.608463,\n"
+
" \"longitude\": 31.318442,\n"
+
" \"name\": \"江苏省苏州市姑苏区蒋庙前\",\n"
+
" \"address\": \"江苏省苏州市姑苏区解放大街123号\"\n"
+
" }\n"
+
" },\n"
+
" \"takeTime\": 720,\n"
+
" \"datas\": [\n"
+
" {\n"
+
" \"date\": \"2023-07-21\",\n"
+
" \"segments\": [\n"
+
" {\n"
+
" \"maxDuration\": 90,\n"
+
" \"name\": \"全天\",\n"
+
" \"beginTime\": \"2023-07-21 08:00:00\",\n"
+
" \"endTime\": \"2023-07-21 17:59:59\",\n"
+
" \"status\": 1,\n"
+
" \"remain\": 3500\n"
+
" },\n"
+
" {\n"
+
" \"maxDuration\": 45,\n"
+
" \"name\": \"上午\",\n"
+
" \"beginTime\": \"2023-07-21 08:00:00\",\n"
+
" \"endTime\": \"2023-07-21 11:59:59\",\n"
+
" \"status\": 1,\n"
+
" \"remain\": 2500\n"
+
" },\n"
+
" {\n"
+
" \"maxDuration\": 60,\n"
+
" \"name\": \"下午\",\n"
+
" \"beginTime\": \"2023-07-21 13:00:00\",\n"
+
" \"endTime\": \"2023-07-21 17:59:59\",\n"
+
" \"status\": 0,\n"
+
" \"remain\": 1000\n"
+
" }\n"
+
" ]\n"
+
" }\n"
+
" ]\n"
+
" }"
;
CapacityQueryDTO
.
Result
result
=
JSONUtil
.
toBean
(
json
,
CapacityQueryDTO
.
Result
.
class
);
CapacityQueryDTO
.
Result
result
=
new
CapacityQueryDTO
.
Result
();
return
Result
.
success
(
result
);
}
...
...
@@ -155,44 +105,7 @@ public class PeaApiController {
@RequestParam
(
"endDate"
)
Date
endDate
)
{
String
json
=
"{\n"
+
" \"engineerCode\": \"A124141214\",\n"
+
" \"engineerName\": \"祝枝山\",\n"
+
" \"datas\": [\n"
+
" {\n"
+
" \"date\": \"2023-07-21\",\n"
+
" \"segments\": [\n"
+
" {\n"
+
" \"maxDuration\": 90,\n"
+
" \"name\": \"全天\",\n"
+
" \"beginTime\": \"2023-07-21 08:00:00\",\n"
+
" \"endTime\": \"2023-07-21 17:59:59\",\n"
+
" \"status\": 1,\n"
+
" \"remain\": 3500\n"
+
" },\n"
+
" {\n"
+
" \"maxDuration\": 45,\n"
+
" \"name\": \"上午\",\n"
+
" \"beginTime\": \"2023-07-21 08:00:00\",\n"
+
" \"endTime\": \"2023-07-21 11:59:59\",\n"
+
" \"status\": 1,\n"
+
" \"remain\": 2500\n"
+
" },\n"
+
" {\n"
+
" \"maxDuration\": 60,\n"
+
" \"name\": \"下午\",\n"
+
" \"beginTime\": \"2023-07-21 13:00:00\",\n"
+
" \"endTime\": \"2023-07-21 17:59:59\",\n"
+
" \"status\": 0,\n"
+
" \"remain\": 1000\n"
+
" }\n"
+
" ]\n"
+
" }\n"
+
" ]\n"
+
" }"
;
CapacityQueryDTO
.
PersonalResult
result
=
JSONUtil
.
toBean
(
json
,
CapacityQueryDTO
.
PersonalResult
.
class
);
return
Result
.
success
(
result
);
return
Result
.
success
(
new
CapacityQueryDTO
.
PersonalResult
());
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment