From 88e548f766229ab4b70fcfdbbb9c515521dc9e08 Mon Sep 17 00:00:00 2001
From: zhouxiang <zhouxiang>
Date: 星期三, 31 八月 2022 11:34:25 +0800
Subject: [PATCH] 添加开单并且结账接口

---
 phis-feign/src/main/java/com/hz/his/dto/order/CardItemInfoDto.java                |   19 +++++++++
 phis-feign/src/main/java/com/hz/his/dto/order/OrderPHisDto.java                   |   24 ++++++++++++
 phis-feign/src/main/java/com/hz/his/dto/order/OrderInfoDto.java                   |    6 +-
 phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipOrderService.java |   11 +++--
 phis-feign/src/main/java/com/hz/his/dto/order/OrderItemDto.java                   |   17 ++++++--
 phis-feign/src/main/java/com/hz/his/dto/order/OrdersTotalDto.java                 |   36 +++++++++--------
 6 files changed, 84 insertions(+), 29 deletions(-)

diff --git a/phis-feign/src/main/java/com/hz/his/dto/order/CardItemInfoDto.java b/phis-feign/src/main/java/com/hz/his/dto/order/CardItemInfoDto.java
new file mode 100644
index 0000000..5b7716f
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/his/dto/order/CardItemInfoDto.java
@@ -0,0 +1,19 @@
+package com.hz.his.dto.order;
+
+/**
+ * 鍗¢」缁勫悎椤圭洰(card_item_info)
+ *
+ * @Author: zhouxiang
+ * @Date: 2022/08/31/11:18
+ * @Description:
+ */
+public class CardItemInfoDto {
+    /**
+     * 浣跨敤娆℃暟
+     */
+    private Integer userNum;
+    /**
+     * 瀹㈡埛鍗″寘閫夊畾椤圭洰:(鍗¢」鐨勭粍鍚堥」鐩爣璇�)
+     */
+    private String id;
+}
diff --git a/phis-feign/src/main/java/com/hz/his/dto/order/OrderInfoDto.java b/phis-feign/src/main/java/com/hz/his/dto/order/OrderInfoDto.java
index 9723a3f..53ec72a 100644
--- a/phis-feign/src/main/java/com/hz/his/dto/order/OrderInfoDto.java
+++ b/phis-feign/src/main/java/com/hz/his/dto/order/OrderInfoDto.java
@@ -23,11 +23,11 @@
     private String activityId;
     /** 娲诲姩瑙勫垯鍚嶇О */
     private String activityName;
-    /** 鏄惁鏁村崟鎶樻墸 */
+    /** 鏄惁鏁村崟鎶樻墸 蹇呭~锛岄粯璁�0*/
     private Integer isWholeDiscount;
-    /** 鏄惁鍛樺伐鎶樻墸 */
+    /** 鏄惁鍛樺伐鎶樻墸 蹇呭~锛岄粯璁�0*/
     private Integer isEmployeeDiscount;
-    /** 鏁村崟鎶樻墸/鍛樺伐鎶樻墸(鍗曚綅:鐧惧垎姣�,榛樿:100) */
+    /** 鏁村崟鎶樻墸/鍛樺伐鎶樻墸(鍗曚綅:鐧惧垎姣�,榛樿:100) 蹇呭~锛岄粯璁�100*/
     private BigDecimal discount;
     /** 鍒掓墸鐜伴噾鎬婚噾棰�(浣滅敤:鐢ㄦ潵璁$畻鍒掓墸椤圭洰鐨勬墽琛岄噾棰�,鏀粯鏂瑰紡鏄幇閲戞敮浠樼殑鎬婚噾棰�) */
     private BigDecimal snapPayTotal=BigDecimal.ZERO;
diff --git a/phis-feign/src/main/java/com/hz/his/dto/order/OrderItemDto.java b/phis-feign/src/main/java/com/hz/his/dto/order/OrderItemDto.java
index b8a3c95..b412caf 100644
--- a/phis-feign/src/main/java/com/hz/his/dto/order/OrderItemDto.java
+++ b/phis-feign/src/main/java/com/hz/his/dto/order/OrderItemDto.java
@@ -3,6 +3,7 @@
 import lombok.Data;
 
 import java.math.BigDecimal;
+import java.util.List;
 
 /**
  * 璁㈠崟淇℃伅
@@ -16,7 +17,7 @@
 
     /** 璁㈠崟缂栧彿锛屼互SO锛夊紑澶�, SOyyyyMMdd0000000 */
     private String orderNo;
-    /** 鍟嗗搧绫诲瀷(OrderItemConstants) */
+    /** 鍟嗗搧绫诲瀷(OrderItemConstants) crm濉粯璁roject,鍏呭�煎氨濉玶echarge,绾晢鍝佽鍗曞~retail闆跺敭, 蹇呭~*/
     private String type;
 
     /** 椤圭洰缂栧彿/鍟嗗搧缂栫爜/濂楅缂栫爜/鍏朵粬缂栫爜 */
@@ -51,24 +52,27 @@
     /** 椤圭洰/鍟嗗搧鐤楃▼鍗曟鏁帮紙鐤楃▼娆℃暟锛岄粯璁や负0锛� */
     private Integer single;
 
-    /** 鎶樻墸(鍗曚綅:鐧惧垎姣�) */
+    /** 鎶樻墸(鍗曚綅:鐧惧垎姣�) 蹇呭~锛岄粯璁�100*/
     private BigDecimal discount;
 
     /** 鎬绘鏁帮紙鐤楃▼娆℃暟锛岄粯璁や负0锛� */
     private Integer usedTotal;
 
-    /** 璐拱鏁伴噺 */
+    /** 璐拱鏁伴噺 蹇呭~锛岄粯璁�0*/
     private Integer buyNum;
 
     /** 瀛愰」璁㈠崟澶囨敞 */
     private String remarks;
 
-    /** 椤圭洰id/鍟嗗搧id/濂楅鏍囪瘑/鍏朵粬鏍囪瘑锛堝叕鐢ㄦ爣璇嗭級 */
+    /** 椤圭洰id/鍟嗗搧id/濂楅鏍囪瘑/鍏朵粬鏍囪瘑锛堝叕鐢ㄦ爣璇嗭級 蹇呭~*/
     private String commonId;
     /** 鎵ц鏉$洰ID */
     private String performId;
     /** 璁㈠崟id锛圤rdersTotal锛� */
     private String orderId;
+
+    /** 鍗″寘鏍囪瘑锛圲serCard锛� */
+    private String userCardId;
 
     /** 杞叆闂ㄥ簵id */
     private String transferIntoShopId;
@@ -83,9 +87,12 @@
     private Integer isTurn;
     /** 骞冲彴绫诲瀷(鑹惧績鑽熴�乸-his銆佸叾浠�,crm榛樿crm) */
     private String platformType=TYPE_PLATFORM_CRM;
-    /** 骞冲彴绫诲瀷鍏宠仈鍟嗗搧id */
+    /** 骞冲彴绫诲瀷鍏宠仈鍟嗗搧id 鍦╬his涓嬪崟crm鍟嗗搧蹇呭~*/
     private String platformTypeId;
 
+    /** 鍗″寘鏍囪瘑 */
+    private List<CardItemInfoDto> cardItemInfoIds;
+
 
 
     /**骞冲彴绫诲瀷-CRM*/
diff --git a/phis-feign/src/main/java/com/hz/his/dto/order/OrderPHisDto.java b/phis-feign/src/main/java/com/hz/his/dto/order/OrderPHisDto.java
new file mode 100644
index 0000000..fdd9d01
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/his/dto/order/OrderPHisDto.java
@@ -0,0 +1,24 @@
+package com.hz.his.dto.order;
+
+import com.hz.his.dto.PageDto;
+import lombok.Data;
+
+/**
+ * Created with IntelliJ IDEA.
+ *
+ * @Author: zhouxiang
+ * @Date: 2022/08/31/10:32
+ * @Description:
+ */
+@Data
+public class OrderPHisDto extends PageDto {
+    //type:0:鑽夌 1:鎻愪氦 2:缁撹处,crm濉�2锛屽繀濉�
+    private String type;
+    //鎿嶄綔浜篿d(褰撳墠鐧诲綍浜虹殑鏍囪瘑),鍚庣澶勭悊锛岃幏鍙栧綋鍓嶇櫥褰曚汉鏍囪瘑,crm濉敤鎴凤紝蹇呭~
+    private String operatorId;
+    //鎿嶄綔浜洪棬搴楁爣璇嗭紝蹇呭~
+    private String shopId;
+    private OrdersTotalDto ordersTotal;
+    private OrderItemDto orderItem;
+    private OrderDeveloperDto orderDeveloper;
+}
diff --git a/phis-feign/src/main/java/com/hz/his/dto/order/OrdersTotalDto.java b/phis-feign/src/main/java/com/hz/his/dto/order/OrdersTotalDto.java
index 9ab54ce..87a9b9d 100644
--- a/phis-feign/src/main/java/com/hz/his/dto/order/OrdersTotalDto.java
+++ b/phis-feign/src/main/java/com/hz/his/dto/order/OrdersTotalDto.java
@@ -19,7 +19,7 @@
     private String id;
     /** 璁㈠崟缂栧彿锛屼互S寮�澶�, SyyyyMMdd0000000(鍓嶇紑浠庡瓧鍏歌幏鍙�) */
     private String orderNo;
-    /** 璁㈠崟绫诲瀷锛圤rderTotalConstants锛� */
+    /** 璁㈠崟绫诲瀷锛圤rderTotalConstants锛�,crm濉粯璁roject,鍏呭�煎氨濉玶echarge,绾晢鍝佽鍗曞~retail闆跺敭, 蹇呭~*/
     private String type;
     /** 鐘舵��(OrderTotalConstants) */
     private Integer status;
@@ -77,36 +77,38 @@
     /** 涓嬪崟鎿嶄綔浜哄悕绉� */
     private String operatorName;
 
-    /** 寮�鍙戜汉闂ㄥ簵鏍囪瘑(Shop,娌℃湁浼犲�奸粯璁ょ敤鎴风粦瀹氶攢鍞【闂殑闂ㄥ簵) */
+    /** 寮�鍙戜汉闂ㄥ簵鏍囪瘑(Shop,娌℃湁浼犲�奸粯璁ょ敤鎴风粦瀹氶攢鍞【闂殑闂ㄥ簵) 蹇呭~*/
     private String developerShopId;
     /** 寮�鍙戜汉闂ㄥ簵鍚嶇О(娌℃湁浼犲�奸粯璁ょ敤鎴风粦瀹氶攢鍞【闂殑闂ㄥ簵) */
     private String developerShopName;
-    /** 寮�鍙戜汉鏍囪瘑(Shop,娌℃湁浼犲�奸粯璁ょ敤鎴风粦瀹氶攢鍞【闂殑鏍囪瘑) */
+    /** 寮�鍙戜汉鏍囪瘑(Shop,娌℃湁浼犲�奸粯璁ょ敤鎴风粦瀹氶攢鍞【闂殑鏍囪瘑) 蹇呭~锛屼笁灏戣锛宑rm灏卞~鐢ㄦ埛*/
     private String developerId;
-    /** 寮�鍙戜汉鍚嶇О(娌℃湁浼犲�奸粯璁ょ敤鎴风粦瀹氶攢鍞【闂殑鍚嶇О) */
+    /** 寮�鍙戜汉鍚嶇О(娌℃湁浼犲�奸粯璁ょ敤鎴风粦瀹氶攢鍞【闂殑鍚嶇О) 蹇呭~锛屼笁灏戣锛宑rm灏卞~鐢ㄦ埛*/
     private String developerName;
 
 
     /*骞冲彴鏉ユ簮**/
-    /** 鏉ユ簮搴旂敤appId(鍒涘缓璁㈠崟骞冲彴,绯荤粺榛樿) */
+    /** 鏉ユ簮搴旂敤appId(鍒涘缓璁㈠崟骞冲彴,绯荤粺榛樿) 蹇呭~*/
     private String appId;
-    /** 鏉ユ簮搴旂敤缂栫爜(鍟嗘埛璁剧疆骞冲彴缂栫爜,绯荤粺榛樿,浠g爜蹇呭~) */
+    /** 鏉ユ簮搴旂敤缂栫爜(鍟嗘埛璁剧疆骞冲彴缂栫爜,绯荤粺榛樿,浠g爜蹇呭~) 蹇呭~*/
     private String appIdCode;
     /*閿�鍞鍗曟潵婧�,閿�鍞彲浠ラ�夋嫨*/
-    /** 璁㈠崟鏉ユ簮浠g爜锛堥粯璁�:搴旂敤appId锛� */
+    /** 璁㈠崟鏉ユ簮浠g爜锛堥粯璁�:搴旂敤appId锛�
+     * 閿�鍞钩鍙扮紪鐮�,渚嬪:娣樺疂,鍦ㄧ數鍟嗗钩鍙拌缃噷闈紝鍦ㄧ涓夋柟骞冲彴閰嶇疆,蹇呭~,crm榛樿濉玞rm
+     * */
     private String sourceCode;
-    /** 璁㈠崟鏉ユ簮鍚嶇О(鍐椾綑) */
+    /** 璁㈠崟鏉ユ簮鍚嶇О(鍐椾綑) ,蹇呭~锛宺m榛樿濉玞rm*/
     private String sourceName;
-    /** 绗笁鏂硅鍗曞彿 */
+    /** 绗笁鏂硅鍗曞彿 crm蹇呭~锛屽~crm鐨勮鍗曞彿*/
     private String sourceOrderNo;
     /** 鍏戞崲鐮�(绗笁鏂瑰厬鎹㈢爜) */
     private String conversionCode;
 
-    /** 娓犻亾鏉ユ簮绫诲瀷锛圤rderTotalConstants锛� */
+    /** 璁㈠崟娓犻亾鏉ユ簮绫诲瀷锛圤rderTotalConstants锛� */
     private String channelType;
-    /** 娓犻亾鏍囪瘑锛堟笭閬�/鐢ㄦ埛锛� */
+    /** 璁㈠崟娓犻亾鏍囪瘑锛堟笭閬�/鐢ㄦ埛锛� crm蹇呭~锛屼笁灏戣 */
     private String commonId;
-    /** 娓犻亾鏉ユ簮鍚嶇О(娓犻亾/鐢ㄦ埛) */
+    /** 璁㈠崟娓犻亾鏉ユ簮鍚嶇О(娓犻亾/鐢ㄦ埛) */
     private String commonName;
 
     /** 绉戝缂栫爜 */
@@ -124,7 +126,7 @@
     /** 鍖荤敓鍚嶇О */
     private String doctorName;
 
-    /** 鍚屾鐘舵��0鍚�1鏄� */
+    /** 鍚屾鐘舵��0鍚�1鏄� ,蹇呭~锛屽鏋滆鍚屾鍒伴寤哄繀濉�1锛屽惁鍒�0*/
     private int hisSynStatus;
     /** 鍚屾his璁㈠崟鍙� */
     private String hisOrderId;
@@ -149,16 +151,16 @@
     /** 璁㈠崟澶囨敞 */
     private String remarks;
 
-    /** 鎺ㄨ崘浜烘爣璇� */
+    /** 璁㈠崟鎺ㄨ崘浜烘爣璇� crm蹇呭~锛屼笁灏戣*/
     private String inviteeId;
 
-    /** 鎺ㄨ崘浜哄悕绉�(鍐椾綑) */
+    /** 璁㈠崟鎺ㄨ崘浜哄悕绉�(鍐椾綑) crm蹇呭~锛屼笁灏戣*/
     private String inviteeName;
 
-    /** 鎺ㄨ崘浜烘墍灞炵被鍨�(UserChannelType) */
+    /** 璁㈠崟鎺ㄨ崘浜烘墍灞炵被鍨�(UserChannelType) */
     private String userBelongingType;
 
-    /** 鐢ㄦ埛Id */
+    /** 鐢ㄦ埛Id 蹇呭~*/
     private String userId;
 
     /** 鍚屾鐘舵��(OrderTotalConstants) */
diff --git a/phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipOrderService.java b/phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipOrderService.java
index a7bc22f..5f4993b 100644
--- a/phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipOrderService.java
+++ b/phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipOrderService.java
@@ -1,10 +1,7 @@
 package com.hz.his.feign.service.platform;
 
 import com.hx.resultTool.Result;
-import com.hz.his.dto.order.OrderCreateDto;
-import com.hz.his.dto.order.OrderPayDto;
-import com.hz.his.dto.order.OrderRefundDto;
-import com.hz.his.dto.order.OrdersTotalDto;
+import com.hz.his.dto.order.*;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -51,4 +48,10 @@
      */
     @PostMapping(value = "/refund/syn/refund")
     Result synRefund(@RequestBody OrderRefundDto dto, @RequestHeader("appIdCode") String appIdCode);
+
+    /**
+     * 寮�鏀惧钩鍙�-寮�鍗曞苟涓旂粨璐︽帴鍙�
+     */
+    @PostMapping(value = "/create/pay/order")
+    Result createPayOrder(@RequestBody OrderPHisDto dto);
 }
\ No newline at end of file

--
Gitblit v1.8.0