From f8051c6c3d17240da0ffb0d2018a74fbd604589b Mon Sep 17 00:00:00 2001 From: anthonywj Date: Tue, 16 May 2023 17:46:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E4=BA=A7=E5=93=81=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/basic/UdiSyncController.java | 18 ++- .../api/entity/basic/BasicUdiRelEntity.java | 10 +- .../api/res/basic/BasicUdiRelResponse.java | 4 + .../mapper/basic/BasicUdiRelMapper.xml | 61 ++++++++- src/main/resources/schemas/schema_v2.1.sql | 126 +----------------- 5 files changed, 84 insertions(+), 135 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java b/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java index 0d3447a..7262fef 100644 --- a/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java +++ b/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java @@ -1,5 +1,6 @@ package com.glxp.api.controller.basic; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -15,6 +16,7 @@ import com.glxp.api.req.basic.*; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.res.auth.AuthAdminResponse; import com.glxp.api.res.basic.BasicUdiRelResponse; +import com.glxp.api.res.basic.UdiRelevanceResponse; import com.glxp.api.service.auth.CustomerService; import com.glxp.api.service.basic.BasicUdiRelService; import lombok.Data; @@ -202,16 +204,28 @@ public class UdiSyncController extends BaseController { List productInfoEntityList = productInfoService.syncDlUdi(productInfoFilterRequest); return ResultVOUtils.success(productInfoEntityList); - } - //出入库同步下载 @GetMapping("udidl/udiwms/syncCompany") public BaseResponse syncCompany(UdiCompanyRequest udiCompanyRequest) { List udiCompanyEntities = udiCompanyService.syncDlCompany(udiCompanyRequest); return ResultVOUtils.success(udiCompanyEntities); + } + + /** + * 耗材字典信息获取同一产品对应DI信息 + */ + @AuthRuleAnnotation("") + @GetMapping("udiwms/udiinfo/local/filterByUuid") + public BaseResponse filterLocalByUuid(FilterUdiRelRequest filterUdiRelRequest) { + + if (StrUtil.isEmpty(filterUdiRelRequest.getUuid())) { + return ResultVOUtils.error(500, "产品ID主键不能为空!"); + } + List udiInfoEntities = productInfoService.selectByUuid(filterUdiRelRequest.getUuid()); + return ResultVOUtils.success(udiInfoEntities); } } diff --git a/src/main/java/com/glxp/api/entity/basic/BasicUdiRelEntity.java b/src/main/java/com/glxp/api/entity/basic/BasicUdiRelEntity.java index affec84..061d414 100644 --- a/src/main/java/com/glxp/api/entity/basic/BasicUdiRelEntity.java +++ b/src/main/java/com/glxp/api/entity/basic/BasicUdiRelEntity.java @@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; + import java.io.Serializable; import java.util.Date; + import lombok.Data; @Data @@ -44,5 +46,11 @@ public class BasicUdiRelEntity implements Serializable { @TableField(value = "updateUser") private String updateUser; + /** + * 生产数据对接方(1.生产企业/2.代理商/3.购买方) + */ + @TableField(value = "companyType") + private String companyType; + private static final long serialVersionUID = 1L; -} \ No newline at end of file +} diff --git a/src/main/java/com/glxp/api/res/basic/BasicUdiRelResponse.java b/src/main/java/com/glxp/api/res/basic/BasicUdiRelResponse.java index 12fabdb..e13ea48 100644 --- a/src/main/java/com/glxp/api/res/basic/BasicUdiRelResponse.java +++ b/src/main/java/com/glxp/api/res/basic/BasicUdiRelResponse.java @@ -39,6 +39,10 @@ public class BasicUdiRelResponse { */ private String updateUser; + private String companyType; + + private String companyName; + private String nameCode; private String packRatio; diff --git a/src/main/resources/mybatis/mapper/basic/BasicUdiRelMapper.xml b/src/main/resources/mybatis/mapper/basic/BasicUdiRelMapper.xml index 34b6b8f..bdd8311 100644 --- a/src/main/resources/mybatis/mapper/basic/BasicUdiRelMapper.xml +++ b/src/main/resources/mybatis/mapper/basic/BasicUdiRelMapper.xml @@ -3,9 +3,56 @@ diff --git a/src/main/resources/schemas/schema_v2.1.sql b/src/main/resources/schemas/schema_v2.1.sql index 2389018..e8e540b 100644 --- a/src/main/resources/schemas/schema_v2.1.sql +++ b/src/main/resources/schemas/schema_v2.1.sql @@ -1,129 +1,5 @@ # 字段新增 (表名,字段名,字段类型,修改方式(1:新增,2:修改,3:删除) -CALL Pro_Temp_ColumnWork('auth_user_bustype', 'updateTime', - 'datetime ', 1); - -CALL Pro_Temp_ColumnWork('auth_dept_user', 'updateTime', - 'datetime ', 1); - -CALL Pro_Temp_ColumnWork('sync_data_set', 'department', 'tinyint ', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'warehouseDict', 'tinyint ', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'userData', 'tinyint ', 1); - - - -CALL Pro_Temp_ColumnWork('basic_udirel', 'relCode', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('basic_udirel', 'lowStockNum', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('basic_udirel', 'useExpireTime', 'int', 1); -CALL Pro_Temp_ColumnWork('basic_udirel', 'dispatch', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_udirel', 'groupBuy', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_udirel', 'isDateBy', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_udirel', 'needCert', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_udirel', 'certIdFk', 'varchar(255)', 1); - -CALL Pro_Temp_ColumnWork('basic_products', 'allowNoSerial', 'tinyint', 1); - - -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'vailDispatch', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'vailGroupBuy', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'busType', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'inStock', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'actionType', 'tinyint', 1); - -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckEnable', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckWebNew', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckPdaUn', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckPdaEd', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckUdims', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckPc', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckSp', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckChange', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckBalance', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckCopy', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'fillCodeRel', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkVailDate', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkExpire', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkCertExpire', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'preInBackAction', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'backPreinType', 'tinyint', 1); - - -CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'targetBusAction', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'busBeforeTime', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'beforeTime', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'auditStatus', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'busAuditStatus', 'tinyint', 1); - -CALL Pro_Temp_ColumnWork('basic_bustype_change', 'auditStatus', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_change', 'busAuditStatus', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_change', 'targetBusAction', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_change', 'beforeTime', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_change', 'busBeforeTime', 'tinyint', 1); - - - -INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `remark`) -VALUES (100, 'clean_log_task', '0 0 2 1/1 * ? ', NULL, '删除日志数据'); - - -CALL Pro_Temp_ColumnWork('sync_data_set', 'basicType', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'basicDept', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'dbDiCompany', 'tinyint', 1); - -CALL Pro_Temp_ColumnWork('sync_data_set', 'updateTime', 'datetime', 1); - -CALL Pro_Temp_ColumnWork('sync_data_set', 'orderToInSyncTime', 'int', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'supCert', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'systemConfig', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'printConfig', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'scanChangeConfig', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'busChangeConfig', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'basicThirdDept', 'tinyint', 1); - -CALL Pro_Temp_ColumnWork('sys_param_config', 'updateTime', 'datetime', 1); - - - -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'advancePreIn', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'sortNum', 'int', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'preInBackAction', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'backPreinType', 'tinyint', 1); - - -CALL Pro_Temp_ColumnWork('sync_data_set', 'udiCodeLost', 'tinyint ', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'udiCodeRel', 'tinyint ', 1); - - -# 修改主键为LONG -CALL Pro_Temp_ColumnWork('basic_hosp_type', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('basic_udirel', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('basic_products', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('company_product_relevance', 'id', 'bigint', 2); - -CALL Pro_Temp_ColumnWork('basic_corp', 'id', 'bigint', 2); - - -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('basic_bustype_change', 'id', 'bigint', 2); - - -CALL Pro_Temp_ColumnWork('auth_user', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_user_bustype', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_dept', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_warehouse', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_warehouse_bustype', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_warehouse_user', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_space', 'id', 'bigint', 2); - - -CALL Pro_Temp_ColumnWork('auth_dept_user', 'userId', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_dept_user', 'deptId', 'bigint', 2); -CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'Id', 'bigint', 2); - -CALL Pro_Temp_ColumnWork('sync_data_set', 'orderInvoice', 'tinyint', 1); - - - -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'spaceOut', 'tinyint', 1); +CALL Pro_Temp_ColumnWork('basic_udi_rel', 'companyType', 'tinyint', 1);