Showing
1 changed file
with
7 additions
and
2 deletions
| ... | ... | @@ -11,6 +11,8 @@ import com.lframework.starter.web.core.controller.DefaultBaseController; |
| 11 | 11 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 12 | 12 | import com.lframework.xingyun.sc.bo.shipments.car.GetDraftRequestCarTicketBo; |
| 13 | 13 | import com.lframework.xingyun.sc.entity.DraftRequestCarTicket; |
| 14 | +import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; | |
| 15 | +import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | |
| 14 | 16 | import com.lframework.xingyun.sc.service.shipments.car.DraftRequestCarTicketService; |
| 15 | 17 | import com.lframework.xingyun.sc.vo.shipments.car.*; |
| 16 | 18 | import io.swagger.annotations.Api; |
| ... | ... | @@ -20,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
| 20 | 22 | import org.springframework.validation.annotation.Validated; |
| 21 | 23 | import org.springframework.web.bind.annotation.*; |
| 22 | 24 | |
| 25 | +import javax.annotation.Resource; | |
| 23 | 26 | import javax.validation.Valid; |
| 24 | 27 | import javax.validation.constraints.NotBlank; |
| 25 | 28 | import java.util.List; |
| ... | ... | @@ -37,7 +40,8 @@ public class DraftRequestCarTicketController extends DefaultBaseController { |
| 37 | 40 | |
| 38 | 41 | @Autowired |
| 39 | 42 | private DraftRequestCarTicketService draftRequestCarTicketService; |
| 40 | - | |
| 43 | + @Resource | |
| 44 | + private PurchaseOrderInfoService purchaseOrderInfoService; | |
| 41 | 45 | /** |
| 42 | 46 | * 查询列表 |
| 43 | 47 | */ |
| ... | ... | @@ -56,9 +60,10 @@ public class DraftRequestCarTicketController extends DefaultBaseController { |
| 56 | 60 | |
| 57 | 61 | results = datas.stream().map(draftRequestCarTicket -> { |
| 58 | 62 | GetDraftRequestCarTicketBo bo = new GetDraftRequestCarTicketBo(draftRequestCarTicket); |
| 63 | + PurchaseOrderInfo purchaseOrderInfo = purchaseOrderInfoService.findById(draftRequestCarTicket.getPurchaseOrderId()); | |
| 59 | 64 | // 判断 createById 是否等于当前用户 ID |
| 60 | 65 | boolean isCreateBy = false; |
| 61 | - if (currentUserId.equals(draftRequestCarTicket.getCreateById())) { | |
| 66 | + if (purchaseOrderInfo != null && currentUserId.equals(purchaseOrderInfo.getContractCreateById())) { | |
| 62 | 67 | isCreateBy = true; |
| 63 | 68 | } |
| 64 | 69 | bo.setDraftCreateBy(isCreateBy); | ... | ... |