diff --git a/src/main/java/com/glxp/udi/admin/dao/inout/UnitMaintainDao.java b/src/main/java/com/glxp/udi/admin/dao/inout/UnitMaintainDao.java index 2b4eba1..085315b 100644 --- a/src/main/java/com/glxp/udi/admin/dao/inout/UnitMaintainDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/inout/UnitMaintainDao.java @@ -14,8 +14,6 @@ public interface UnitMaintainDao extends BaseMapper { boolean insertUnitMaintain(UnitMaintainEntity unitMaintainEntity); - boolean deleteById(@Param("id") String id); - boolean updateUnit(UnitMaintainEntity unitMaintainEntity); UnitMaintainEntity selectByName(@Param("name") String fromCorp); diff --git a/src/main/java/com/glxp/udi/admin/dao/inout/WarehouseBussinessTypeDao.java b/src/main/java/com/glxp/udi/admin/dao/inout/WarehouseBussinessTypeDao.java index d305534..31ba253 100644 --- a/src/main/java/com/glxp/udi/admin/dao/inout/WarehouseBussinessTypeDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/inout/WarehouseBussinessTypeDao.java @@ -35,5 +35,7 @@ public interface WarehouseBussinessTypeDao extends BaseMapper selectListByCode(Page page, @Param("code") String code); + List selectByCode(String code); + void deleteByCode(@Param("code") String code); } \ No newline at end of file diff --git a/src/main/java/com/glxp/udi/admin/dao/inventory/InvStockPrintDao.java b/src/main/java/com/glxp/udi/admin/dao/inventory/InvStockPrintDao.java index b89657a..c98d09e 100644 --- a/src/main/java/com/glxp/udi/admin/dao/inventory/InvStockPrintDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/inventory/InvStockPrintDao.java @@ -26,8 +26,6 @@ public interface InvStockPrintDao extends BaseMapper { boolean updateStockPrint(StockPrintEntity udiInfoEntity); - boolean deleteById(@Param("id") String id); - boolean deleteByGenKey(@Param("genKey") String genKey); boolean deleteByOrderId(@Param("sOrderId") String sOrderId); diff --git a/src/main/java/com/glxp/udi/admin/entity/inout/UdiInfoEntity.java b/src/main/java/com/glxp/udi/admin/entity/inout/UdiInfoEntity.java index 5e922bb..fa1b46d 100644 --- a/src/main/java/com/glxp/udi/admin/entity/inout/UdiInfoEntity.java +++ b/src/main/java/com/glxp/udi/admin/entity/inout/UdiInfoEntity.java @@ -84,6 +84,11 @@ public class UdiInfoEntity { private Boolean isDisable; + /** + * 第三方系统编码 + */ + private String thirdId; + //本地生成信息 @TableField(exist = false) private String batchNo; diff --git a/src/main/java/com/glxp/udi/admin/service/auth/DeviceKeyService.java b/src/main/java/com/glxp/udi/admin/service/auth/DeviceKeyService.java index 16c8a19..668e5ef 100644 --- a/src/main/java/com/glxp/udi/admin/service/auth/DeviceKeyService.java +++ b/src/main/java/com/glxp/udi/admin/service/auth/DeviceKeyService.java @@ -33,8 +33,7 @@ public class DeviceKeyService { public DeviceKeyEntity findDeviceByImei(String imei) { FilterDeviceKeyRequest filterDeviceKeyRequest = new FilterDeviceKeyRequest(); filterDeviceKeyRequest.setImei(imei); - DeviceKeyEntity deviceKeyEntity = deviceKeyDao.findDeviceByImei(filterDeviceKeyRequest); - return deviceKeyEntity; + return deviceKeyDao.findDeviceByImei(filterDeviceKeyRequest); } public void insertDeviceKey(DeviceKeyEntity deviceKeyEntity) { diff --git a/src/main/java/com/glxp/udi/admin/service/inout/UdiInfoService.java b/src/main/java/com/glxp/udi/admin/service/inout/UdiInfoService.java index 1036740..239659c 100644 --- a/src/main/java/com/glxp/udi/admin/service/inout/UdiInfoService.java +++ b/src/main/java/com/glxp/udi/admin/service/inout/UdiInfoService.java @@ -105,6 +105,10 @@ public class UdiInfoService { public boolean updateUdiInfo(UdiInfoEntity udiInfoEntity) { udiInfoEntity.setLastUpdateTime(new Date()); + if (StrUtil.isBlank(udiInfoEntity.getThirdId())) { + //当第三方系统编码为空时,置空此参数,更新时将此字段更新为null + udiInfoEntity.setThirdId("empty"); + } return udiInfoDao.updateUdiInfo(udiInfoEntity); } diff --git a/src/main/java/com/glxp/udi/admin/service/inout/UnitMaintainService.java b/src/main/java/com/glxp/udi/admin/service/inout/UnitMaintainService.java index e578788..0dc4cee 100644 --- a/src/main/java/com/glxp/udi/admin/service/inout/UnitMaintainService.java +++ b/src/main/java/com/glxp/udi/admin/service/inout/UnitMaintainService.java @@ -39,7 +39,8 @@ public class UnitMaintainService { } public boolean deleteById(String id) { - return unitMaintainDao.deleteById(id); + int i = unitMaintainDao.deleteById(id); + return i > 0; } public UnitMaintainEntity selectById(String id) { diff --git a/src/main/java/com/glxp/udi/admin/service/inout/WarehouseBussinessTypeService.java b/src/main/java/com/glxp/udi/admin/service/inout/WarehouseBussinessTypeService.java index 50291f8..2b787f7 100644 --- a/src/main/java/com/glxp/udi/admin/service/inout/WarehouseBussinessTypeService.java +++ b/src/main/java/com/glxp/udi/admin/service/inout/WarehouseBussinessTypeService.java @@ -30,12 +30,11 @@ public class WarehouseBussinessTypeService { * @return */ public List getListByCode(String code) { - Page page = new Page<>(-1, -1); - Page pageResult = warehouseBussinessTypeDao.selectListByCode(page, code); - if (pageResult.getTotal() == 0) { - return Collections.emptyList(); + List list = warehouseBussinessTypeDao.selectByCode(code); + if (CollUtil.isNotEmpty(list)) { + return list; } - return pageResult.getRecords(); + return Collections.emptyList(); } /** diff --git a/src/main/java/com/glxp/udi/admin/service/inventory/InvStockPrintService.java b/src/main/java/com/glxp/udi/admin/service/inventory/InvStockPrintService.java index 4487583..9109b18 100644 --- a/src/main/java/com/glxp/udi/admin/service/inventory/InvStockPrintService.java +++ b/src/main/java/com/glxp/udi/admin/service/inventory/InvStockPrintService.java @@ -51,7 +51,8 @@ public class InvStockPrintService { } public boolean deleteById(String id) { - return stockPrintDao.deleteById(id); + int i = stockPrintDao.deleteById(id); + return i > 0; } } diff --git a/src/main/resources/mybatis/mapper/inout/UdiInfoDao.xml b/src/main/resources/mybatis/mapper/inout/UdiInfoDao.xml index 69113bd..cbfcb5b 100644 --- a/src/main/resources/mybatis/mapper/inout/UdiInfoDao.xml +++ b/src/main/resources/mybatis/mapper/inout/UdiInfoDao.xml @@ -174,6 +174,7 @@ manufactory=#{manufactory}, lastUpdateTime=#{lastUpdateTime}, thirdId=#{thirdId}, + thirdId = null, WHERE id = #{id} diff --git a/src/main/resources/mybatis/mapper/inout/UnitMaintainDao.xml b/src/main/resources/mybatis/mapper/inout/UnitMaintainDao.xml index 202ee6f..a615b36 100644 --- a/src/main/resources/mybatis/mapper/inout/UnitMaintainDao.xml +++ b/src/main/resources/mybatis/mapper/inout/UnitMaintainDao.xml @@ -40,10 +40,6 @@ #{mobile}, #{pinyinCode}) - - DELETE FROM io_unit_maintain WHERE id = #{id} - - UPDATE io_unit_maintain diff --git a/src/main/resources/mybatis/mapper/inout/WarehouseBussinessTypeDao.xml b/src/main/resources/mybatis/mapper/inout/WarehouseBussinessTypeDao.xml index 914acd1..5e6cfbf 100644 --- a/src/main/resources/mybatis/mapper/inout/WarehouseBussinessTypeDao.xml +++ b/src/main/resources/mybatis/mapper/inout/WarehouseBussinessTypeDao.xml @@ -237,6 +237,12 @@ inner join basic_bussiness_type on inv_warehouse_bussiness_type.action = basic_bussiness_type.action where code = #{code} + delete diff --git a/src/main/resources/mybatis/mapper/inventory/InvStockPrintDao.xml b/src/main/resources/mybatis/mapper/inventory/InvStockPrintDao.xml index e1c0f08..9d6e133 100644 --- a/src/main/resources/mybatis/mapper/inventory/InvStockPrintDao.xml +++ b/src/main/resources/mybatis/mapper/inventory/InvStockPrintDao.xml @@ -186,12 +186,6 @@ - - DELETE - FROM inv_stockprint - WHERE id = #{id} - - DELETE FROM inv_stockprint