|
@@ -1,12 +1,11 @@
|
|
|
package com.sckw.payment.controller;
|
|
package com.sckw.payment.controller;
|
|
|
|
|
|
|
|
-import com.sckw.core.model.page.PageRes;
|
|
|
|
|
import com.sckw.core.model.vo.TableTop;
|
|
import com.sckw.core.model.vo.TableTop;
|
|
|
import com.sckw.core.web.response.HttpResult;
|
|
import com.sckw.core.web.response.HttpResult;
|
|
|
import com.sckw.excel.utils.ExcelUtil;
|
|
import com.sckw.excel.utils.ExcelUtil;
|
|
|
import com.sckw.payment.model.constant.LedgerEnum;
|
|
import com.sckw.payment.model.constant.LedgerEnum;
|
|
|
import com.sckw.payment.model.constant.LogisticsUnitType;
|
|
import com.sckw.payment.model.constant.LogisticsUnitType;
|
|
|
-import com.sckw.payment.model.dto.ILedger;
|
|
|
|
|
|
|
+import com.sckw.payment.model.dto.LedgerLogisticsDto;
|
|
|
import com.sckw.payment.model.vo.req.*;
|
|
import com.sckw.payment.model.vo.req.*;
|
|
|
import com.sckw.payment.model.vo.res.LedgerLogisticsVo;
|
|
import com.sckw.payment.model.vo.res.LedgerLogisticsVo;
|
|
|
import com.sckw.payment.service.KwpLedgerLogisticsService;
|
|
import com.sckw.payment.service.KwpLedgerLogisticsService;
|
|
@@ -159,7 +158,7 @@ public class KwpLedgerLogisticsController {
|
|
|
* @return 物流对账单统计数据
|
|
* @return 物流对账单统计数据
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("carrierCount")
|
|
@PostMapping("carrierCount")
|
|
|
- public HttpResult carrierCount(@RequestBody LogisticsReq logisticsReq) {
|
|
|
|
|
|
|
+ public HttpResult carrierCount(@RequestBody LogisticsReq logisticsReq) {
|
|
|
logisticsReq.setUnitType(LogisticsUnitType.SHIPPER);
|
|
logisticsReq.setUnitType(LogisticsUnitType.SHIPPER);
|
|
|
logisticsReq.setUnitTypeTwo(LogisticsUnitType.CARRIER);
|
|
logisticsReq.setUnitTypeTwo(LogisticsUnitType.CARRIER);
|
|
|
return HttpResult.ok(kwpLedgerLogisticsService.orderCount(logisticsReq));
|
|
return HttpResult.ok(kwpLedgerLogisticsService.orderCount(logisticsReq));
|
|
@@ -244,13 +243,9 @@ public class KwpLedgerLogisticsController {
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("exportShipper")
|
|
@PostMapping("exportShipper")
|
|
|
public HttpResult exportShipper(HttpServletResponse response, @RequestBody LogisticsReq logisticsReq) {
|
|
public HttpResult exportShipper(HttpServletResponse response, @RequestBody LogisticsReq logisticsReq) {
|
|
|
- List<ILedger> list;
|
|
|
|
|
- if (CollectionUtils.isEmpty(logisticsReq.getIdList())) {
|
|
|
|
|
- PageRes<ILedger> pageResult = kwpLedgerLogisticsService.shipperList(logisticsReq);
|
|
|
|
|
- list = pageResult.getList();
|
|
|
|
|
- } else {
|
|
|
|
|
- list = kwpLedgerLogisticsService.selectShipperList(logisticsReq.getIdList());
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ logisticsReq.setUnitType(LogisticsUnitType.CARRIER);
|
|
|
|
|
+ logisticsReq.setUnitTypeTwo(LogisticsUnitType.SHIPPER);
|
|
|
|
|
+ List<LedgerLogisticsDto> list = kwpLedgerLogisticsService.exportList(logisticsReq, logisticsReq.getIdList());
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
return HttpResult.error("没有可导出的数据");
|
|
return HttpResult.error("没有可导出的数据");
|
|
|
}
|
|
}
|
|
@@ -273,14 +268,9 @@ public class KwpLedgerLogisticsController {
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("exportCarrier")
|
|
@PostMapping("exportCarrier")
|
|
|
public HttpResult exportCarrier(HttpServletResponse response, @RequestBody LogisticsReq logisticsReq) {
|
|
public HttpResult exportCarrier(HttpServletResponse response, @RequestBody LogisticsReq logisticsReq) {
|
|
|
- List<ILedger> list;
|
|
|
|
|
- if (CollectionUtils.isEmpty(logisticsReq.getIdList())) {
|
|
|
|
|
- PageRes<ILedger> pageResult = kwpLedgerLogisticsService.carrierList(logisticsReq);
|
|
|
|
|
- list = pageResult.getList();
|
|
|
|
|
-
|
|
|
|
|
- } else {
|
|
|
|
|
- list = kwpLedgerLogisticsService.selectCarrierList(logisticsReq.getIdList());
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ logisticsReq.setUnitType(LogisticsUnitType.SHIPPER);
|
|
|
|
|
+ logisticsReq.setUnitTypeTwo(LogisticsUnitType.CARRIER);
|
|
|
|
|
+ List<LedgerLogisticsDto> list = kwpLedgerLogisticsService.exportList(logisticsReq, logisticsReq.getIdList());
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
return HttpResult.error("没有可导出的数据");
|
|
return HttpResult.error("没有可导出的数据");
|
|
|
}
|
|
}
|