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 8acf8f2b
authored
Oct 31, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:批量改约指派
1 parent
df5ab310
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
5 deletions
project-order/src/main/java/com/dituhui/pea/order/controller/OrderAssignController.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderCreateServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderInfoServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/controller/OrderAssignController.java
View file @
8acf8f2
...
@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.*;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.List
;
@RestController
@RestController
@RequestMapping
(
"/pea-order"
)
@RequestMapping
(
"/pea-order"
)
...
@@ -50,6 +51,20 @@ public class OrderAssignController {
...
@@ -50,6 +51,20 @@ public class OrderAssignController {
return
res
;
return
res
;
}
}
@PostMapping
(
"/order/assign/list"
)
public
Result
<?>
orderAssign
(
@RequestBody
List
<
OrderAssignReq
>
assignReqList
)
{
// 服务单指派-指派提交
try
{
for
(
OrderAssignReq
assignReq
:
assignReqList
)
{
orderAssign
.
orderAssign
(
assignReq
);
}
}
catch
(
BusinessException
e
)
{
return
Result
.
failed
(
e
.
getMessage
());
}
return
Result
.
success
();
}
@PostMapping
(
"/order/revoke/assign"
)
@PostMapping
(
"/order/revoke/assign"
)
public
Result
<?>
orderRevokeAssign
(
@RequestBody
OrderRevokeAssign
req
)
{
public
Result
<?>
orderRevokeAssign
(
@RequestBody
OrderRevokeAssign
req
)
{
// 放回工单池
// 放回工单池
...
@@ -73,4 +88,23 @@ public class OrderAssignController {
...
@@ -73,4 +88,23 @@ public class OrderAssignController {
}
}
return
res
;
return
res
;
}
}
/**
* 批量改约
*
* @param rescheduleList
* @return
*/
@PostMapping
(
"/order/rescheduling/list"
)
public
Result
<?>
orderRescheduling
(
@RequestBody
List
<
OrderReschedule
>
rescheduleList
)
{
// 订单改约
try
{
for
(
OrderReschedule
reschedule
:
rescheduleList
)
{
orderInfoService
.
orderReschedule
(
reschedule
);
}
}
catch
(
BusinessException
e
)
{
return
Result
.
failed
(
e
.
getMessage
());
}
return
Result
.
success
();
}
}
}
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderCreateServiceImpl.java
View file @
8acf8f2
...
@@ -91,6 +91,9 @@ public class OrderCreateServiceImpl implements OrderCreateService {
...
@@ -91,6 +91,9 @@ public class OrderCreateServiceImpl implements OrderCreateService {
private
OrgGroupDao
orgGroupDao
;
private
OrgGroupDao
orgGroupDao
;
@Autowired
@Autowired
private
OrgBranchDao
orgBranchDao
;
@Autowired
private
MsgService
msgService
;
private
MsgService
msgService
;
@Autowired
@Autowired
...
@@ -154,13 +157,12 @@ public class OrderCreateServiceImpl implements OrderCreateService {
...
@@ -154,13 +157,12 @@ public class OrderCreateServiceImpl implements OrderCreateService {
if
(
fendanResult
.
getCode
().
equals
(
StatusCodeEnum
.
FENDAN_IS_TRANSCEND
.
getCode
()))
{
if
(
fendanResult
.
getCode
().
equals
(
StatusCodeEnum
.
FENDAN_IS_TRANSCEND
.
getCode
()))
{
entity
.
setTranscend
(
1
);
entity
.
setTranscend
(
1
);
}
}
OrgGroupEntity
groupDaoByCitycodeListLike
=
orgGroupDao
.
getByCitycodeListLike
(
adminDistrict
.
getResult
().
getSubNames
().
getCounty
());
OrgBranchEntity
branchEntity
=
orgBranchDao
.
findByCitycodeListLike
(
"%"
+
adminDistrict
.
getResult
().
getSubNames
().
getCounty
()
+
"%"
);
entity
.
setOrgClusterId
(
groupDaoByCitycodeListLike
.
getClusterId
());
entity
.
setOrgClusterId
(
branchEntity
.
getClusterId
());
entity
.
setOrgBranchId
(
groupDaoByCitycodeListLike
.
getBranchId
());
entity
.
setOrgBranchId
(
branchEntity
.
getBranchId
());
entity
.
setOrgGroupId
(
groupDaoByCitycodeListLike
.
getGroupId
());
//发送通知分部消息
//发送通知分部消息
MsgDTO
msgDTO
=
new
MsgDTO
();
MsgDTO
msgDTO
=
new
MsgDTO
();
msgDTO
.
set
GroupId
(
groupDaoByCitycodeListLike
.
getGroup
Id
());
msgDTO
.
set
BranchId
(
branchEntity
.
getBranch
Id
());
msgDTO
.
setType
(
0
);
msgDTO
.
setType
(
0
);
msgDTO
.
setOrderIds
(
orderId
);
msgDTO
.
setOrderIds
(
orderId
);
msgDTO
.
setContent
(
"有1条预约日期在"
+
entity
.
getExpectTimeBegin
().
toLocalDate
()
+
"的工单需人工外理"
);
msgDTO
.
setContent
(
"有1条预约日期在"
+
entity
.
getExpectTimeBegin
().
toLocalDate
()
+
"的工单需人工外理"
);
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderInfoServiceImpl.java
View file @
8acf8f2
...
@@ -256,7 +256,15 @@ public class OrderInfoServiceImpl implements OrderInfoService {
...
@@ -256,7 +256,15 @@ public class OrderInfoServiceImpl implements OrderInfoService {
return
Result
.
success
(
null
);
return
Result
.
success
(
null
);
}
}
/**
* 改约
*
* @param req
* @return
* @throws BusinessException
*/
@Override
@Override
@Transactional
public
Result
<?>
orderReschedule
(
OrderReschedule
req
)
throws
BusinessException
{
public
Result
<?>
orderReschedule
(
OrderReschedule
req
)
throws
BusinessException
{
// 判断是否分配到人和是否是今天
// 判断是否分配到人和是否是今天
LocalDateTime
expectBegin
=
TimeUtils
.
IsoDateTime2LocalDateTime
(
req
.
getExpectBegin
());
LocalDateTime
expectBegin
=
TimeUtils
.
IsoDateTime2LocalDateTime
(
req
.
getExpectBegin
());
...
...
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