parent
8ad69bf57a
commit
9d5865cc15
|
|
@ -16,6 +16,8 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -63,7 +65,14 @@ public class ExpSubscribeController extends BaseController
|
||||||
public TableDataInfo list(ExpSubscribe expSubscribe)
|
public TableDataInfo list(ExpSubscribe expSubscribe)
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
List<ExpSubscribe> list = expSubscribeService.selectExpSubscribeList(expSubscribe);
|
List<ExpSubscribe> list = new ArrayList<>();
|
||||||
|
if(expSubscribe.getNumber().contains(",")){
|
||||||
|
List<String> number= Arrays.asList(expSubscribe.getNumber().split(","));
|
||||||
|
list=expSubscribeService.selectExpSubsPushRespByNumber(number);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
list = expSubscribeService.selectExpSubscribeList(expSubscribe);
|
||||||
|
}
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ruoyi.bps.mapper;
|
package com.ruoyi.bps.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.bps.domain.ExpSubsPushResp;
|
||||||
import com.ruoyi.bps.domain.ExpSubscribe;
|
import com.ruoyi.bps.domain.ExpSubscribe;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
|
@ -61,4 +62,12 @@ public interface ExpSubscribeMapper
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteExpSubscribeByIds(String[] sids);
|
public int deleteExpSubscribeByIds(String[] sids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据快递单号查询快递订阅推送信息
|
||||||
|
*
|
||||||
|
* @param number 快递单号List
|
||||||
|
* @return 快递订阅推送信息
|
||||||
|
*/
|
||||||
|
public List<ExpSubscribe> selectExpSubscribeByNumber(List<String> number);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ruoyi.bps.service;
|
package com.ruoyi.bps.service;
|
||||||
|
|
||||||
|
import com.ruoyi.bps.domain.ExpSubsPushResp;
|
||||||
import com.ruoyi.bps.domain.ExpSubscribe;
|
import com.ruoyi.bps.domain.ExpSubscribe;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -59,4 +60,12 @@ public interface IExpSubscribeService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteExpSubscribeById(Long sid);
|
public int deleteExpSubscribeById(Long sid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据快递单号查询快递订阅推送信息
|
||||||
|
*
|
||||||
|
* @param number 快递单号List
|
||||||
|
* @return 快递订阅推送信息
|
||||||
|
*/
|
||||||
|
public List<ExpSubscribe> selectExpSubsPushRespByNumber(List<String> number);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ruoyi.bps.service.impl;
|
package com.ruoyi.bps.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.bps.domain.ExpSubsPushResp;
|
||||||
import com.ruoyi.bps.domain.ExpSubscribe;
|
import com.ruoyi.bps.domain.ExpSubscribe;
|
||||||
import com.ruoyi.bps.mapper.ExpSubscribeMapper;
|
import com.ruoyi.bps.mapper.ExpSubscribeMapper;
|
||||||
import com.ruoyi.bps.service.IExpSubscribeService;
|
import com.ruoyi.bps.service.IExpSubscribeService;
|
||||||
|
|
@ -92,4 +93,16 @@ public class ExpSubscribeServiceImpl implements IExpSubscribeService
|
||||||
{
|
{
|
||||||
return expSubscribeMapper.deleteExpSubscribeById(sid);
|
return expSubscribeMapper.deleteExpSubscribeById(sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据快递单号查询快递订阅推送信息
|
||||||
|
*
|
||||||
|
* @param number 快递单号List
|
||||||
|
* @return 快递订阅推送信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ExpSubscribe> selectExpSubsPushRespByNumber(List<String> number){
|
||||||
|
return expSubscribeMapper.selectExpSubscribeByNumber(number);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,5 @@
|
||||||
package com.ruoyi.bps.service.impl;
|
package com.ruoyi.bps.service.impl;
|
||||||
|
|
||||||
//import com.ruoyi.bps.express.api.QueryTrack;
|
|
||||||
//import com.ruoyi.bps.express.api.Subscribe;
|
|
||||||
//import com.ruoyi.bps.express.contant.ApiInfoConstant;
|
|
||||||
//import com.ruoyi.bps.express.contant.CompanyConstant;
|
|
||||||
//import com.ruoyi.bps.express.core.IBaseClient;
|
|
||||||
//import com.ruoyi.bps.express.pojo.HttpResult;
|
|
||||||
//import com.ruoyi.bps.express.request.*;
|
|
||||||
|
|
||||||
//import com.ruoyi.bps.express.response.QueryTrackResp;
|
|
||||||
//import com.ruoyi.bps.express.utils.PropertiesReader;
|
|
||||||
//import com.ruoyi.bps.express.utils.SignUtils;
|
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.kuaidi100.sdk.api.QueryTrack;
|
import com.kuaidi100.sdk.api.QueryTrack;
|
||||||
|
|
|
||||||
|
|
@ -87,4 +87,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectExpSubscribeByNumber" resultMap="ExpSubscribeResult">
|
||||||
|
<include refid="selectExpSubscribeVo"/>
|
||||||
|
where number in
|
||||||
|
<foreach item="number" collection="list" open="(" separator="," close=")">
|
||||||
|
#{number}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
<head>
|
<head>
|
||||||
<th:block th:include="include :: header('新增快递订阅')" />
|
<th:block th:include="include :: header('新增快递订阅')" />
|
||||||
|
<th:block th:include="include :: select2-css" />
|
||||||
</head>
|
</head>
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
|
@ -17,7 +18,7 @@
|
||||||
<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-8">
|
<div class="col-sm-8">
|
||||||
<input name="number" class="form-control" type="text">
|
<input name="number" id="number" class="form-control" type="text">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -26,7 +27,7 @@
|
||||||
<input name="phone" class="form-control" type="text">
|
<input name="phone" class="form-control" type="text">
|
||||||
</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-8">
|
<div class="col-sm-8">
|
||||||
<input name="salt" class="form-control" type="text">
|
<input name="salt" class="form-control" type="text">
|
||||||
|
|
@ -55,10 +56,11 @@
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="message" class="form-control" type="text">
|
<input name="message" class="form-control" type="text">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<th:block th:include="include :: footer" />
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: select2-js" />
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
var prefix = ctx + "bps/subscribe"
|
var prefix = ctx + "bps/subscribe"
|
||||||
$("#form-subscribe-add").validate({
|
$("#form-subscribe-add").validate({
|
||||||
|
|
@ -67,9 +69,33 @@
|
||||||
|
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
$.operate.save(prefix + "/add", $('#form-subscribe-add').serialize());
|
//$.operate.save(prefix + "/add", $('#form-subscribe-add').serialize());
|
||||||
|
sendForm();
|
||||||
|
$.modal.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sendForm() {
|
||||||
|
var formObject={};
|
||||||
|
$("#form-subscribe-add").serializeArray().map(function(val,key){formObject[val.name]=val.value;})
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url:ctx+"/bps/subscribe/subscribe",
|
||||||
|
type:"POST",
|
||||||
|
contentType: "application/json",
|
||||||
|
data: JSON.stringify(formObject),
|
||||||
|
dataType: "json",
|
||||||
|
success:function(data){
|
||||||
|
alert(JSON.stringify(data));
|
||||||
|
parent.$("#number").val($("#number").val());
|
||||||
|
parent.$.table.search();
|
||||||
|
},
|
||||||
|
error:function(e){
|
||||||
|
alert("错误!!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
<th:block th:include="include :: select2-css" />
|
<th:block th:include="include :: select2-css" />
|
||||||
</head>
|
</head>
|
||||||
<body class="gray-bg">
|
<body class="gray-bg">
|
||||||
|
<div id="userids"></div>
|
||||||
<div class="container-div">
|
<div class="container-div">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 search-collapse">
|
<div class="col-sm-12 search-collapse">
|
||||||
|
|
@ -20,7 +21,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label>快递单号:</label>
|
<label>快递单号:</label>
|
||||||
<input type="text" name="number"/>
|
<input type="text" id="number" name="number"/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label>收/寄件人电话:</label>
|
<label>收/寄件人电话:</label>
|
||||||
|
|
@ -39,12 +40,12 @@
|
||||||
<input type="text" name="returnCode"/>
|
<input type="text" name="returnCode"/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search();"><i class="fa fa-search"></i> 搜索</a>
|
||||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<!-- <li>
|
||||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="sendForm()"><i class="fa fa-check"></i> 订阅</a>
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="sendForm()"><i class="fa fa-check"></i> 订阅</a>
|
||||||
</li>
|
</li>-->
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
@ -142,12 +143,15 @@
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
});
|
});
|
||||||
|
|
||||||
function sendForm() {
|
/* function sendForm() {
|
||||||
var formObject = {};
|
/!* var formObject = {};
|
||||||
var formArray =$("#formId").serializeArray();
|
var formArray =$("#formId").serializeArray();
|
||||||
$.each(formArray,function(i,item){
|
$.each(formArray,function(i,item){
|
||||||
formObject[item.name] = item.value;
|
formObject[item.name] = item.value;
|
||||||
});
|
});*!/
|
||||||
|
var formObject={};
|
||||||
|
$("#formId").serializeArray().map(function(val,key){formObject[val.name]=val.value;})
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:ctx+"/bps/subscribe/subscribe",
|
url:ctx+"/bps/subscribe/subscribe",
|
||||||
type:"POST",
|
type:"POST",
|
||||||
|
|
@ -163,7 +167,7 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};*/
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue