phi-warehouse-feign/src/main/java/com/hx/phiappt/dto/order/pick/PickUpDto.java
New file @@ -0,0 +1,53 @@ package com.hx.phiappt.dto.order.pick; import lombok.Data; import java.util.List; /** * 提货单扩展 * */ @Data public class PickUpDto { /***********必填项*********************/ /**类型(具体值看下面常量)*/ private Integer type; /**提货单生成来源类型(具体值看下面常量)*/ private Integer commonType; /**提货单生成来源标识*/ private String commonId; /**操作人类型(具体值看下面常量)*/ private Integer opManType; /**操作人标识(操作人为系统可不传)*/ private String opManId; /**操作备注*/ private String remark; /**提货详情*/ private List<PickUpItemDto> items; /***********可填项(可传尽量传)*********************/ /**门店标识*/ private String shopId; /**医生标识*/ private String doctorId; /**科室标识*/ private String roomId; /**客户标识*/ private String userId; /**类型-商品提货单*/ public static Integer TYPE_GOODS = 1; /**类型-药品提货单*/ public static Integer TYPE_MEDICINE = 2; /**来源类型-订单*/ public static Integer SOURCE_TYPE_ORDER = 0; /**操作人类型-系统*/ public static Integer OP_MAN_TYPE_SYS = 0; /**操作人类型-员工*/ public static Integer OP_MAN_TYPE_EMPLOYEE = 1; /**操作人类型-用户*/ public static Integer OP_MAN_TYPE_USER = 2; } phi-warehouse-feign/src/main/java/com/hx/phiappt/dto/order/pick/PickUpItemDto.java
New file @@ -0,0 +1,23 @@ package com.hx.phiappt.dto.order.pick; import lombok.Data; import java.math.BigDecimal; /** * 提货单扩展 * */ @Data public class PickUpItemDto { /***********必填项*********************/ /**耗材标识*/ private String consumablesId; /**需要提货数量*/ private Integer needNum; /***********非必填项*********************/ /**总数量(不传默认设为需要提货数量)*/ private Integer num; /**订单中商品(药品)的单价*/ private BigDecimal orderPrice; } phi-warehouse-feign/src/main/java/com/hx/phiappt/dto/order/stock/StockChangeDto.java
New file @@ -0,0 +1,82 @@ package com.hx.phiappt.dto.order.stock; import lombok.Data; import java.util.List; /** * 出入库参数 * @author fwq */ @Data public class StockChangeDto { /************************必填******************************/ /**改变类型标识(具体类型)(查表shop_warehouse_type拿id)*/ private String changeType; /**关联的公共类型(具体看下面的常量)*/ private Integer commonType; /**关联的公共标识*/ private String commonId; /**创建人类型(具体看下面的常量)*/ private Integer creatorType; /**创建人标识*/ private String creator; /**创建人名称*/ private String creatorName; /**备注信息*/ private String remarks; /**库存改变明细*/ List<StockChangeItemDto> stockItemList; /************************非必填******************************/ /**出入库人标识(员工)*/ private String opStockId; /**出入库人标识(员工)名*/ private String opStockName; /**供应商标识(供应商表)*/ private String supplierId; /**供应商名*/ private String supplierName; /**领用科室标识(科室表)*/ private String roomId; /**领用科室名*/ private String roomName; /**领用部门标识(部门表)*/ private String departmentId; /**领用部门名*/ private String departmentName; /**领用人标识(员工)*/ private String receiver; /**领用人名*/ private String receiverName; /**用户标识*/ private String customer; /**用户名*/ private String customerName; /**发票号*/ private String bill; /**关联的公共类型-提货单出库*/ public static Integer COMMON_TYPE_PICK_UP = 0; /**关联的公共类型-划扣正常出库*/ public static Integer COMMON_TYPE_BUCKLE = 1; /**关联的公共类型-划扣修改出库*/ public static Integer COMMON_TYPE_UPDATE_OUT = 1; /**关联的公共类型-划扣修改入库*/ public static Integer COMMON_TYPE_UPDATE_IN = 2; /**关联的公共类型-划扣作废入库*/ public static Integer COMMON_TYPE_BUCKLE_INVALID = 3; /**关联的公共类型-商品退回入库*/ public static Integer COMMON_TYPE_GOODS_RETURN = 4; /**创建人类型-系统*/ public static Integer CREATE_TYPE_SYS = 0; /**创建人类型-员工*/ public static Integer CREATE_TYPE_EMPLOYEE = 1; /**创建人类型-用户*/ public static Integer CREATE_TYPE_USER = 2; } phi-warehouse-feign/src/main/java/com/hx/phiappt/dto/order/stock/StockChangeItemDto.java
New file @@ -0,0 +1,17 @@ package com.hx.phiappt.dto.order.stock; import lombok.Data; /** * 出入库详情 * @author fwq */ @Data public class StockChangeItemDto { /***********必填***********************/ /**库存标识(表shop_warehouse_item)*/ private String shopItemId; /**变化数量(出库负,入库正)*/ private Integer num; } phi-warehouse-feign/src/main/java/com/hx/phiappt/dto/stock/StockDto.java
New file @@ -0,0 +1,16 @@ package com.hx.phiappt.dto.stock; import lombok.Data; /** * 库存扩展 * @author fwq */ @Data public class StockDto { /**类型:0耗材,1仓库*/ private Integer commonType; /**标识*/ private String commonId; } phi-warehouse-feign/src/main/java/com/hx/phiappt/dto/vo/CommodityMessageVo.java
@@ -13,21 +13,18 @@ */ @Data public class CommodityMessageVo { /**请求地址*/ private String sendUrl; /** 账套名称(必填)*/ private String accountName; /** 常量:04bd473e01c0e0e0676d213172c544d6(必填)*/ private String token; /** 签名:MD5(RequestData+Token)(必填)*/ private String sign; /** 常量:BusinessRequest(必填)*/ private String requestName; /** 业务请求JSON文本数据(必填)*/ private JSONObject requestData; /** 商品编码*/ private String cgoodsid; phi-warehouse-feign/src/main/java/com/hx/phiappt/dto/vo/ERPInventoryVo.java
@@ -9,6 +9,8 @@ */ @Data public class ERPInventoryVo { /**请求地址*/ private String sendUrl; /** 账套名称*/ private String accountName; /** 常量:04bd473e01c0e0e0676d213172c544d6*/ phi-warehouse-feign/src/main/java/com/hx/phiappt/dto/vo/ShopWarehouseMessageVo.java
@@ -9,6 +9,8 @@ */ @Data public class ShopWarehouseMessageVo { /**请求地址*/ private String sendUrl; /** 账套名称*/ private String accountName; /** 常量:04bd473e01c0e0e0676d213172c544d6*/ phi-warehouse-feign/src/main/java/com/hx/phiappt/feign/WOrderService.java
New file @@ -0,0 +1,34 @@ package com.hx.phiappt.feign; import com.hx.phiappt.dto.order.pick.PickUpDto; import com.hx.phiappt.dto.order.stock.StockChangeDto; import com.hx.resultTool.Result; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; /** * 这里这个name 需要填写 请求的服务提供者的注册到nacos Server上面的服务名,path 是请求接口前缀 */ @FeignClient(name="phi-warehouse-user", path = "/warehouse-user",contextId = "warehouse-order") public interface WOrderService { /** * 生成商品提货单 */ @PostMapping(value = "/order/create/pack/up") Result pickUpOrder(@RequestBody PickUpDto pickUpDto); /** * 生成商品出库单 */ @PostMapping(value = "/order/create/out/stock") Result outStockOrder(@RequestBody StockChangeDto stockChangeDto); /** * 生成商品入库单 */ @PostMapping(value = "/order/create/in/stock") Result inStockOrder(@RequestBody StockChangeDto stockChangeDto); } phi-warehouse-feign/src/main/java/com/hx/phiappt/feign/WStcokService.java
New file @@ -0,0 +1,21 @@ package com.hx.phiappt.feign; import com.hx.phiappt.dto.stock.StockDto; import com.hx.resultTool.Result; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; /** * 这里这个name 需要填写 请求的服务提供者的注册到nacos Server上面的服务名,path 是请求接口前缀 */ @FeignClient(name="phi-warehouse-user", path = "/warehouse-user",contextId = "warehouse-stock") public interface WStcokService { /** * 更新库存信息 */ @PostMapping(value = "/stock/update/one") Result updateStock(@RequestBody StockDto stockDto); }