记得上下班打卡 | git大法好,push需谨慎

Commit 564f076d authored by 胡佳晨's avatar 胡佳晨

Merge remote-tracking branch 'origin/dev' into dev

parents 7bed56af 72a1c0ba
...@@ -22,6 +22,7 @@ public class PerformanceExpressSearchAdminParam { ...@@ -22,6 +22,7 @@ public class PerformanceExpressSearchAdminParam {
private String orderStatus; private String orderStatus;
private String userMobile; private String userMobile;
private String userName;
private String expressStatus; private String expressStatus;
private String expressContacts; private String expressContacts;
......
...@@ -5,7 +5,6 @@ import com.liquidnet.client.admin.common.core.domain.AjaxResult; ...@@ -5,7 +5,6 @@ import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import com.liquidnet.client.admin.common.core.page.TableDataInfo; import com.liquidnet.client.admin.common.core.page.TableDataInfo;
import com.liquidnet.client.admin.zhengzai.kylin.service.impl.PerformancesExpressServiceImpl; import com.liquidnet.client.admin.zhengzai.kylin.service.impl.PerformancesExpressServiceImpl;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dao.OrderExpressListDao;
import com.liquidnet.service.kylin.dao.PerformanceExpressPerformanceListAdminDao; import com.liquidnet.service.kylin.dao.PerformanceExpressPerformanceListAdminDao;
import com.liquidnet.service.kylin.dao.PerformanceExpressPerformanceOrderListAdminDao; import com.liquidnet.service.kylin.dao.PerformanceExpressPerformanceOrderListAdminDao;
import com.liquidnet.service.kylin.dto.param.PerformanceExpressSearchAdminParam; import com.liquidnet.service.kylin.dto.param.PerformanceExpressSearchAdminParam;
......
...@@ -228,7 +228,7 @@ var table = { ...@@ -228,7 +228,7 @@ var table = {
}); });
// 加载成功、选中、取消、全部选中、全部取消(事件) // 加载成功、选中、取消、全部选中、全部取消(事件)
$(optionsIds).on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table load-success.bs.table", function () { $(optionsIds).on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table load-success.bs.table", function () {
var toolbar = table.options.toolbar; var toolbar = table.options.toolbar;
var uniqueId = table.options.uniqueId; var uniqueId = table.options.uniqueId;
// 工具栏按钮控制 // 工具栏按钮控制
var rows = $.common.isEmpty(uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(uniqueId); var rows = $.common.isEmpty(uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(uniqueId);
...@@ -1037,9 +1037,13 @@ var table = { ...@@ -1037,9 +1037,13 @@ var table = {
}); });
}, },
// 批量删除信息 // 批量删除信息
removeAll: function(message, url) { removeAll: function(message, url, uniqueId) {
table.set(); table.set();
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); if (uniqueId) {
var rows = $.table.selectColumns(uniqueId);
} else {
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
}
message = message ?? "确认要删除选中的" + rows.length + "条数据吗?"; message = message ?? "确认要删除选中的" + rows.length + "条数据吗?";
if (rows.length == 0) { if (rows.length == 0) {
$.modal.alertWarning("请至少选择一条记录"); $.modal.alertWarning("请至少选择一条记录");
......
...@@ -29,11 +29,11 @@ ...@@ -29,11 +29,11 @@
</li> </li>
<li> <li>
<label>收货人电话:</label> <label>收货人电话:</label>
<input type="text" name="expressContacts"/> <input type="text" name="expressPhone"/>
</li> </li>
<li> <li>
<label>收货人姓名:</label> <label>收货人姓名:</label>
<input type="text" name="expressPhone"/> <input type="text" name="expressContacts"/>
</li> </li>
<li> <li>
<label>订单状态:</label> <label>订单状态:</label>
...@@ -61,6 +61,21 @@ ...@@ -61,6 +61,21 @@
</form> </form>
</div> </div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success multiple disabled" onclick="$.operate.removeAll('确定下单吗?', '/kylin/performancesExpress/placeOrder')"
shiro:hasPermission="kylin:performancesExpress:placeOrder">
批量下单
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll('确定取消吗?', '/kylin/performancesExpress/cancelOrder', 'orderExpressId')"
shiro:hasPermission="kylin:performancesExpress:cancelOrder">
批量取消
</a>
<a class="btn btn-info multiple disabled" onclick="$.operate.removeAll('确定打印吗?', '/kylin/performancesExpress/printExpress', 'orderExpressId')"
shiro:hasPermission="kylin:performancesExpress:printExpress">
批量打印
</a>
</div>
<div class="col-sm-12 select-table table-bordered"> <div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table"></table> <table id="bootstrap-table"></table>
</div> </div>
...@@ -325,14 +340,14 @@ ...@@ -325,14 +340,14 @@
columns: [{ columns: [{
checkbox: true checkbox: true
}, },
{
field: 'orderExpressId',
title: '快递ID'
},
{ {
field: 'orderTicketsId', field: 'orderTicketsId',
title: '订单ID' title: '订单ID'
}, },
{
field: 'orderExpressId',
title: '快递ID'
},
{ {
field: 'orderCode', field: 'orderCode',
title: '订单编号' title: '订单编号'
...@@ -426,7 +441,7 @@ ...@@ -426,7 +441,7 @@
actions.push('<a class="btn btn-success btn-xs ' + placeOrderFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderTicketsId + '\', \'确定下单吗?\', table.options.placeOrderUrl)"></i>下单</a> '); actions.push('<a class="btn btn-success btn-xs ' + placeOrderFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderTicketsId + '\', \'确定下单吗?\', table.options.placeOrderUrl)"></i>下单</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + cancelOrderFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderExpressId + '\', \'确定取消快递单吗?\', table.options.cancelOrderUrl)"></i>取消</a> '); actions.push('<a class="btn btn-danger btn-xs ' + cancelOrderFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderExpressId + '\', \'确定取消快递单吗?\', table.options.cancelOrderUrl)"></i>取消</a> ');
// actions.push('<a class="btn btn-warning btn-xs ' + generateImageFlag + '" href="javascript:void(0)" onclick="generateImage(\'' + row.orderExpressId + '\',)"></i>下载快递单</a> '); // actions.push('<a class="btn btn-warning btn-xs ' + generateImageFlag + '" href="javascript:void(0)" onclick="generateImage(\'' + row.orderExpressId + '\',)"></i>下载快递单</a> ');
actions.push('<a class="btn btn-warning btn-xs ' + printExpressFlag + '" href="javascript:void(0)" onclick="printExpress(\'' + row.orderExpressId + '\',)"></i>打印快递单</a> '); actions.push('<a class="btn btn-info btn-xs ' + printExpressFlag + '" href="javascript:void(0)" onclick="printExpress(\'' + row.orderExpressId + '\',)"></i>打印快递单</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + getResultFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderExpressId + '\', \'确定获取快递信息吗?\', table.options.getResultUrl)"></i>主动获取下单信息</a> '); // actions.push('<a class="btn btn-success btn-xs ' + getResultFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderExpressId + '\', \'确定获取快递信息吗?\', table.options.getResultUrl)"></i>主动获取下单信息</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + getFreightFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderExpressId + '\', \'确定获取估算运费吗?\', table.options.getFreightUrl)"></i>运费估算</a> '); // actions.push('<a class="btn btn-success btn-xs ' + getFreightFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderExpressId + '\', \'确定获取估算运费吗?\', table.options.getFreightUrl)"></i>运费估算</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + getListFreightFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderExpressId + '\', \'确定获取运费信息吗?\', table.options.getListFreightUrl)"></i>主动获取运费</a> '); // actions.push('<a class="btn btn-success btn-xs ' + getListFreightFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderExpressId + '\', \'确定获取运费信息吗?\', table.options.getListFreightUrl)"></i>主动获取运费</a> ');
......
...@@ -141,6 +141,7 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -141,6 +141,7 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
public ResponseDto placeOrder(PerformanceExpressSearchAdminParam performanceExpressSearchAdminParam) { public ResponseDto placeOrder(PerformanceExpressSearchAdminParam performanceExpressSearchAdminParam) {
List<String> ids = performanceExpressSearchAdminParam.getIds(); List<String> ids = performanceExpressSearchAdminParam.getIds();
Integer idCount = ids.size();
for (String orderTicketsId : ids) { for (String orderTicketsId : ids) {
// 已经存在未取消的下单数据过滤掉 // 已经存在未取消的下单数据过滤掉
Integer[] expressStatus = {KylinTableStatusConst.ORDER_EXPRESS_STATUS1, KylinTableStatusConst.ORDER_EXPRESS_STATUS3}; Integer[] expressStatus = {KylinTableStatusConst.ORDER_EXPRESS_STATUS1, KylinTableStatusConst.ORDER_EXPRESS_STATUS3};
...@@ -161,7 +162,11 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -161,7 +162,11 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
Wrappers.lambdaQuery(KylinOrderTicketRelations.class).eq(KylinOrderTicketRelations::getOrderId, orderTicketsId) Wrappers.lambdaQuery(KylinOrderTicketRelations.class).eq(KylinOrderTicketRelations::getOrderId, orderTicketsId)
); );
if (orderStatus.getStatus() != KylinTableStatusConst.ORDER_STATUS1 && orderStatus.getStatus() != KylinTableStatusConst.ORDER_STATUS6) { if (orderStatus.getStatus() != KylinTableStatusConst.ORDER_STATUS1 && orderStatus.getStatus() != KylinTableStatusConst.ORDER_STATUS6) {
return ResponseDto.failure("当前状态不能下单"); if (idCount > 1) {
continue;
} else {
return ResponseDto.failure("当前状态不能下单");
}
} }
// 生成预快递单 防止因失败没办法再次发起也不能主动获取数据 // 生成预快递单 防止因失败没办法再次发起也不能主动获取数据
KylinOrderExpress kylinOrderExpressPre = new KylinOrderExpress(); KylinOrderExpress kylinOrderExpressPre = new KylinOrderExpress();
...@@ -217,7 +222,11 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -217,7 +222,11 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
} else { } else {
msg = (String) hashMap.get("msg"); msg = (String) hashMap.get("msg");
} }
return ResponseDto.failure(msg); if (idCount > 1) {
continue;
} else {
return ResponseDto.failure(msg);
}
} else { } else {
HashMap hashMapResult = (HashMap) hashMap.get("result"); HashMap hashMapResult = (HashMap) hashMap.get("result");
KylinOrderExpress kylinOrderExpress = new KylinOrderExpress(); KylinOrderExpress kylinOrderExpress = new KylinOrderExpress();
...@@ -299,6 +308,7 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -299,6 +308,7 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
public ResponseDto cancelOrder(PerformanceExpressSearchAdminParam performanceExpressSearchAdminParam) { public ResponseDto cancelOrder(PerformanceExpressSearchAdminParam performanceExpressSearchAdminParam) {
List<String> ids = performanceExpressSearchAdminParam.getIds(); List<String> ids = performanceExpressSearchAdminParam.getIds();
Integer idCount = ids.size();
for (String orderExpressId : ids) { for (String orderExpressId : ids) {
KylinOrderExpress orderExpressInfo = kylinOrderExpressMapper.selectOne( KylinOrderExpress orderExpressInfo = kylinOrderExpressMapper.selectOne(
Wrappers.lambdaQuery(KylinOrderExpress.class).eq(KylinOrderExpress::getOrderExpressId, orderExpressId) Wrappers.lambdaQuery(KylinOrderExpress.class).eq(KylinOrderExpress::getOrderExpressId, orderExpressId)
...@@ -313,7 +323,11 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -313,7 +323,11 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
HashMap hashMap = JsonUtils.fromJson(result, HashMap.class); HashMap hashMap = JsonUtils.fromJson(result, HashMap.class);
if (hashMap.get("succ").equals("fail")) { if (hashMap.get("succ").equals("fail")) {
String msg = (String) hashMap.get("msg"); String msg = (String) hashMap.get("msg");
return ResponseDto.failure(msg); if (idCount > 1) {
continue;
} else {
return ResponseDto.failure(msg);
}
} else { } else {
KylinOrderExpress kylinOrderExpress = new KylinOrderExpress(); KylinOrderExpress kylinOrderExpress = new KylinOrderExpress();
kylinOrderExpress.setExpressStatus(KylinTableStatusConst.ORDER_EXPRESS_STATUS3); kylinOrderExpress.setExpressStatus(KylinTableStatusConst.ORDER_EXPRESS_STATUS3);
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
<foreach collection="ids" item="orderExpressId" index="index" open="(" close=")" separator=","> <foreach collection="ids" item="orderExpressId" index="index" open="(" close=")" separator=",">
${orderExpressId} ${orderExpressId}
</foreach> </foreach>
AND express_status NOT IN (1, 3)
</where> </where>
ORDER BY a.mid DESC ORDER BY a.mid DESC
</select> </select>
......
...@@ -302,10 +302,10 @@ ...@@ -302,10 +302,10 @@
<if test="orderStatus!=null and orderStatus!=''">AND kots.status = #{orderStatus}</if> <if test="orderStatus!=null and orderStatus!=''">AND kots.status = #{orderStatus}</if>
<if test="userMobile != null and userMobile != ''">AND kot.user_mobile = #{userMobile}</if> <if test="userMobile != null and userMobile != ''">AND kot.user_mobile = #{userMobile}</if>
<if test="userName != null and userName != ''">AND kot.user_name like concat('%', #{userName}, '%')</if> <if test="userName != null and userName != ''">AND kot.user_name LIKE concat('%', #{userName}, '%')</if>
<if test="expressContacts != null and expressContacts != ''">AND kot.express_contacts = like concat('%', #{expressContacts}, '%')</if>
<if test="expressPhone != null and expressPhone != ''">AND kot.express_phone = #{expressPhone}</if> <if test="expressPhone != null and expressPhone != ''">AND kot.express_phone = #{expressPhone}</if>
<if test="expressContacts != null and expressContacts != ''">AND kot.express_contacts LIKE concat('%', #{expressContacts}, '%')</if>
</where> </where>
</select> </select>
<select id="getCanPlaceOrderList" resultType="com.liquidnet.service.kylin.entity.KylinOrderTickets"> <select id="getCanPlaceOrderList" resultType="com.liquidnet.service.kylin.entity.KylinOrderTickets">
......
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