From 072ca81ef2cddc822288050f6eb1603b0b90c399 Mon Sep 17 00:00:00 2001
From: zhangxu <3%usVi4iXbVkhI1c>
Date: 星期二, 06 十二月 2022 18:45:06 +0800
Subject: [PATCH] Merge branch 'master-zhangxu' into master-test

---
 phis-feign/src/main/java/com/hz/his/dto/material/Consumables.java            |   54 ++++++++++++++++++
 phis-feign/src/main/java/com/hz/his/feign/service/sync/SyncGoodsService.java |   52 +++++++++++++++++
 phis-feign/src/main/java/com/hz/his/dto/material/ConsumablesType.java        |   25 ++++++++
 3 files changed, 131 insertions(+), 0 deletions(-)

diff --git a/phis-feign/src/main/java/com/hz/his/dto/material/Consumables.java b/phis-feign/src/main/java/com/hz/his/dto/material/Consumables.java
new file mode 100644
index 0000000..b441c9c
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/his/dto/material/Consumables.java
@@ -0,0 +1,54 @@
+package com.hz.his.dto.material;
+
+import lombok.Data;
+
+/**
+ * @Author 鍟嗗搧
+ */
+@Data
+public class Consumables {
+
+    /** 涓枃绠�绉�  */
+    private String aliasCHS;
+    /** 鑻辨枃绠�绉�  */
+    private String aliasENG;
+    /** 鍝佺墝  */
+    private String brand;
+    /** 鎵�灞炲垎绫籌D  蹇呭~*/
+    private String categoryId;
+    /** 鏄惁鍚敤  蹇呭~*/
+    private Boolean enabled;
+    /** 鐢熶骇鍘傚  */
+    private String manufacturer;
+    /** 涓枃鍚嶇О 蹇呭~  */
+    private String nameCHS;
+    /** 鑻辨枃鍚嶇О  */
+    private String nameENG;
+    /** 澶囨敞  */
+    private String note;
+    /** 缂栧彿 蹇呭~  */
+    private String number;
+    /** 閲囪喘浠�  */
+    private Number purchasePrice;
+    /** 鍙攢鍞殑  */
+    private Number salable;
+    /** 鍞环  */
+    private String sellingPrice;
+    /** 瑙勬牸  蹇呭~*/
+    private String spec;
+    /** 鏍囧噯缂栫爜  */
+    private String standardCode;
+    /** 鏍囧噯鍚嶇О  */
+    private String standardName;
+    /** 鍗曚綅  蹇呭~*/
+    private String unit;
+
+    /** 鐗╄祫绫诲瀷锛堝晢鍝�/鑽搧锛� */
+    private String type;
+
+    /**绫诲瀷- 鍟嗗搧*/
+    public static  String TYPE_GOODS = "goods";
+    /**绫诲瀷- 鑽搧*/
+    public static  String TYPE_DRUG = "drug";
+
+}
diff --git a/phis-feign/src/main/java/com/hz/his/dto/material/ConsumablesType.java b/phis-feign/src/main/java/com/hz/his/dto/material/ConsumablesType.java
new file mode 100644
index 0000000..b2abe20
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/his/dto/material/ConsumablesType.java
@@ -0,0 +1,25 @@
+package com.hz.his.dto.material;
+
+import lombok.Data;
+
+/**
+ * @Author  鐗╂枡鍒嗙被
+ */
+@Data
+public class ConsumablesType {
+
+    /** 鍚嶇О 蹇呭~ */
+    private String remarks;
+    /** 涓婄骇鍒嗙被ID */
+    private String parentId;
+    /** 绫诲瀷(鐗╄祫/鑽搧/椤圭洰) */
+    private String type;
+
+    /**绫诲瀷- 鐗╄祫*/
+    public static  String TYPE_GOODS = "goods";
+    /**绫诲瀷- 鑽搧*/
+    public static  String TYPE_DRUG = "drug";
+    /**绫诲瀷- 椤圭洰*/
+    public static  String TYPE_Service = "service ";
+
+}
diff --git a/phis-feign/src/main/java/com/hz/his/feign/service/sync/SyncGoodsService.java b/phis-feign/src/main/java/com/hz/his/feign/service/sync/SyncGoodsService.java
new file mode 100644
index 0000000..2a68bc7
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/his/feign/service/sync/SyncGoodsService.java
@@ -0,0 +1,52 @@
+package com.hz.his.feign.service.sync;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hx.resultTool.Result;
+import com.hz.his.dto.material.Consumables;
+import com.hz.his.dto.material.ConsumablesType;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+/**
+ * @Author
+ */
+@FeignClient(name="synchro-service",path = "/his_synchro",contextId = "synchro-goods")
+public interface SyncGoodsService {
+
+    /**
+     * 鎸囧畾绫诲瀷涓嬪垱寤哄垎绫绘柊鑺傜偣 - 鍚勭被鍨嬮�氱敤
+     * @param consumablesType
+     * @return 鎿嶄綔鎴愬姛鐨勮瘽result.data杩斿洖棰嗗缓id
+     */
+    @PostMapping(value = "/sync/goods/category/add")
+    Result addCategory(@RequestBody ConsumablesType consumablesType);
+    /**
+     * 淇敼鎸囧畾ID鍒嗙被鑺傜偣 - 鍚勭被鍨嬮�氱敤
+     * @param consumablesType
+     * @return
+     */
+    @PostMapping(value = "/sync/goods/category/update")
+    Result updateCategory(@RequestBody ConsumablesType consumablesType);
+    /**
+     * 鍒犻櫎鎸囧畾ID鍒嗙被鑺傜偣 - 鍚勭被鍨嬮�氱敤
+     * @param consumablesType
+     * @return
+     */
+    @PostMapping(value = "/sync/goods/category/delete")
+    Result deleteCategory(@RequestBody ConsumablesType consumablesType);
+    /**
+     * 鍒犻櫎鎸囧畾ID鍒嗙被鑺傜偣 - 鍚勭被鍨嬮�氱敤
+     * @param consumables
+     * @return 鎿嶄綔鎴愬姛鐨勮瘽result.data杩斿洖棰嗗缓id
+     */
+    @PostMapping(value = "/sync/goods/product/add")
+    Result addProduct(@RequestBody Consumables consumables);
+    /**
+     * 鍒犻櫎鎸囧畾ID鍒嗙被鑺傜偣 - 鍚勭被鍨嬮�氱敤
+     * @param consumables
+     * @return
+     */
+    @PostMapping(value = "/sync/goods/product/update")
+    Result updateProduct(@RequestBody Consumables consumables);
+}

--
Gitblit v1.8.0