Commit 628a4dc8 by 杨林龙

Merge remote-tracking branch 'origin/v1.5.0' into v1.5.0

2 parents 64a617eb 9dc76dd7
......@@ -57,6 +57,9 @@ public class WorkOrderApiController {
String decryptData = decryptRequestData(request.getOrganization(), request.getData());
if (request.getDataType() == 1) {//同步工单
SyncWorkOrderBO orderReq = JSON.parseObject(decryptData, SyncWorkOrderBO.class);
if ("ZL".equals(orderReq.getOrderSource())) {
orderReq.setOrderSource(request.getOrganization());
}
List<WorkOrder> list = workOrderService.syncWorkOrder(orderReq);
List<String> orderNoList = list.stream().map(WorkOrder::getOrderNo).collect(Collectors.toList());
return R.ok().data(orderNoList);
......
......@@ -35,9 +35,9 @@ public class VehiclePermit extends BaseEntity {
private Integer contentType;
/**
* 权限类型 0=读写 1=只读
* 权限类型 rw读写 r只读
*/
@Column(name = "permit_type")
private Integer permitType;
private String permitType;
}
\ No newline at end of file
package cn.com.glsx.stdinterface.modules.service;
import cn.com.glsx.stdinterface.common.exception.StdInterfaceException;
import cn.com.glsx.stdinterface.modules.util.RopHttpUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
......@@ -34,8 +34,9 @@ public class MessageService {
* @param type 类型
* @param context 发送内容
*/
@Async
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 {
params.add("phone", phone);
params.add("source", source);
......@@ -45,11 +46,14 @@ public class MessageService {
String post = RopHttpUtil.postE(params, String.class, sendMessageUrl + "?method=" + sendMessageMethod, sendMessageMethod);
log.info("发送短信结果{}", post);
} catch (Exception e) {
e.printStackTrace();
log.info("发送短信异常,{}", e.getMessage());
throw new StdInterfaceException("4444444", e.getMessage());
log.error("发送短信到{}异常,{}", phone, e.getMessage());
//throw new StdInterfaceException("444444", e.getMessage());
}
}
// public static void main(String[] args) {
// MessageService messageService = new MessageService();
// messageService.sendMessage("18682185876", "eshield_workOrder_warm", "1", "this is a test!");
// }
}
......@@ -41,7 +41,6 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -1009,7 +1008,7 @@ public class WorkOrderService {
}
/**
* 激活工单信息,激活是以车为单位,不是以工单,一个工单可以包含多辆车
* 激活工单信息,激活是以车为单位,不是以工单,一个工单包含一辆车
*
* @param orderReq
*/
......@@ -1285,7 +1284,6 @@ public class WorkOrderService {
* @param workOrder
* @param vehicle
*/
@Async
public void finishedNotifyTarget(WorkOrder workOrder, Vehicle vehicle) {
String receiveNumbers = workOrder.getNotifyTarget();
if (StringUtils.isNullOrEmpty(receiveNumbers)) {
......
......@@ -74,7 +74,7 @@ public class ZhongliVehicleService {
vp.setAccorderId(zlgj.getUserId());
vp.setReceiverId(account.getUserId());
vp.setContentType(0);
vp.setPermitType(1);
vp.setPermitType("r");
vp.setCreatedDate(new Date());
permitList.add(vp);
});
......
......@@ -10,7 +10,7 @@
<result column="accorder_id" jdbcType="INTEGER" property="accorderId"/>
<result column="receiver_id" jdbcType="INTEGER" property="receiverId"/>
<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="created_date" jdbcType="TIMESTAMP" property="createdDate"/>
<result column="created_by" jdbcType="INTEGER" property="createdBy"/>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!