Your commit message
This commit is contained in:
parent
7d7ae23a42
commit
5fc54d3b17
@ -1,5 +1,6 @@
|
|||||||
package com.weiqi.mis.contorller;
|
package com.weiqi.mis.contorller;
|
||||||
|
|
||||||
|
import com.weiqi.mis.PushService;
|
||||||
import com.weiqi.vo.OrderInfoVo;
|
import com.weiqi.vo.OrderInfoVo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -21,6 +22,8 @@ public class CarController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
MsgService msgService;
|
MsgService msgService;
|
||||||
|
@Autowired
|
||||||
|
PushService pushService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -108,7 +111,8 @@ public class CarController {
|
|||||||
public Object tb(int id) {
|
public Object tb(int id) {
|
||||||
|
|
||||||
log.info("id= {}", id);
|
log.info("id= {}", id);
|
||||||
return ReturnValue.buildErrordata(0, "同步成功!");
|
return pushService.pushorder(id);
|
||||||
|
// return ReturnValue.buildErrordata(0, "同步成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "addinfo")
|
@RequestMapping(value = "addinfo")
|
||||||
|
|||||||
@ -124,7 +124,7 @@
|
|||||||
|
|
||||||
<logger name="java.sql" level="debug"></logger>
|
<logger name="java.sql" level="debug"></logger>
|
||||||
|
|
||||||
<root level="debug">
|
<root level="info">
|
||||||
<appender-ref ref="STDOUT"/>
|
<appender-ref ref="STDOUT"/>
|
||||||
<appender-ref ref="all"/>
|
<appender-ref ref="all"/>
|
||||||
<appender-ref ref="info"/>
|
<appender-ref ref="info"/>
|
||||||
|
|||||||
@ -171,13 +171,11 @@
|
|||||||
limits: [1000, 2000, 3000, 4000, 5000]
|
limits: [1000, 2000, 3000, 4000, 5000]
|
||||||
,
|
,
|
||||||
where: {
|
where: {
|
||||||
appid: $('#appid').val(),
|
id: $('#id').val(),
|
||||||
endTime: $('#endTime').val(),
|
endTime: $('#endTime').val(),
|
||||||
beginTime: $('#beginTime').val(),
|
beginTime: $('#beginTime').val(),
|
||||||
sendStatus: $('#sendStatus').val(),
|
status: $('#status').val(),
|
||||||
sp: $('#sp').val(),
|
platenumber: $('#platenumber').val()
|
||||||
message: $('#message').val(),
|
|
||||||
mobile: $('#mobile').val()
|
|
||||||
}
|
}
|
||||||
// ,cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
// ,cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||||
,
|
,
|
||||||
@ -186,13 +184,11 @@
|
|||||||
{title: '明细列表', colspan: 8}
|
{title: '明细列表', colspan: 8}
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
// {field:'msgid', title: '序号', sort: true}
|
|
||||||
// ,
|
|
||||||
{field: 'id', title: 'ID', width: 105}
|
{field: 'id', title: 'ID', width: 105}
|
||||||
, {field: 'orderno', title: '订单编号', sort: true, width: 150}
|
, {field: 'orderno', title: '订单编号', sort: true, width: 150}
|
||||||
, {
|
, {
|
||||||
field: 'mname', title: '施工单位名称', width: 220 }
|
field: 'mname', title: '施工单位名称', width: 220 }
|
||||||
, {field: 'orderuserid', title: '订单创建人id', width: 105} //minWidth:局部定义当前单元格的最小宽度,layui 2.2.1 新增
|
, {field: 'orderuserid', title: '创建人id', width: 105} //minWidth:局部定义当前单元格的最小宽度,layui 2.2.1 新增
|
||||||
, {field: 'orderusername', title: '订单创建人姓名', width: 150, sort: true}
|
, {field: 'orderusername', title: '订单创建人姓名', width: 150, sort: true}
|
||||||
, {field: 'platenumber', title: '车牌号', sort: true}
|
, {field: 'platenumber', title: '车牌号', sort: true}
|
||||||
, {fixed: 'right', title: '同步', toolbar: '#barDemo', width: '5%', edit: 'text'}
|
, {fixed: 'right', title: '同步', toolbar: '#barDemo', width: '5%', edit: 'text'}
|
||||||
@ -215,11 +211,12 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/mis/down/tb?id=' + data.id,
|
url: '/mis/down/tb?id=' + data.id,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
var code = data.code;
|
var code = data.returncode;
|
||||||
if (code == "-1") {
|
var msg = data.message;
|
||||||
layer.alert("删除失败!");
|
if (code == "0") {
|
||||||
|
layer.alert("同步成功!");
|
||||||
} else {
|
} else {
|
||||||
layer.alert("删除成功!");
|
layer.alert(msg);
|
||||||
}
|
}
|
||||||
doSearch();
|
doSearch();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,10 +63,16 @@ public class PushServiceImpl implements PushService {
|
|||||||
|
|
||||||
|
|
||||||
JSONObject pollutesave = pollutesave(wxXrPemsOrder, wxSgPolluteSdsList, orderId);
|
JSONObject pollutesave = pollutesave(wxXrPemsOrder, wxSgPolluteSdsList, orderId);
|
||||||
if (pollutesave.getInteger("returncode") != 2000) {
|
Integer returncode = pollutesave.getInteger("returncode");
|
||||||
|
if (returncode== 2000||returncode==3000) {
|
||||||
|
jsret.put("returncode", 0);
|
||||||
|
jsret.put("message", "调用接口保存成功xxx");
|
||||||
|
return jsret;
|
||||||
|
}else{
|
||||||
jsret.put("returncode", -1);
|
jsret.put("returncode", -1);
|
||||||
jsret.put("message", "调用接口保存订单失败");
|
jsret.put("message", "调用接口保存订单失败");
|
||||||
return jsret;
|
return jsret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -106,8 +112,14 @@ public class PushServiceImpl implements PushService {
|
|||||||
Map<String, String> fields = new HashMap<>();
|
Map<String, String> fields = new HashMap<>();
|
||||||
String body = "";
|
String body = "";
|
||||||
try {
|
try {
|
||||||
fields.put("mid", wxXrPemsOrder.getMid()+"");
|
//测试时只能写固定值,防止数据投送到其他站点
|
||||||
fields.put("userid", wxXrPemsOrder.getOrderuserid()+"");
|
fields.put("mid", "22");
|
||||||
|
fields.put("userid", "36");
|
||||||
|
fields.put("usid", "36");
|
||||||
|
|
||||||
|
// fields.put("mid", wxXrPemsOrder.getMid()+"");
|
||||||
|
// fields.put("userid", wxXrPemsOrder.getOrderuserid()+"");
|
||||||
|
// fields.put("usid", wxXrPemsOrder.getOrderuserid()+"");
|
||||||
fields.put("vin", wxXrPemsOrder.getVin());
|
fields.put("vin", wxXrPemsOrder.getVin());
|
||||||
fields.put("platenum", wxXrPemsOrder.getPlatenumber());
|
fields.put("platenum", wxXrPemsOrder.getPlatenumber());
|
||||||
fields.put("licensingtime", DateHelper.serialize(wxXrPemsOrder.getAdmissiontime(), DateHelper.DATEFORMAT_ONLY_DATE));
|
fields.put("licensingtime", DateHelper.serialize(wxXrPemsOrder.getAdmissiontime(), DateHelper.DATEFORMAT_ONLY_DATE));
|
||||||
@ -128,7 +140,6 @@ public class PushServiceImpl implements PushService {
|
|||||||
fields.put("timestamp", (System.currentTimeMillis() / 1000)+"");
|
fields.put("timestamp", (System.currentTimeMillis() / 1000)+"");
|
||||||
fields.put("udid", "000");
|
fields.put("udid", "000");
|
||||||
fields.put("noncestr", "000");
|
fields.put("noncestr", "000");
|
||||||
fields.put("usid", wxXrPemsOrder.getOrderuserid()+"");
|
|
||||||
fields.put("_sign", "77705A9803DCEBBD6006E07BF592882D");
|
fields.put("_sign", "77705A9803DCEBBD6006E07BF592882D");
|
||||||
|
|
||||||
String url = "https://api.mycar369.com/api/sg/createorder?";
|
String url = "https://api.mycar369.com/api/sg/createorder?";
|
||||||
@ -218,7 +229,8 @@ public class PushServiceImpl implements PushService {
|
|||||||
fields.put("timestamp", (System.currentTimeMillis()/1000)+"");
|
fields.put("timestamp", (System.currentTimeMillis()/1000)+"");
|
||||||
fields.put("udid", "000");
|
fields.put("udid", "000");
|
||||||
fields.put("noncestr", "000");
|
fields.put("noncestr", "000");
|
||||||
fields.put("usid", wxXrPemsOrder.getOrderuserid()+"");
|
fields.put("usid", "36");//TODO之后需要修改
|
||||||
|
// fields.put("usid", wxXrPemsOrder.getOrderuserid()+"");
|
||||||
fields.put("_sign", "77705A9803DCEBBD6006E07BF592882D");
|
fields.put("_sign", "77705A9803DCEBBD6006E07BF592882D");
|
||||||
body= HttpUtil.sendGetRequest(url, fields);
|
body= HttpUtil.sendGetRequest(url, fields);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user