瀏覽代碼

Merge branch 'main' of http://47.98.207.247:3000/lsq/ship-ota-server

lishiqiang 2 周之前
父節點
當前提交
8a85af3e62

+ 17 - 0
ship-module-trade/ship-module-trade-biz/src/main/java/com/yc/ship/module/trade/dal/dataobject/order/TradeVisitorDO.java

@@ -174,4 +174,21 @@ public class TradeVisitorDO extends TenantBaseDO {
 
     @Schema(description = "楼层", example = "")
     private Integer floor;
+
+
+    /**
+     * 入住类型
+     * 1:实际入住 2:临时入住 3:预分房
+     */
+    @Schema(description = "入住类型", example = "")
+    @TableField(exist = false)
+    private String occupancyType;
+
+    @Schema(description = "是否独居")
+    @TableField(exist = false)
+    private Integer isAlone;
+
+    @Schema(description = "是否具备同住关系", example = "")
+    @TableField(exist = false)
+    private Integer isHaveTogethers;
 }

+ 3 - 3
ship-module-trade/ship-module-trade-biz/src/main/java/com/yc/ship/module/trade/service/otc/impl/OtcTradeOrderServiceImpl.java

@@ -3156,7 +3156,7 @@ public class OtcTradeOrderServiceImpl implements OtcTradeOrderService {
                         item.put("floor", StringUtils.isEmpty(visitor.getFloor()) ? "" : visitor.getFloor()); // 楼层
 
                         item.put("roomIndex", roomIndex); // 序号(按订单内的房间顺序)
-                        item.put("roomType", (StringUtils.isEmpty(visitor.getRoomType()) ? "" : visitor.getRoomType()) + (StringUtils.isEmpty(visitor.getFloor()) ? "" : (" (" + visitor.getFloor() + ")"))); // 房型(如:豪华标准间 (2F))
+                        item.put("roomType", (StringUtils.isEmpty(visitor.getRoomType()) ? "" : visitor.getRoomType()) + (StringUtils.isEmpty(visitor.getFloor()) ? "" : (" (" + visitor.getFloor() + "F)"))); // 房型(如:豪华标准间 (2F))
                         item.put("roomDescription", roomDescription); // 入住类型(如:2个成人/1个儿童)
 
                         // 游客详情(8列):每个游客独立显示
@@ -3164,7 +3164,7 @@ public class OtcTradeOrderServiceImpl implements OtcTradeOrderService {
                         item.put("gender", visitor.getGender() != null ? (visitor.getGender() == 1 ? "男" : "女") : ""); // 性别(1=男,其他=女)
                         item.put("credentialType", DictFrameworkUtils.getDictDataLabel(DictTypeConstants.VISITOR_CREDENTIAL_TYPE, visitor.getCredentialType())); // 证件类型(身份证/护照等)
                         item.put("credentialNo", StringUtils.isEmpty(visitor.getCredentialNo()) ? "" : visitor.getCredentialNo()); // 证件号
-                        item.put("visitorType", StringUtils.isEmpty(visitor.getVisitorType()) ? "" : getPersonTypeAll(visitor.getVisitorType())); // 游客类型(成人/儿童/婴儿)
+                        item.put("visitorType", getPersonTypeAll(visitor.getVisitorType())); // 游客类型(成人/儿童/婴儿)
                         item.put("nationalityName", StringUtils.isEmpty(visitor.getNationalityName()) ? "" : visitor.getNationalityName()); // 国籍(如:中国、美国)
                         item.put("valueAddedService", StringUtils.isEmpty(visitor.getValueAddedService()) ? "" : formatPolicyName(visitor.getValueAddedService())); // 增值服务(如:接送站、保险等)
                         item.put("policyName", ""); // 优惠政策(如:早鸟优惠、团立减等)
@@ -3235,7 +3235,7 @@ public class OtcTradeOrderServiceImpl implements OtcTradeOrderService {
 
         // 按游客类型统计数量
         Map<String, Long> typeCountMap = roomVisitors.stream()
-                .filter(v -> StringUtils.isNotEmpty(v.getVisitorType()))
+//                .filter(v -> StringUtils.isNotEmpty(v.getVisitorType()))
                 .collect(Collectors.groupingBy(TouristExportVisitorVO::getVisitorType, Collectors.counting()));
 
         StringBuilder sb = new StringBuilder();

+ 7 - 9
ship-module-trade/ship-module-trade-biz/src/main/resources/mapper/order/TradeVisitorMapper.xml

@@ -206,21 +206,19 @@
     <select id="selectListByVoyageId" resultType="com.yc.ship.module.trade.dal.dataobject.order.TradeVisitorDO">
         select tv.*,if(pprmt.total_num &gt;=2 and pprmt.enable_share=0,1,0) as isHaveTogethers,if(pprmt.total_num =1 and pprmt.enable_share=0,1,0) as isAlone
         from trade_visitor tv
-                 join trade_order to1 on tv.order_id=to1.id
-                 join trade_order_room_model torm on tv.room_index_id=torm.room_index_id
-                 join product_price_room_model_type pprmt on torm.room_model_type_id = pprmt.id
-        where to1.voyage_id=#{voyageId} and to1.order_status=6
-            join trade_order to1 on tv.order_id=to1.id and to1.deleted=0
-            join trade_order_room_model torm on tv.room_index_id=torm.room_index_id and torm.deleted=0
-            join product_price_room_model_type pprmt on torm.room_model_type_id = pprmt.id and pprmt.deleted=0
+                 join trade_order to1 on tv.order_id=to1.id and to1.deleted=0
+                 join trade_order_room_model torm on tv.room_index_id=torm.room_index_id and torm.deleted=0
+                 join product_price_room_model_type pprmt on torm.room_model_type_id = pprmt.id and pprmt.deleted=0
         where to1.voyage_id=#{voyageId} and to1.order_status=6 and tv.deleted=0
+          and tv.room_index_id is not null
+          and tv.room_model_id is not null
+          and tv.floor is not null
     </select>
 
     <select id="selectListByVoyageIdAndRoomId"
             resultType="com.yc.ship.module.trade.dal.dataobject.order.TradeVisitorDO">
         select tv.*
         from trade_visitor tv
-                 join trade_order b on tv.order_id=b.id
                  join trade_order b on tv.order_id=b.id and b.deleted=0
         where b.order_status=6 and b.voyage_id=#{voyageId} and if(tv.final_room_id is null,tv.init_room_id,tv.final_room_id)=#{roomId}
     </select>
@@ -276,7 +274,7 @@
             tv.credential_type AS credentialType,
             tv.credential_no AS credentialNo,
             tv.type AS visitorType,
-            tv.floor as floor,
+            torm.floor as floor,
             a.name AS nationalityName,
             GROUP_CONCAT(ps.product_name) AS valueAddedService,
             tor.remark,

二進制
ship-module-trade/ship-module-trade-biz/src/main/resources/templates/tourist_template_agent.xlsx


二進制
ship-module-trade/ship-module-trade-biz/src/main/resources/templates/tourist_template_operator.xlsx