Commit 16eaabd3 authored by libin's avatar libin

旅游核销

parent cea2377d
......@@ -62,7 +62,7 @@ public interface TourFeign {
* @return
*/
@PutMapping("/tourGood/verfication/personnums")
ObjectRestResponse<Void> updateTourGoodPersonNum(@RequestParam("verficationId") Integer verficationId,String properties);
ObjectRestResponse<Void> updateTourGoodPersonNum(@RequestParam("verficationId") Integer verficationId,@RequestParam("properties") String properties);
/**
* 查询订单列表
......@@ -70,5 +70,5 @@ public interface TourFeign {
* @return
*/
@GetMapping("/orders")
public ObjectRestResponse<PageDataVO<TourGoodOrderVo>> findTourGoodOrders(TourGoodOrderFindVo tourGoodOrderFindVo);
ObjectRestResponse<PageDataVO<TourGoodOrderVo>> findTourGoodOrders(TourGoodOrderFindVo tourGoodOrderFindVo);
}
......@@ -60,6 +60,53 @@ public class TourGoodVerificationBiz extends BaseBiz<TourGoodVerificationMapper,
* @return
*/
public PageDataVO<TourGoodOrderVo> findTourGoodOrdersPage(TourGoodOrderFindVo tourGoodOrderFindVo) {
//根据分公司id查询 -->tour_good_site表查询(分公司id 正常路线,未删除) 查询出商品id , 站点id, 出发时间(8:00)
PageDataVO<GoodSiteDTO> goodSiteDTOPageDataVO = tourGoodSiteBiz.findTourGoodSitePageByCompanyId(tourGoodOrderFindVo.getCompanyId());
List<GoodSiteDTO> goodSiteDTOS = goodSiteDTOPageDataVO.getData();
Map<Integer, GoodSiteDTO> goodSiteDTOMap = goodSiteDTOS.stream().collect(Collectors.toMap(K -> K.getGoodId(), Function.identity()));
//商品id查询-->tour_good_spe_price表查询出商品id 商品规格id,出行时间(date 2018-08-09)
List<Integer> goodIds = goodSiteDTOS.stream().map(GoodSiteDTO::getGoodId).collect(Collectors.toList());
List<GoodSpePriceDTO> goodSpePriceDTOS = tourGoodSpeBiz.findTourGoodSpePricePageByGoodIds(goodIds);
Map<Integer, GoodSpePriceDTO> goodSpePriceDTOMap = goodSpePriceDTOS.stream().collect(Collectors.toMap(K -> K.getGoodId(), Function.identity()));
//根据商品规格id 站点id 商品id 查询出 总人数,核销人数,状态
List<TourGoodVerification> tourGoodVerifications = new ArrayList<>();
//商品id和站点id 组装的map
Map<Integer, Integer> goodAndSiteOfIdMap = goodSiteDTOS.stream().collect(Collectors.toMap(K -> K.getGoodId(), V -> V.getId()));
for (GoodSpePriceDTO goodSpePriceDTO : goodSpePriceDTOS) {
TourGoodVerification tourGoodVerification = mapper.findByGoodSpecIdAndGoodSiteIdAndGoodId(goodSpePriceDTO.getSpeId(),goodAndSiteOfIdMap.get(goodSpePriceDTO.getGoodId()),goodSpePriceDTO.getGoodId());
tourGoodVerifications.add(tourGoodVerification);
}
Map<Integer, TourGoodVerification> goodVerificationMap = tourGoodVerifications.stream().collect(Collectors.toMap(K -> K.getGoodId(), Function.identity()));
//根据商品id查询--->tour_good 表查询 商品名称,商品封面
List<Integer> goodIdList = tourGoodVerifications.stream().map(TourGoodVerification::getGoodId).collect(Collectors.toList());
List<TourGood> tourGoods = tourGoodBiz.findByGoodIds(goodIdList);
//组装TourGoodOrderVo数据
List<TourGoodOrderVo> tourGoodOrderVos = new ArrayList<>();
for (TourGood tourGood : tourGoods) {
TourGoodOrderVo tourGoodOrderVo = TourGoodOrderVo
.builder()
.name(tourGood.getName())
.coverUrl(tourGood.getCover())
.companyName("")
.headcount(0)
.tripOfNum(0)
.leaveOfnum(0)
.travelStatus(0)
.travelTime("")
.build();
tourGoodOrderVos.add(tourGoodOrderVo);
}
PageDataVO<TourGoodOrderVo> goodOrderVoPageDataVO = new PageDataVO<>();
goodOrderVoPageDataVO.setData(tourGoodOrderVos);
goodOrderVoPageDataVO.setPageSize(goodSiteDTOPageDataVO.getPageSize());
goodOrderVoPageDataVO.setPageNum(goodSiteDTOPageDataVO.getPageNum());
goodOrderVoPageDataVO.setTotalCount(goodSiteDTOPageDataVO.getTotalCount());
goodOrderVoPageDataVO.setTotalPage(goodSiteDTOPageDataVO.getTotalPage());
return goodOrderVoPageDataVO;
return null;
}
......
......@@ -52,7 +52,7 @@ public class TourGoodVerificationController extends BaseController<TourGoodVerif
*/
@PutMapping("/personnums")
@ApiOperation("更新总人数或上车人数")
public ObjectRestResponse<Void> updateTourGoodPersonNum(@RequestParam("verficationId") Integer verficationId,String properties){
public ObjectRestResponse<Void> updateTourGoodPersonNum(@RequestParam("verficationId") Integer verficationId,@RequestParam("properties") String properties){
int effectRows = getBaseBiz().updateTourGoodPersonNum(verficationId,properties);
if (effectRows>0){
return ObjectRestResponse.succ();
......
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