sanlin.shi 1 year ago
parent
commit
16ebad3b04

+ 6 - 8
src/main/java/com/yixin/ms/model/dto/ThirdPlatformRespDto.java

@@ -94,12 +94,11 @@ public class ThirdPlatformRespDto {
     @ApiModelProperty(value = "左二内容")
     private String aLineTwoValue;
     @ApiModelProperty(value = "右一标题")
-    @JsonProperty("aLineThirdLabel")
-    private String aLineThirdLabel;
+    @JsonProperty("aLineThrLabel")
+    private String aLineThrLabel;
     @ApiModelProperty(value = "右一内容")
-    @JsonProperty("aLineThirdValue")
-    private String aLineThirdValue;
-
+    @JsonProperty("aLineThrValue")
+    private String aLineThrValue;
 
     @ApiModelProperty(value = "小背景图地址")
     @JsonProperty("bBackgroundUrl")
@@ -114,10 +113,9 @@ public class ThirdPlatformRespDto {
     @JsonProperty("bSubLine")
     private String bSubLine;
 
-
     @ApiModelProperty(value = "选择列表")
-    @JsonProperty("bChooseList")
-    private List<ChooseVO> bChooseList;
+    @JsonProperty("bChoiseList")
+    private List<ChooseVO> bChoiseList;
 
 
 }

+ 9 - 6
src/main/java/com/yixin/ms/model/vo/HealtCodeUserVO.java

@@ -150,11 +150,11 @@ public class HealtCodeUserVO {
     @ApiModelProperty(value = "左二内容", position = 10)
     private String aLineTwoValue;
     @ApiModelProperty(value = "右一标题", position = 11)
-    @JsonProperty("aLineThirdLabel")
-    private String aLineThirdLabel;
+    @JsonProperty("aLineThrLabel")
+    private String aLineThrLabel;
     @ApiModelProperty(value = "右一内容", position = 12)
-    @JsonProperty("aLineThirdValue")
-    private String aLineThirdValue;
+    @JsonProperty("aLineThrValue")
+    private String aLineThrValue;
 
 
     @ApiModelProperty(value = "小图标", position = 13)
@@ -175,8 +175,11 @@ public class HealtCodeUserVO {
     private String bBackgroundUrl;
 
     @ApiModelProperty(value = "选择列表", position = 16)
-    @JsonProperty("bChooseList")
-    private List<ChooseVO> bChooseList;
+    @JsonProperty("bChoiseList")
+    private List<ChooseVO> bChoiseList;
+
+    @ApiModelProperty(value = "响应时间", position = 17)
+    private Integer countDown = 30;
 
 
 }

+ 41 - 36
src/main/java/com/yixin/ms/server/HealthOpenReturnServer.java

@@ -182,7 +182,7 @@ public class HealthOpenReturnServer {
         /*******************************以下为三方平台逻辑*******************************/
         //TODO...联动平台三方接口 三方接口配置参数优先与系统配置参数
         handleThirdPlatform(userVO, placeInfoVO, shortTermDTO);
-//        //TODO...mock数据流程
+//        TODO...mock数据流程
 //        handleThirdPlatformMock(userVO, placeInfoVO, shortTermDTO);
         /*******************************以下为通行结果逻辑*******************************/
         //通行结果转换
@@ -217,17 +217,17 @@ public class HealthOpenReturnServer {
                 && Preconditions.isNotBlank(placeInfoVO.getOpenThirdLinkPlatform())
                 && placeInfoVO.getOpenThirdLinkPlatform()) {
 
-            if (Preconditions.isBlank(placeInfoVO.getAppKey())
-                    || Preconditions.isBlank(placeInfoVO.getAppSecret())
-                    || Preconditions.isBlank(placeInfoVO.getPrivateKey())
-                    || Preconditions.isBlank(placeInfoVO.getInterfaceAddress())) {
-                userVO.setIsOpen(HealthOpenEnum.NO_THOROUGHFARE.getCode());
-                placeInfoVO.setOpenVoiceMsgSuccess("联动平台三方接口参数配置有误,请联系管理员");
-                placeInfoVO.setOpenVoiceMsgFail("联动平台三方接口参数配置有误,请联系管理员");
-                placeInfoVO.setSubLineFail("联动平台三方接口参数配置有误,请联系管理员");
-                placeInfoVO.setSubLineSuccess("联动平台三方接口参数配置有误,请联系管理员");
-                return;
-            }
+//            if (Preconditions.isBlank(placeInfoVO.getAppKey())
+//                    || Preconditions.isBlank(placeInfoVO.getAppSecret())
+//                    || Preconditions.isBlank(placeInfoVO.getPrivateKey())
+//                    || Preconditions.isBlank(placeInfoVO.getInterfaceAddress())) {
+//                userVO.setIsOpen(HealthOpenEnum.NO_THOROUGHFARE.getCode());
+//                placeInfoVO.setOpenVoiceMsgSuccess("联动平台三方接口参数配置有误,请联系管理员");
+//                placeInfoVO.setOpenVoiceMsgFail("联动平台三方接口参数配置有误,请联系管理员");
+//                placeInfoVO.setSubLineFail("联动平台三方接口参数配置有误,请联系管理员");
+//                placeInfoVO.setSubLineSuccess("联动平台三方接口参数配置有误,请联系管理员");
+//                return;
+//            }
 
             if (Preconditions.isNotBlank(placeInfoVO.getInterfaceAddress())) {
                 try {
@@ -255,8 +255,8 @@ public class HealthOpenReturnServer {
                     log.info("联动平台三方接口调用加密前入参信息:{}", JSON.toJSONString(dto));
 
                     //TODO。mock数据
-                    ThirdPlatformRespDto mockDto = mockPending();
-//                    ThirdPlatformRespDto mockDto = mockClosing();
+//                    ThirdPlatformRespDto mockDto = mockPending();
+                    ThirdPlatformRespDto mockDto = mockClosing();
                     convertThirdOpenReturn(userVO, mockDto, placeInfoVO);
                     return;
                 } catch (Exception e) {
@@ -282,21 +282,26 @@ public class HealthOpenReturnServer {
         thirdPlatformRespDto.setBBackgroundUrl(null);
         thirdPlatformRespDto.setTaskId(UUID.randomUUID().toString());
         //设置默认图
-        thirdPlatformRespDto.setBMainIcon(ThirdPlatformPassIconEnum.BSUCCESS.getIconCode());
-        thirdPlatformRespDto.setBSubLine("BSubLine");
-        thirdPlatformRespDto.setBMainLine("BMainLine");
+        thirdPlatformRespDto.setBMainIcon(ThirdPlatformPassIconEnum.BWARNING.getIconCode());
+        thirdPlatformRespDto.setBMainLine("等待二次核验");
+        thirdPlatformRespDto.setBSubLine("新金华人免费预约票");
         List<ChooseVO> bChooseList = new ArrayList<>();
         ChooseVO cv = new ChooseVO();
         cv.setDeep("false");
-        cv.setLabel("年卡");
+        cv.setLabel("确认核销");
         cv.setValue("1");
         ChooseVO cv2 = new ChooseVO();
         cv2.setDeep("true");
-        cv2.setLabel("月卡");
+        cv2.setLabel("取消");
         cv2.setValue("2");
+        ChooseVO cv3 = new ChooseVO();
+        cv3.setDeep("false");
+        cv3.setLabel("选项三");
+        cv3.setValue("3");
         bChooseList.add(cv);
         bChooseList.add(cv2);
-        thirdPlatformRespDto.setBChooseList(bChooseList);
+        bChooseList.add(cv3);
+        thirdPlatformRespDto.setBChoiseList(bChooseList);
         return thirdPlatformRespDto;
     }
 
@@ -312,17 +317,17 @@ public class HealthOpenReturnServer {
         }
 
         thirdPlatformRespDto.setAMainIcon(ThirdPlatformPassIconEnum.APASS.getIconCode());
-        thirdPlatformRespDto.setAMainLine("AMainLine");
-        thirdPlatformRespDto.setOpenVoiceMsg("核验成功");
-
-        thirdPlatformRespDto.setASubLineFirst("aSubLineFirst");
-        thirdPlatformRespDto.setASubLineSecond("ASubLineSecond");
-        thirdPlatformRespDto.setALineOneLabel("ALineOneLabel");
-        thirdPlatformRespDto.setALineOneValue("ALineOneValue");
-        thirdPlatformRespDto.setALineTwoLabel("ALineTwoLabel");
-        thirdPlatformRespDto.setALineTwoValue("ALineTwoValue");
-        thirdPlatformRespDto.setALineThirdLabel("ALineThirdLabel");
-        thirdPlatformRespDto.setALineThirdValue("aLineThirdValue");
+        thirdPlatformRespDto.setAMainLine("检票成功");
+        thirdPlatformRespDto.setOpenVoiceMsg("检票成功");
+
+        thirdPlatformRespDto.setASubLineFirst("曾**");
+        thirdPlatformRespDto.setASubLineSecond("3308**********0212");
+        thirdPlatformRespDto.setALineOneLabel("票名");
+        thirdPlatformRespDto.setALineOneValue("年卡(季卡)");
+        thirdPlatformRespDto.setALineTwoLabel("有效期");
+        thirdPlatformRespDto.setALineTwoValue("2023-08-07");
+        thirdPlatformRespDto.setALineThrLabel("年卡照片");
+        thirdPlatformRespDto.setALineThrValue(ThirdPlatformPassIconEnum.APASS.getUrl());
         //底部
         thirdPlatformRespDto.setQrcodeText("QrcodeText");
         thirdPlatformRespDto.setAdvertise("Advertise");
@@ -458,7 +463,7 @@ public class HealthOpenReturnServer {
             userVO.setIsOpen(thirdPlatformRespDto.getIsOpen());
         }
         if (Preconditions.isNotBlank(thirdPlatformRespDto.getStatus()) && STATUS_PENDING.equals(thirdPlatformRespDto.getStatus())) {
-            if (Preconditions.isBlank(thirdPlatformRespDto.getTaskId()) || Preconditions.isBlank(thirdPlatformRespDto.getBChooseList())) {
+            if (Preconditions.isBlank(thirdPlatformRespDto.getTaskId()) || Preconditions.isBlank(thirdPlatformRespDto.getBChoiseList())) {
                 throw new ServiceException("三方平台接口响应参数有误,请联系工作人员");
             }
 
@@ -468,7 +473,7 @@ public class HealthOpenReturnServer {
             userVO.setBSubLine(thirdPlatformRespDto.getBSubLine());
             userVO.setBMainLine(thirdPlatformRespDto.getBMainLine());
             placeInfoVO.setOpenVoiceMsgFail(thirdPlatformRespDto.getBMainLine());
-            userVO.setBChooseList(thirdPlatformRespDto.getBChooseList());
+            userVO.setBChoiseList(thirdPlatformRespDto.getBChoiseList());
             return;
         }
 
@@ -505,15 +510,15 @@ public class HealthOpenReturnServer {
             userVO.setALineOneValue(thirdPlatformRespDto.getALineOneValue());
             userVO.setALineTwoLabel(thirdPlatformRespDto.getALineTwoLabel());
             userVO.setALineTwoValue(thirdPlatformRespDto.getALineTwoValue());
-            userVO.setALineThirdLabel(thirdPlatformRespDto.getALineThirdLabel());
+            userVO.setALineThrLabel(thirdPlatformRespDto.getALineThrLabel());
             //图片转换
-            String aLineThirdValue = thirdPlatformRespDto.getALineThirdValue();
+            String aLineThrValue = thirdPlatformRespDto.getALineThrValue();
 //            try {
 //                String filePath = FileUtils.saveByCopy(FileUtils.getDirectory(Constants.UPLOAD_IMAGE_THIRD), thirdPlatformRespDto.getALineThirdValue());
 //                aLineThirdValue = address.concat(filePath);
 //            } catch (Exception e) {
 //            }
-            userVO.setALineThirdValue(aLineThirdValue);
+            userVO.setALineThrValue(aLineThrValue);
             //底部
             userVO.setQrcodeText(Preconditions.isNotBlank(thirdPlatformRespDto.getQrcodeText()) ? thirdPlatformRespDto.getQrcodeText() : userVO.getQrcodeText());
             userVO.setAdvertise(Preconditions.isNotBlank(thirdPlatformRespDto.getAdvertise()) ? thirdPlatformRespDto.getAdvertise() : userVO.getAdvertise());