Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-standard-interfaces
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 628a4dc8
authored
Mar 23, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/v1.5.0' into v1.5.0
2 parents
64a617eb
9dc76dd7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
12 deletions
src/main/java/cn/com/glsx/stdinterface/modules/api/WorkOrderApiController.java
src/main/java/cn/com/glsx/stdinterface/modules/entity/VehiclePermit.java
src/main/java/cn/com/glsx/stdinterface/modules/service/MessageService.java
src/main/java/cn/com/glsx/stdinterface/modules/service/WorkOrderService.java
src/main/java/cn/com/glsx/stdinterface/modules/service/ZhongliVehicleService.java
src/main/resources/mapper/VehiclePermitMapper.xml
src/main/java/cn/com/glsx/stdinterface/modules/api/WorkOrderApiController.java
View file @
628a4dc
...
@@ -57,6 +57,9 @@ public class WorkOrderApiController {
...
@@ -57,6 +57,9 @@ public class WorkOrderApiController {
String
decryptData
=
decryptRequestData
(
request
.
getOrganization
(),
request
.
getData
());
String
decryptData
=
decryptRequestData
(
request
.
getOrganization
(),
request
.
getData
());
if
(
request
.
getDataType
()
==
1
)
{
//同步工单
if
(
request
.
getDataType
()
==
1
)
{
//同步工单
SyncWorkOrderBO
orderReq
=
JSON
.
parseObject
(
decryptData
,
SyncWorkOrderBO
.
class
);
SyncWorkOrderBO
orderReq
=
JSON
.
parseObject
(
decryptData
,
SyncWorkOrderBO
.
class
);
if
(
"ZL"
.
equals
(
orderReq
.
getOrderSource
()))
{
orderReq
.
setOrderSource
(
request
.
getOrganization
());
}
List
<
WorkOrder
>
list
=
workOrderService
.
syncWorkOrder
(
orderReq
);
List
<
WorkOrder
>
list
=
workOrderService
.
syncWorkOrder
(
orderReq
);
List
<
String
>
orderNoList
=
list
.
stream
().
map
(
WorkOrder:
:
getOrderNo
).
collect
(
Collectors
.
toList
());
List
<
String
>
orderNoList
=
list
.
stream
().
map
(
WorkOrder:
:
getOrderNo
).
collect
(
Collectors
.
toList
());
return
R
.
ok
().
data
(
orderNoList
);
return
R
.
ok
().
data
(
orderNoList
);
...
...
src/main/java/cn/com/glsx/stdinterface/modules/entity/VehiclePermit.java
View file @
628a4dc
...
@@ -35,9 +35,9 @@ public class VehiclePermit extends BaseEntity {
...
@@ -35,9 +35,9 @@ public class VehiclePermit extends BaseEntity {
private
Integer
contentType
;
private
Integer
contentType
;
/**
/**
* 权限类型
0=读写 1=
只读
* 权限类型
rw读写 r
只读
*/
*/
@Column
(
name
=
"permit_type"
)
@Column
(
name
=
"permit_type"
)
private
Integer
permitType
;
private
String
permitType
;
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/stdinterface/modules/service/MessageService.java
View file @
628a4dc
package
cn
.
com
.
glsx
.
stdinterface
.
modules
.
service
;
package
cn
.
com
.
glsx
.
stdinterface
.
modules
.
service
;
import
cn.com.glsx.stdinterface.common.exception.StdInterfaceException
;
import
cn.com.glsx.stdinterface.modules.util.RopHttpUtil
;
import
cn.com.glsx.stdinterface.modules.util.RopHttpUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cloud.context.config.annotation.RefreshScope
;
import
org.springframework.cloud.context.config.annotation.RefreshScope
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.util.MultiValueMap
;
...
@@ -34,8 +34,9 @@ public class MessageService {
...
@@ -34,8 +34,9 @@ public class MessageService {
* @param type 类型
* @param type 类型
* @param context 发送内容
* @param context 发送内容
*/
*/
@Async
public
void
sendMessage
(
String
phone
,
String
source
,
String
type
,
String
context
)
{
public
void
sendMessage
(
String
phone
,
String
source
,
String
type
,
String
context
)
{
MultiValueMap
<
String
,
String
>
params
=
new
LinkedMultiValueMap
<>(
4
);
MultiValueMap
<
String
,
String
>
params
=
new
LinkedMultiValueMap
<>(
5
);
try
{
try
{
params
.
add
(
"phone"
,
phone
);
params
.
add
(
"phone"
,
phone
);
params
.
add
(
"source"
,
source
);
params
.
add
(
"source"
,
source
);
...
@@ -45,11 +46,14 @@ public class MessageService {
...
@@ -45,11 +46,14 @@ public class MessageService {
String
post
=
RopHttpUtil
.
postE
(
params
,
String
.
class
,
sendMessageUrl
+
"?method="
+
sendMessageMethod
,
sendMessageMethod
);
String
post
=
RopHttpUtil
.
postE
(
params
,
String
.
class
,
sendMessageUrl
+
"?method="
+
sendMessageMethod
,
sendMessageMethod
);
log
.
info
(
"发送短信结果{}"
,
post
);
log
.
info
(
"发送短信结果{}"
,
post
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"发送短信到{}异常,{}"
,
phone
,
e
.
getMessage
());
log
.
info
(
"发送短信异常,{}"
,
e
.
getMessage
());
//throw new StdInterfaceException("444444", e.getMessage());
throw
new
StdInterfaceException
(
"4444444"
,
e
.
getMessage
());
}
}
}
}
// public static void main(String[] args) {
// MessageService messageService = new MessageService();
// messageService.sendMessage("18682185876", "eshield_workOrder_warm", "1", "this is a test!");
// }
}
}
src/main/java/cn/com/glsx/stdinterface/modules/service/WorkOrderService.java
View file @
628a4dc
...
@@ -41,7 +41,6 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -41,7 +41,6 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -1009,7 +1008,7 @@ public class WorkOrderService {
...
@@ -1009,7 +1008,7 @@ public class WorkOrderService {
}
}
/**
/**
* 激活工单信息,激活是以车为单位,不是以工单,一个工单
可以包含多
辆车
* 激活工单信息,激活是以车为单位,不是以工单,一个工单
包含一
辆车
*
*
* @param orderReq
* @param orderReq
*/
*/
...
@@ -1285,7 +1284,6 @@ public class WorkOrderService {
...
@@ -1285,7 +1284,6 @@ public class WorkOrderService {
* @param workOrder
* @param workOrder
* @param vehicle
* @param vehicle
*/
*/
@Async
public
void
finishedNotifyTarget
(
WorkOrder
workOrder
,
Vehicle
vehicle
)
{
public
void
finishedNotifyTarget
(
WorkOrder
workOrder
,
Vehicle
vehicle
)
{
String
receiveNumbers
=
workOrder
.
getNotifyTarget
();
String
receiveNumbers
=
workOrder
.
getNotifyTarget
();
if
(
StringUtils
.
isNullOrEmpty
(
receiveNumbers
))
{
if
(
StringUtils
.
isNullOrEmpty
(
receiveNumbers
))
{
...
...
src/main/java/cn/com/glsx/stdinterface/modules/service/ZhongliVehicleService.java
View file @
628a4dc
...
@@ -74,7 +74,7 @@ public class ZhongliVehicleService {
...
@@ -74,7 +74,7 @@ public class ZhongliVehicleService {
vp
.
setAccorderId
(
zlgj
.
getUserId
());
vp
.
setAccorderId
(
zlgj
.
getUserId
());
vp
.
setReceiverId
(
account
.
getUserId
());
vp
.
setReceiverId
(
account
.
getUserId
());
vp
.
setContentType
(
0
);
vp
.
setContentType
(
0
);
vp
.
setPermitType
(
1
);
vp
.
setPermitType
(
"r"
);
vp
.
setCreatedDate
(
new
Date
());
vp
.
setCreatedDate
(
new
Date
());
permitList
.
add
(
vp
);
permitList
.
add
(
vp
);
});
});
...
...
src/main/resources/mapper/VehiclePermitMapper.xml
View file @
628a4dc
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<result
column=
"accorder_id"
jdbcType=
"INTEGER"
property=
"accorderId"
/>
<result
column=
"accorder_id"
jdbcType=
"INTEGER"
property=
"accorderId"
/>
<result
column=
"receiver_id"
jdbcType=
"INTEGER"
property=
"receiverId"
/>
<result
column=
"receiver_id"
jdbcType=
"INTEGER"
property=
"receiverId"
/>
<result
column=
"content_type"
jdbcType=
"TINYINT"
property=
"contentType"
/>
<result
column=
"content_type"
jdbcType=
"TINYINT"
property=
"contentType"
/>
<result
column=
"permit_type"
jdbcType=
"
TINYINT
"
property=
"permitType"
/>
<result
column=
"permit_type"
jdbcType=
"
VARCHAR
"
property=
"permitType"
/>
<result
column=
"del_flag"
jdbcType=
"TINYINT"
property=
"delFlag"
/>
<result
column=
"del_flag"
jdbcType=
"TINYINT"
property=
"delFlag"
/>
<result
column=
"created_date"
jdbcType=
"TIMESTAMP"
property=
"createdDate"
/>
<result
column=
"created_date"
jdbcType=
"TIMESTAMP"
property=
"createdDate"
/>
<result
column=
"created_by"
jdbcType=
"INTEGER"
property=
"createdBy"
/>
<result
column=
"created_by"
jdbcType=
"INTEGER"
property=
"createdBy"
/>
...
...
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