From 4482c7f99cfa31a85fed74ecd8d87050236e80b2 Mon Sep 17 00:00:00 2001 From: zhangxu <3%usVi4iXbVkhI1c> Date: 星期二, 06 十二月 2022 18:44:37 +0800 Subject: [PATCH] 新增,修改,删除领建商品分类到领建,新增,修改商品到领建 --- 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