Commit d91ab967 by ddx

dtest

parent cec3447c
...@@ -41,6 +41,11 @@ import javax.servlet.http.HttpServletResponse; ...@@ -41,6 +41,11 @@ import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Comparator; import java.util.Comparator;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -906,6 +911,29 @@ public class JxSampleController { ...@@ -906,6 +911,29 @@ public class JxSampleController {
} }
} }
@PostMapping("/management/query/smsSend/limit/page")
public String querySmsSendLimitPage(@RequestBody ManagementQueryIncomeSmsSend managementQueryIncomeSmsSend) {
try {
if (managementQueryIncomeSmsSend.getPageSize() > 100) {
managementQueryIncomeSmsSend.setPageSize(100);
}
LocalDateTime curDateStart =
LocalDateTime.ofInstant(Instant.ofEpochMilli(Long.parseLong(managementQueryIncomeSmsSend.getReqDateStart())), ZoneId.systemDefault());
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
managementQueryIncomeSmsSend.setReqDateStart(curDateStart.plusHours(-1).format(formatter));
managementQueryIncomeSmsSend.setReqDateEnd(curDateStart.plusHours(1).format(formatter));
log.info("query income smsSend limit page param:{}", JSONUtil.toString(managementQueryIncomeSmsSend));
String response = HttpUtil.createPost(incomeSmsSendRequestQueryListUrl).contentType("application/json")
.body(JSON.toJSONString(managementQueryIncomeSmsSend)).execute().body();
log.info("query income smsSend limit page response:{}", response);
return this.handlePageResult(response);
} catch (Exception e) {
log.error("query income smsSend limit page error:", e);
return "{}";
}
}
@GetMapping("/get-dqdm") @GetMapping("/get-dqdm")
public String getDqdm(String taxno) { public String getDqdm(String taxno) {
return etaxConfigService.getArea(taxno); return etaxConfigService.getArea(taxno);
......
...@@ -19,4 +19,6 @@ public class ManagementQueryToken { ...@@ -19,4 +19,6 @@ public class ManagementQueryToken {
private String serverNo; private String serverNo;
private String taxno; private String taxno;
private String requestType; private String requestType;
private String reqDateStart;
private String reqDateEnd;
} }
...@@ -91,6 +91,10 @@ ...@@ -91,6 +91,10 @@
<div class="col-sm-4"> <div class="col-sm-4">
<input class="form-control" id="taxLoginName" value=""> <input class="form-control" id="taxLoginName" value="">
</div> </div>
<label class="col-sm-2 control-label">请求时间:</label>
<div class="col-sm-4">
<input class="form-control" id="tokenStartDate" size="12" placeholder="yyyy-MM-dd HH:mm:ss" onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})"> - <input class="form-control" id="tokenEndDate" size="12" placeholder="yyyy-MM-dd HH:mm:ss" onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})">
</div>
</div> </div>
</div> </div>
</form> </form>
...@@ -118,7 +122,7 @@ ...@@ -118,7 +122,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">请求值:</label> <label class="col-sm-3 control-label">用户信息:</label>
<div class="col-sm-9"> <div class="col-sm-9">
<textarea class="form-control" id="incomeTokenSampleRequest" cols="60" rows="3"></textarea> <textarea class="form-control" id="incomeTokenSampleRequest" cols="60" rows="3"></textarea>
</div> </div>
...@@ -160,6 +164,23 @@ ...@@ -160,6 +164,23 @@
</div><!-- /.modal-content --> </div><!-- /.modal-content -->
</div><!-- /.modal-dialog --> </div><!-- /.modal-dialog -->
</div> </div>
<div class="modal fade" id="incomeSmsSampleModal" tabindex="-1" role="dialog" aria-labelledby="incomeSmsSampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="incomeSmsCompletePeriodModalLabel">
income sms sample
</h4>
</div>
<div class="modal-body">
<div class="box-body">
<table id="querySmsTable"></table>
</div>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>
</body> </body>
</html> </html>
function initAll() { function initAll() {
initDate();
initAllUsernameList("userCode"); initAllUsernameList("userCode");
initAllAreaCodeList("areaCode"); initAllAreaCodeList("areaCode");
queryPageList(); queryPageList();
...@@ -19,6 +20,8 @@ function queryPageList() { ...@@ -19,6 +20,8 @@ function queryPageList() {
var errorMessage = $("#errorMessage").val(); var errorMessage = $("#errorMessage").val();
var errorCode = $("#errorCode").val(); var errorCode = $("#errorCode").val();
var taxLoginName = $("#taxLoginName").val(); var taxLoginName = $("#taxLoginName").val();
var tokenEndDate = $("#tokenEndDate").val();
var tokenStartDate = $("#tokenStartDate").val();
$('#queryTaxUserTable').bootstrapTable({ $('#queryTaxUserTable').bootstrapTable({
url: 'jxSample/management/query/real/token/page', //接口地址 url: 'jxSample/management/query/real/token/page', //接口地址
method: 'post', method: 'post',
...@@ -34,6 +37,8 @@ function queryPageList() { ...@@ -34,6 +37,8 @@ function queryPageList() {
errorMessage: errorMessage, errorMessage: errorMessage,
errorCode: errorCode, errorCode: errorCode,
taxLoginName: taxLoginName, taxLoginName: taxLoginName,
reqDateStart: tokenStartDate,
reqDateEnd: tokenEndDate,
taxno: taxno taxno: taxno
}; };
return param; return param;
...@@ -111,7 +116,22 @@ function queryPageList() { ...@@ -111,7 +116,22 @@ function queryPageList() {
{field: 'errorMessage', title: '异常信息'}, {field: 'errorMessage', title: '异常信息'},
{field: 'taxLoginName', title: '登录名'}, {field: 'taxLoginName', title: '登录名'},
{field: 'lostTime', title: '耗时ms'}, {field: 'lostTime', title: '耗时ms'},
{field: '', title: '详情', formatter: function(value, row, index) { {field: '', title: '短信', formatter: function(value, row, index) {
var reqDate = row["reqDate"];
var areaCode = row["zoneCode"];
var userCode = row["userCode"];
var cellphone = row["taxLoginName"];
if (cellphone != undefined && cellphone != "") {
var viewButton = '<a class="edit ml10" ' +
'href="javascript:openSmsSampleModal(\'' + cellphone + '\',\'' + areaCode + '\',\'' + userCode + '\',\'' + reqDate + '\');">详情</a>';
return viewButton;
} else {
return "--";
}
}
},
{field: '', title: '明细', formatter: function(value, row, index) {
var applyId = row["id"]; var applyId = row["id"];
var viewButton = '<a class="edit ml10" href="javascript:openTokenSampleModal(\'' + applyId + '\');">详情</a>'; var viewButton = '<a class="edit ml10" href="javascript:openTokenSampleModal(\'' + applyId + '\');">详情</a>';
return viewButton; return viewButton;
...@@ -120,7 +140,7 @@ function queryPageList() { ...@@ -120,7 +140,7 @@ function queryPageList() {
{field: '', title: '清除', formatter: function(value, row, index) { {field: '', title: '清除', formatter: function(value, row, index) {
var applyId = row["id"]; var applyId = row["id"];
var secretMd5 = row["secretMd5"]; var secretMd5 = row["secretMd5"];
if (applyId > 0 && secretMd5 != "") { if (applyId > 0 && secretMd5 != undefined && secretMd5 != "") {
var viewButton = '<a class="edit ml10" href="javascript:openSampleModal(\'' + applyId + '\');">清除</a>'; var viewButton = '<a class="edit ml10" href="javascript:openSampleModal(\'' + applyId + '\');">清除</a>';
return viewButton; return viewButton;
} else { } else {
...@@ -192,6 +212,77 @@ function openSampleModal(applyId) { ...@@ -192,6 +212,77 @@ function openSampleModal(applyId) {
}); });
} }
function openSmsSampleModal(cellphone, areaCode, userCode, reqDate) {
if (userCode === '' || userCode === null) {
alert("请输入userCode.");
return;
}
$('#querySmsTable').bootstrapTable('destroy');
$('#incomeSmsSampleModal').modal('show');
querySmsPageList(cellphone, areaCode, userCode, reqDate);
}
function querySmsPageList(cellphone, areaCode, userCode, reqDate) {
$('#querySmsTable').bootstrapTable({
url: 'jxSample/management/query/smsSend/limit/page', //接口地址
method: 'post',
contentType:"application/json",
dataType: 'json',
queryParams: function queryParams(params) { //设置查询参数
var param = {
pageSize: params.limit, //每页多少条数据
pageNumber: (params.offset / params.limit) + 1, //计算当前页码
userCode: userCode,
zoneCode: areaCode,
cellphone: cellphone,
reqDateStart: reqDate
};
return param;
},
height: 360,
striped: true, //是否显示行间隔色
pagination: true, //是否显示分页(*)
maintainSelected: true, //设置为 true 在点击分页按钮或搜索按钮时,将记住checkbox的选择项
sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*)
pageNumber: 1, //初始化加载第一页,默认第一页
pageSize: 10, //每页的记录行数(*)
pageList: [5, 10, 25, 50, 100], //可供选择的每页的行数(*)
search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端
strictSearch: false, //设置为 true启用 全匹配搜索,否则为模糊搜索
showRefresh: false, //是否显示刷新按钮
minimumCountColumns: 2, //最少允许的列数
uniqueId: "id", //每一行的唯一标识,一般为主键列
sortStable: true,
columns: [
{field: 'id', title: 'id'},
{field: 'userCode', title: '用户'},
{field: 'cellphone', title: '手机号'},
{field: 'resCode', title: '返回码'},
{field: 'timeFlag', title: '日志码'},
{field: '', title: '请求时间', formatter: function(value, row, index) {
var reqDate = row["reqDate"];
if (reqDate === undefined) {
return '-';
}
return new Date(reqDate).format('yyyy-MM-dd HH:mm:ss');
}
},
{field: '', title: '返回时间', formatter: function(value, row, index) {
var resDate = row["resDate"];
if (resDate === undefined) {
return '-';
}
return new Date(resDate).format('yyyy-MM-dd HH:mm:ss');
}
},
{field: 'timeDiff', title: '时间差'},
{field: 'zoneCode', title: '地区'},
{field: 'reqParams', title: '请求参数'},
{field: 'resContext', title: '返回参数'}
]
});
}
function initAllUsernameList(usernameId) { function initAllUsernameList(usernameId) {
var username = $("#" + usernameId).val(); var username = $("#" + usernameId).val();
if (username == "") { if (username == "") {
...@@ -254,3 +345,14 @@ function setElapsedMillisRange() { ...@@ -254,3 +345,14 @@ function setElapsedMillisRange() {
$("#startElapsedMillis").val(0); $("#startElapsedMillis").val(0);
$("#endElapsedMillis").val(endElapsedMillis); $("#endElapsedMillis").val(endElapsedMillis);
} }
function initDate() {
var tokenStartDate = $("#tokenStartDate").val();
var tokenEndDate = $("#tokenEndDate").val();
if (tokenStartDate === '') {
$("#tokenStartDate").val(getTodayHeadTime());
}
if (tokenEndDate === '') {
$("#tokenEndDate").val(getTodayTailTime());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment