|
|
@@ -4,14 +4,12 @@ import com.sckw.core.web.context.LoginUserHolder;
|
|
|
import com.sckw.core.web.response.HttpResult;
|
|
|
import com.sckw.excel.utils.ExcelUtil;
|
|
|
import com.sckw.payment.model.constant.TradeUnitType;
|
|
|
-import com.sckw.payment.model.dto.SettlementTradeDto;
|
|
|
import com.sckw.payment.model.vo.req.SettlementTradeReq;
|
|
|
import com.sckw.payment.model.vo.res.SettlementTradeVo;
|
|
|
import com.sckw.payment.service.KwpSettlementTradeService;
|
|
|
import jakarta.annotation.Resource;
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
|
import jakarta.validation.Valid;
|
|
|
-import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
@@ -19,7 +17,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.List;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 结算-交易订单
|
|
|
@@ -91,7 +88,7 @@ public class KwpSettlementTradeController {
|
|
|
settlementReq.check();
|
|
|
settlementReq.setUnitType(TradeUnitType.PURCHASE);
|
|
|
settlementReq.setUnitTypeTwo(TradeUnitType.SELL);
|
|
|
- List<SettlementTradeDto> list = kwpSettlementTradeService.exportList(settlementReq, settlementReq.getIdList());
|
|
|
+ List<SettlementTradeVo> list = kwpSettlementTradeService.exportList(settlementReq, settlementReq.getIdList());
|
|
|
return this.export(response, list);
|
|
|
}
|
|
|
|
|
|
@@ -155,7 +152,7 @@ public class KwpSettlementTradeController {
|
|
|
settlementReq.setUnitType(TradeUnitType.SELL);
|
|
|
settlementReq.setUnitTypeTwo(TradeUnitType.PURCHASE);
|
|
|
settlementReq.setEntId(LoginUserHolder.getEntId());
|
|
|
- List<SettlementTradeDto> list = kwpSettlementTradeService.exportList(settlementReq, settlementReq.getIdList());
|
|
|
+ List<SettlementTradeVo> list = kwpSettlementTradeService.exportList(settlementReq, settlementReq.getIdList());
|
|
|
return this.export(response, list);
|
|
|
}
|
|
|
|
|
|
@@ -165,16 +162,11 @@ public class KwpSettlementTradeController {
|
|
|
* @author Aick Spt
|
|
|
* @date 2023-07-24 15:49
|
|
|
*/
|
|
|
- private HttpResult export(HttpServletResponse response, List<SettlementTradeDto> list) {
|
|
|
+ private HttpResult export(HttpServletResponse response, List<SettlementTradeVo> list) {
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
return HttpResult.error("暂无数据,请确认");
|
|
|
}
|
|
|
- List<SettlementTradeVo> collect = list.stream().map(a -> {
|
|
|
- SettlementTradeVo settlementTradeVo = new SettlementTradeVo();
|
|
|
- BeanUtils.copyProperties(a, settlementTradeVo);
|
|
|
- return settlementTradeVo;
|
|
|
- }).collect(Collectors.toList());
|
|
|
- ExcelUtil.downData(response, SettlementTradeVo.class, collect);
|
|
|
+ ExcelUtil.downData(response, SettlementTradeVo.class, list);
|
|
|
return null;
|
|
|
}
|
|
|
|