|
|
@@ -2,8 +2,12 @@ package com.jpsoft.enterprise.modules.base.controller;
|
|
|
|
|
|
|
|
|
import com.github.pagehelper.Page;
|
|
|
+import com.jpsoft.enterprise.modules.base.entity.BillDetailInfo;
|
|
|
import com.jpsoft.enterprise.modules.base.entity.BillInfo;
|
|
|
+import com.jpsoft.enterprise.modules.base.entity.OrderInfo;
|
|
|
+import com.jpsoft.enterprise.modules.base.service.BillDetailInfoService;
|
|
|
import com.jpsoft.enterprise.modules.base.service.BillInfoService;
|
|
|
+import com.jpsoft.enterprise.modules.base.service.OrderInfoService;
|
|
|
import com.jpsoft.enterprise.modules.common.dto.MessageResult;
|
|
|
import com.jpsoft.enterprise.modules.common.dto.Sort;
|
|
|
import com.jpsoft.enterprise.modules.common.utils.PojoUtils;
|
|
|
@@ -27,6 +31,12 @@ public class BillInfoController {
|
|
|
@Autowired
|
|
|
private BillInfoService billInfoService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private BillDetailInfoService billDetailInfoService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private OrderInfoService orderInfoService;
|
|
|
+
|
|
|
@ApiOperation(value="创建空记录")
|
|
|
@GetMapping("create")
|
|
|
public MessageResult<BillInfo> create(){
|
|
|
@@ -218,6 +228,24 @@ public class BillInfoController {
|
|
|
|
|
|
Page<BillInfo> page = billInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
|
|
|
+ for (BillInfo billInfo:page) {
|
|
|
+ List<BillDetailInfo> list = billDetailInfoService.findByBillId(billInfo.getId());
|
|
|
+
|
|
|
+ for (BillDetailInfo billDetailInfo:list) {
|
|
|
+ OrderInfo orderInfo = orderInfoService.get(billDetailInfo.getOrderId());
|
|
|
+ if(orderInfo!=null){
|
|
|
+ if(orderInfo.getPayStatus()==20){
|
|
|
+ billInfo.setIsPay(true);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(billInfo.getIsPay() == null){
|
|
|
+ billInfo.setIsPay(false);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
msgResult.setResult(true);
|
|
|
msgResult.setData(PojoUtils.pageWrapper(page));
|