From 83cc07aee83c50ab2934422517676e8366a8511b Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Fri, 10 Jan 2025 15:56:47 +0800 Subject: [PATCH] =?UTF-8?q?1/10=20=E5=90=8C=E6=AD=A5=E5=88=A0=E9=99=A41.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/glxp/api/constant/SocketMsgType.java | 2 ++ .../com/glxp/api/constant/SyncDelType.java | 1 + .../basic/UdiContrastController.java | 22 +++++++++++++++---- .../glxp/api/req/system/DeleteRequest.java | 2 ++ 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/glxp/api/constant/SocketMsgType.java b/src/main/java/com/glxp/api/constant/SocketMsgType.java index 4fee08aa..0cf41fda 100644 --- a/src/main/java/com/glxp/api/constant/SocketMsgType.java +++ b/src/main/java/com/glxp/api/constant/SocketMsgType.java @@ -15,6 +15,8 @@ public interface SocketMsgType { String BASIC_DATA_DELETE = "BASIC_DATA_DELETE"; //耗材字典删除 + String PRODUCT_LEVEL_DELETE = "PRODUCT_LEVEL_DELETE"; //产品层级删除 + String BASIC_MANAGE_DELETE = "BASIC_MANAGE_DELETE"; //入援物资维护 String BASIC_CORP_MAINTAIN_DELETE = "BASIC_CORP_MAINTAIN_DELETE"; //供应商字典 diff --git a/src/main/java/com/glxp/api/constant/SyncDelType.java b/src/main/java/com/glxp/api/constant/SyncDelType.java index 80a20fc4..f54e370a 100644 --- a/src/main/java/com/glxp/api/constant/SyncDelType.java +++ b/src/main/java/com/glxp/api/constant/SyncDelType.java @@ -7,6 +7,7 @@ public interface SyncDelType { */ String BASIC_MAINTAIN = "BASIC_MAINTAIN"; //耗材字典 + String BASIC_MANAGE = "BASIC_MANAGE"; //供应商器械信息 String BASIC_CORP_MAINTAIN = "BASIC_CORP_MAINTAIN"; //往来信息维护 diff --git a/src/main/java/com/glxp/api/controller/basic/UdiContrastController.java b/src/main/java/com/glxp/api/controller/basic/UdiContrastController.java index 63a7da3c..97e77445 100644 --- a/src/main/java/com/glxp/api/controller/basic/UdiContrastController.java +++ b/src/main/java/com/glxp/api/controller/basic/UdiContrastController.java @@ -9,21 +9,22 @@ import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.Log; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; -import com.glxp.api.constant.AsyncDiDlHelper; -import com.glxp.api.constant.BusinessType; -import com.glxp.api.constant.ConstantStatus; +import com.glxp.api.constant.*; import com.glxp.api.controller.BaseController; +import com.glxp.api.controller.sync.SpsSyncWebSocket; import com.glxp.api.dto.BasicProductsCreateDto; import com.glxp.api.entity.basic.CompanyProductRelevanceEntity; import com.glxp.api.entity.basic.ProductInfoEntity; import com.glxp.api.entity.basic.UdiProductEntity; import com.glxp.api.entity.basic.UdiRelevanceEntity; +import com.glxp.api.entity.sync.SocketMsgEntity; import com.glxp.api.entity.system.CompanyEntity; import com.glxp.api.entity.thrsys.CodeRel; import com.glxp.api.entity.thrsys.ThrProductsEntity; import com.glxp.api.entity.thrsys.ThrSystemEntity; import com.glxp.api.http.NmpaUdiClient; import com.glxp.api.req.basic.*; +import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.FilterBasicThirdSysRequest; import com.glxp.api.req.thrsys.ThirdAliDrugRequest; import com.glxp.api.res.DiLevelResponse; @@ -54,7 +55,7 @@ import java.util.List; * 耗材字典关联相关接口 */ @RestController -public class UdiContrastController { +public class UdiContrastController extends BaseController{ @Resource NmpaUdiClient udiDlHttpClient; @@ -79,6 +80,9 @@ public class UdiContrastController { @Resource IoOrderDetailCodeService orderDetailCodeService; + @Resource + SpsSyncWebSocket webSocketServer; + /** * 耗材字典添加 */ @@ -414,6 +418,16 @@ public class UdiContrastController { codeRel.setDrugCode(addProductRequest.getNameCode()); udiContrastService.deleteRelCode(codeRel); } + DeleteRequest deleteRequest = new DeleteRequest(); + deleteRequest.setNameCode(addProductRequest.getNameCode()); + BasicDataRequest basicDataRequest = new BasicDataRequest(); + basicDataRequest.setDeleteRequest(deleteRequest); + Long userId = getUserId(); + basicDataRequest.setKey(SyncDelType.BASIC_MAINTAIN); + //推送 + BasicDataRequest request = webSocketServer.insert(basicDataRequest, userId + ""); + request.setDeleteRequest(deleteRequest); + webSocketServer.sendMessage(SocketMsgEntity.builder().type(SocketMsgType.PRODUCT_LEVEL_DELETE).content(request).remark("产品层级删除").build(), null); return ResultVOUtils.success("删除成功!"); } diff --git a/src/main/java/com/glxp/api/req/system/DeleteRequest.java b/src/main/java/com/glxp/api/req/system/DeleteRequest.java index 618e2470..66a6e543 100644 --- a/src/main/java/com/glxp/api/req/system/DeleteRequest.java +++ b/src/main/java/com/glxp/api/req/system/DeleteRequest.java @@ -13,4 +13,6 @@ public class DeleteRequest { List billNos; String invoiceEncode; String userId; + + private String nameCode; }