Browse Source

errorCode代码整合到一处

master
chenfang 2 years ago
parent
commit
e366c0dc2f
  1. 274
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/ErrorCodeConstants.java
  2. 14
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/accountcalendar/ErrorCodeConstants.java
  3. 17
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/areabasic/ErrorCodeConstants.java
  4. 22
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/bom/ErrorCodeConstants.java
  5. 24
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/businesstype/ErrorCodeConstants.java
  6. 19
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/carrier/ErrorCodeConstants.java
  7. 18
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/currencyexchange/ErrorCodeConstants.java
  8. 18
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/customer/ErrorCodeConstants.java
  9. 20
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/customerdock/ErrorCodeConstants.java
  10. 23
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/customeritem/ErrorCodeConstants.java
  11. 20
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/dock/ErrorCodeConstants.java
  12. 28
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/itembasic/ErrorCodeConstants.java
  13. 20
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/itempackaging/ErrorCodeConstants.java
  14. 18
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/rule/ErrorCodeConstants.java
  15. 23
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/saleprice/ErrorCodeConstants.java
  16. 20
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/shift/ErrorCodeConstants.java
  17. 22
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/stdcostprice/ErrorCodeConstants.java
  18. 20
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/supplier/ErrorCodeConstants.java
  19. 25
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/supplieritem/ErrorCodeConstants.java
  20. 19
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/systemcalendar/ErrorCodeConstants.java
  21. 19
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/team/ErrorCodeConstants.java
  22. 20
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/transactiontype/ErrorCodeConstants.java
  23. 19
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/warehouse/ErrorCodeConstants.java
  24. 20
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/workshop/ErrorCodeConstants.java
  25. 23
      win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/workstation/ErrorCodeConstants.java
  26. 4
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/itembasic/ItembasicController.java
  27. 11
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/saleprice/SalepriceMapper.java
  28. 9
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/supplieritem/SupplieritemMapper.java
  29. 10
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/systemcalendar/SystemcalendarMapper.java
  30. 8
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/accountcalendar/AccountcalendarServiceImpl.java
  31. 17
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/areabasic/AreabasicServiceImpl.java
  32. 21
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/bom/BomServiceImpl.java
  33. 25
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/businesstype/BusinesstypeServiceImpl.java
  34. 16
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/carrier/CarrierServiceImpl.java
  35. 1
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/configurationsetting/ConfigurationsettingServiceImpl.java
  36. 5
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/currencyexchange/CurrencyexchangeServiceImpl.java
  37. 5
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/customer/CustomerServiceImpl.java
  38. 5
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/customerdock/CustomerdockServiceImpl.java
  39. 5
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/customeritem/CustomeritemServiceImpl.java
  40. 8
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/dock/DockServiceImpl.java
  41. 39
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/itembasic/ItembasicServiceImpl.java
  42. 5
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/itempackaging/ItempackagingServiceImpl.java
  43. 5
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/location/LocationServiceImpl.java
  44. 13
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/locationgroup/LocationgroupServiceImpl.java
  45. 3
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/owner/OwnerServiceImpl.java
  46. 48
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/rule/RuleServiceImpl.java
  47. 56
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/saleprice/SalepriceServiceImpl.java
  48. 55
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/shift/ShiftServiceImpl.java
  49. 68
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/stdcostprice/StdcostpriceServiceImpl.java
  50. 34
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/supplier/SupplierServiceImpl.java
  51. 51
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/supplieritem/SupplieritemServiceImpl.java
  52. 58
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/systemcalendar/SystemcalendarServiceImpl.java
  53. 51
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/team/TeamServiceImpl.java
  54. 46
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/transactiontype/TransactiontypeServiceImpl.java
  55. 33
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/warehouse/WarehouseServiceImpl.java
  56. 37
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/workshop/WorkshopServiceImpl.java
  57. 7
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/workstation/WorkstationServiceImpl.java

274
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/ErrorCodeConstants.java

@ -8,7 +8,50 @@ import com.win.framework.common.exception.ErrorCode;
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
//物品基本信息ErrorCode
ErrorCode ITEMBASIC_NOT_EXISTS = new ErrorCode(1_000_020_000, "物品基本信息不存在");
ErrorCode ITEMBASIC_CODE_NOT_EXISTS = new ErrorCode(1_000_020_001, "物品基本信息不正确");
ErrorCode ITEMBASIC_CODE_EXISTS = new ErrorCode(1_000_020_002, "code已存在");
ErrorCode ITEMBASIC_STATUS_NOT_EXISTS = new ErrorCode(1_000_020_003, "状态不存在");
ErrorCode ITEMBASIC_UOM_NOT_EXISTS = new ErrorCode(1_000_020_004, "计量单位不存在");
ErrorCode ITEMBASIC_IS_STDPACK_NOT_EXISTS = new ErrorCode(1_000_020_005, "是否标包不存在");
ErrorCode ITEMBASIC_ENABLE_BUY_NOT_EXISTS = new ErrorCode(1_000_020_006, "可采购不存在");
ErrorCode ITEMBASIC_ENABLE_MAKE_NOT_EXISTS = new ErrorCode(1_000_020_007, "可制造不存在");
ErrorCode ITEMBASIC_ENABLE_OUTSOURING_NOT_EXISTS = new ErrorCode(1_000_020_008, "可委外加工不存在");
ErrorCode ITEMBASIC_IS_RECYCLED_NOT_EXISTS = new ErrorCode(1_000_020_009, "回收件不存在");
ErrorCode ITEMBASIC_IS_PHANTOM_NOT_EXISTS = new ErrorCode(1_000_020_010, "虚零件不存在");
ErrorCode ITEMBASIC_ABC_CLASS_NOT_EXISTS = new ErrorCode(1_000_020_011, "ABC类不存在");
ErrorCode ITEMBASIC_TYPE_NOT_EXISTS = new ErrorCode(1_000_020_012, "类型不存在");
ErrorCode ITEMBASIC_VALIDITY_DAYS_NOT_EXISTS = new ErrorCode(1_000_020_013, "有效天数不存在");
ErrorCode ITEMBASIC_AVAIABLE_NOT_EXISTS = new ErrorCode(1_000_020_014, "是否可用不存在");
ErrorCode ITEMBASIC_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_020_015, "导入物品基础信息不能为空");
//物品包装信息ErrorCode
ErrorCode ITEMPACKAGING_NOT_EXISTS = new ErrorCode(1_000_021_000, "物品包装信息 不存在");
ErrorCode ITEMPACKAGING_ITEM_CODE_NOT_EXISTS = new ErrorCode(1_000_021_001, "code不存在");
ErrorCode ITEMPACKAGING_ITEM_CODE_EXISTS = new ErrorCode(1_000_021_002, "code已存在");
ErrorCode ITEMPACKAGING_UOM_NOT_EXISTS = new ErrorCode(1_000_021_003, "物品包装信息不存在");
ErrorCode ITEMPACKAGING_STD_PACK_UNIT_NOT_EXISTS = new ErrorCode(1_000_021_004, "包装单位不存在");
ErrorCode ITEMPACKAGING_STD_PACK_QTY_NOT_EXISTS = new ErrorCode(1_000_021_005, "包装数量不存在");
ErrorCode ITEMPACKAGING_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_021_006, "是否可用不存在");
ErrorCode ITEMPACKAGING_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_021_007, "导入物品包装信息不能为空");
//物料清单ErrorCode
ErrorCode BOM_NOT_EXISTS = new ErrorCode(1_000_022_000, "物料清单不存在");
ErrorCode BOM_PRODUCT_ITEM_CODE_NOT_EXISTS = new ErrorCode(1_000_022_001, "父物料代码不存在");
ErrorCode BOM_PRODUCT_ITEM_CODE_EXISTS = new ErrorCode(1_000_022_002, "父物料代码已存在");
ErrorCode BOM_COMPONENT_UOM_NOT_EXISTS = new ErrorCode(1_000_022_003, "子物料计量单位不存在");
ErrorCode BOM_AVAIABLE_NOT_EXISTS = new ErrorCode(1_000_022_004, "是否可用不存在");
ErrorCode BOM_COMPONENT_ITEM_CODE_NOT_EXISTS = new ErrorCode(1_000_022_005, "子物料代码不存在");
ErrorCode BOM_COMPONENT_QTY_EXISTS = new ErrorCode(1_000_022_006, "子物料数量不存在");
ErrorCode BOM_PROCESS_CODE_NOT_EXISTS = new ErrorCode(1_000_022_007, "工序代码不存在");
ErrorCode BOM_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_022_008, "导入物联清单不能为空");
//标准成本价格单ErrorCode
ErrorCode STDCOSTPRICE_NOT_EXISTS = new ErrorCode(1_023_000_000, "标准成本价格单不存在");
ErrorCode STDCOSTPRICE_SUPPLIER_CODE_NOT_EXISTS = new ErrorCode(1_023_000_001, "供应商代码不存在");
ErrorCode STDCOSTPRICE_ITEN_CODE_NOT_EXISTS = new ErrorCode(1_023_000_002, "物料代码不存在");
ErrorCode STDCOSTPRICE_ITEN_CODE_EXISTS = new ErrorCode(1_023_000_003, "物料代码已存在");
ErrorCode STDCOSTPRICE_CURRENCY_NOT_EXISTS = new ErrorCode(1_023_000_004, "货币不存在");
ErrorCode STDCOSTPRICE_AVAILABLE_NOT_EXISTS = new ErrorCode(1_023_000_005, "是否可用不存在");
ErrorCode STDCOSTPRICE_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_023_000_006, "导入标准成本价格单不能为空");
//生产线物料关系ErrorCode
ErrorCode PRODUCTIONLINEITEM_NOT_EXISTS = new ErrorCode(1_000_024_000, "生产线物料关系不存在");
ErrorCode PRODUCTIONLINEITEM_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_024_001, "导入生产线物料关系不能为空");
@ -17,6 +60,22 @@ public interface ErrorCodeConstants {
ErrorCode PRODUCTIONLINEITEM_ITEM_CODE_NOT_EXISTS = new ErrorCode(1_000_024_004, "物品代码不存在");
ErrorCode PRODUCTIONLINEITEM_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_024_005, "是否可用不存在");
//采购价格单ErrorCode
ErrorCode SUPPLIER_NOT_EXISTS = new ErrorCode(1_000_025_000, "供应商不存在");
ErrorCode SUPPLIER_NOT_EXISTSNO = new ErrorCode(1_000_025_001, "code已存在");
ErrorCode SUPPLIER_MOUBLE_EXISTSNO = new ErrorCode(1_000_025_002, "code已存在");
ErrorCode SUPPLIER_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_025_003, "是否可用不存在");
ErrorCode SUPPLIER_SHORTNAME_NOT_EXISTS = new ErrorCode(1_000_025_004, "简称不存在");
ErrorCode SUPPLIER_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_025_005, "导入供货商不能为空");
//供应商物品ErrorCode
ErrorCode SUPPLIERITEM_NOT_EXISTS = new ErrorCode(1_000_026_000, "供应商物品不存在");
ErrorCode SUPPLIERITEM_SUPPLIER_CODE_NOT_EXISTS = new ErrorCode(1_000_026_001, "供应商代码不存在");
ErrorCode SUPPLIERITEM_ITEM_CODE_NOT_EXISTS = new ErrorCode(1_000_026_002, "物料代码不存在");
ErrorCode SUPPLIERITEM_PACK_UNIT_NOT_EXISTS = new ErrorCode(1_000_026_003, "供应商包装单位不存在");
ErrorCode SUPPLIERITEM_PACK_QTY_NOT_EXISTS = new ErrorCode(1_000_026_004, "供应商包装数量不存在");
ErrorCode SUPPLIERITEM_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_026_005, "是否可用不存在");
ErrorCode SUPPLIERITEM_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_026_006, "导入供应商物品不能为空");
ErrorCode SUPPLIERITEM_ITEM_CODE_EXISTS = new ErrorCode(1_000_026_007, "物料代码已存在");
//采购价格单ErrorCode
ErrorCode PURCHASEPRICE_NOT_EXISTS = new ErrorCode(1_000_027_000, "采购价格单不存在");
ErrorCode PURCHASEPRICE_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_027_001, "导入采购价格单不能为空");
ErrorCode PURCHASEPRICE_ITEM_CODE_EXISTS = new ErrorCode(1_000_027_002, "物料代码已存在");
@ -25,12 +84,68 @@ public interface ErrorCodeConstants {
ErrorCode PURCHASEPRICE_CURRENCY_NOT_EXISTS = new ErrorCode(1_000_027_005, "货币不存在");
ErrorCode PURCHASEPRICE_PRICE_NOT_EXISTS = new ErrorCode(1_000_027_006, "价格不存在");
ErrorCode PURCHASEPRICE_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_027_007, "是否可用不存在");
//客户ErrorCode
ErrorCode CUSTOMER_NOT_EXISTS = new ErrorCode(1_000_028_000, "客户不存在");
ErrorCode CUSTOMER_CODE_EXISTS = new ErrorCode(1_000_028_001, "code已存在");
ErrorCode CUSTOMER_CODE_NOT_EXISTS = new ErrorCode(1_000_028_002, "code不存在");
ErrorCode CUSTOMER_SHORTNAME_NOT_EXISTS = new ErrorCode(1_000_028_003, "简称不存在");
ErrorCode CUSTOMER_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_028_004, "是否可用不存在");
ErrorCode CUSTOMER_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_028_005, "导入客户不能为空");
//客户月台ErrorCode
ErrorCode CUSTOMERDOCK_NOT_EXISTS = new ErrorCode(1_000_029_000, "客户月台不存在");
ErrorCode CUSTOMERDOCK_CODE_EXISTS = new ErrorCode(1_000_029_001, "code已存在");
ErrorCode CUSTOMERDOCK_CODE_NOT_EXISTS = new ErrorCode(1_000_029_002, "code不存在");
ErrorCode CUSTOMERDOCK_CUSTOMER_CODE_NOT_EXISTS = new ErrorCode(1_000_029_003, "客户代码不存在");
ErrorCode CUSTOMERDOCK_DEFAULT_LOCATION_CODE_NOT_EXISTS = new ErrorCode(1_000_029_004, "默认库位不存在");
ErrorCode CUSTOMERDOCK_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_029_005, "是否可用不存在");
ErrorCode CUSTOMERDOCK_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_029_006, "导入客户月台不能为空");
//客户物品ErrorCode
ErrorCode CUSTOMERITEM_NOT_EXISTS = new ErrorCode(1_000_030_000, "客户物品不存在");
ErrorCode CUSTOMERITEM_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_030_001, "是否可用不存在");
ErrorCode CUSTOMERITEM_ITEM_CODE_NOT_EXISTS = new ErrorCode(1_000_030_002, "物料代码不存在");
ErrorCode CUSTOMERITEM_ITEM_CODE_EXISTS = new ErrorCode(1_000_030_003, "物料代码已存在");
ErrorCode CUSTOMERITEM_CUSTOMER_CODE_NOT_EXISTS = new ErrorCode(1_000_030_004, "客户代码不存在");
ErrorCode CUSTOMERITEM_PACKUNIT_NOT_EXISTS = new ErrorCode(1_000_030_005, "客户包装单位不存在");
ErrorCode CUSTOMERITEM_PACKQTY_NOT_EXISTS = new ErrorCode(1_000_030_006, "客户包装量不存在");
ErrorCode CUSTOMERITEM_PACKQTY_OF_CONTAINER_NOT_EXISTS = new ErrorCode(1_000_030_007, "每器具包装数不存在");
ErrorCode CUSTOMERITEM_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_030_008, "导入客户物品不能为空");
//项目ErrorCode
ErrorCode PROJECT_NOT_EXISTS = new ErrorCode(1_000_031_000, "项目不存在");
ErrorCode PROJECT_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_031_001, "导入项目不能为空");
ErrorCode PROJECT_CODE_EXISTS = new ErrorCode(1_000_031_002, "code已存在");
ErrorCode PROJECT_CODE_NOT_EXISTS = new ErrorCode(1_000_031_003, "code不存在");
ErrorCode PROJECT_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_031_004, "是否可用不存在");
//销售价格单ErrorCode
ErrorCode SALEPRICE_NOT_EXISTS = new ErrorCode(1_000_032_000, "销售价格单不存在");
ErrorCode SALEPRICE_ITEM_CODE_NOT_EXISTS = new ErrorCode(1_000_032_001, "物料代码不存在");
ErrorCode SALEPRICE_ITEM_CODE_EXISTS = new ErrorCode(1_000_032_001, "物料代码已存在");
ErrorCode SALEPRICE_CURRENCY_NOT_EXISTS = new ErrorCode(1_000_032_002, "客户代码不存在");
ErrorCode SALEPRICE_PRICE_NOT_EXISTS = new ErrorCode(1_000_032_003, "价格不存在");
ErrorCode SALEPRICE_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_032_004, "是否可用不存在");
ErrorCode SALEPRICE_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_032_005, "导入销售价格单不能为空");
//仓库ErrorCode
ErrorCode WAREHOUSE_NOT_EXISTS = new ErrorCode(1_033_000_000, "仓库不存在");
ErrorCode WAREHOUSE_CODE_EXISTS = new ErrorCode(1_033_000_001, "code已存在");
ErrorCode WAREHOUSE_CODE_NOT_EXISTS = new ErrorCode(1_033_000_002, "code不存在");
ErrorCode WAREHOUSE_AVAIABLE_NOT_EXISTS = new ErrorCode(1_033_000_003, "是否可用不存在");
ErrorCode WAREHOUSE_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_033_000_004, "导入仓库不能为空");
//月台ErrorCode
ErrorCode DOCK_NOT_EXISTS = new ErrorCode(1_000_034_000, "月台不存在");
ErrorCode DOCK_CODE_NOT_EXISTS = new ErrorCode(1_000_034_001, "code不存在");
ErrorCode DOCK_CODE_EXISTS = new ErrorCode(1_000_034_002, "code已存在");
ErrorCode DOCK_TYPE_NOT_EXISTS = new ErrorCode(1_000_034_003, "类型不存在");
ErrorCode DOCK_WARE_HOUSE_CODE_NOT_EXISTS = new ErrorCode(1_000_034_004, "仓库代码不存在");
ErrorCode DOCK_DEFAULT_LOCATION_CODE_NOT_EXISTS = new ErrorCode(1_000_034_005, "默认库位代码不存在");
ErrorCode DOCK_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_034_006, "是否可用不存在");
ErrorCode DOCK_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_034_007, "导入月台不能为空");
//库区ErrorCode
ErrorCode AREABASIC_NOT_EXISTS = new ErrorCode(1_000_035_000, "库区不存在");
ErrorCode AREABASIC_CODE_EXISTS = new ErrorCode(1_000_035_001, "code已存在");
ErrorCode AREABASIC_CODE_NOT_EXISTS = new ErrorCode(1_000_035_002, "code不存在");
ErrorCode AREABASIC_WAREHOUSE_CODE_EXISTS = new ErrorCode(1_000_035_003, "仓库代码不存在");
ErrorCode AREABASIC_IS_FUNCTIONAL_EXISTS = new ErrorCode(1_000_035_004, "是否是功能区不存在");
ErrorCode AREABASIC_AVAIABLE_NOT_EXISTS = new ErrorCode(1_000_035_005, "是否可用不存在");
ErrorCode AREABASIC_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_035_006, "导入库区不能为空");
//库位组ErrorCode
ErrorCode LOCATIONGROUP_NOT_EXISTS = new ErrorCode(1_000_036_000, "库位组不存在");
ErrorCode LOCATIONGROUP_CODE_EXISTS = new ErrorCode(1_000_036_001, "code已存在");
@ -38,6 +153,7 @@ public interface ErrorCodeConstants {
ErrorCode LOCATIONGROUP_WARE_HOUSE_CODE_NOT_EXISTS = new ErrorCode(1_000_036_003, "仓库代码不存在");
ErrorCode LOCATIONGROUP_AREA_CODE_NOT_EXISTS = new ErrorCode(1_000_036_004, "区域代码不存在");
ErrorCode LOCATIONGROUP_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_036_005, "是否可用不存在");
ErrorCode LOCATIONGROUP_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_036_006, "导入库位组不能为空");
//库位ErrorCode
ErrorCode LOCATION_NOT_EXISTS = new ErrorCode(1_000_037_000, "库位不存在");
ErrorCode LOCATION_CODE_EXISTS = new ErrorCode(1_000_037_001, "code已存在");
@ -50,6 +166,13 @@ public interface ErrorCodeConstants {
ErrorCode LOCATION_PICK_PRIORITY_NOT_EXISTS = new ErrorCode(1_000_037_008, "拣料优先级不存在");
ErrorCode LOCATION_USER_GROUP_CODE_NOT_EXISTS = new ErrorCode(1_000_037_009, "用户组代码不存在");
ErrorCode LOCATION_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_037_010, "是否可用不存在");
ErrorCode LOCATION_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_037_011, "导入库位不能为空");
//车间ErrorCode
ErrorCode WORKSHOP_NOT_EXISTS = new ErrorCode(1_038_000_000, "车间不存在");
ErrorCode WORKSHOP_CODE_EXISTS = new ErrorCode(1_039_000_001, "code已存在");
ErrorCode WORKSHOP_CODE_NOT_EXISTS = new ErrorCode(1_039_000_002, "code已存在");
ErrorCode WORKSHOP_AVAIABLE_NOT_EXISTS = new ErrorCode(1_040_000_003, "是否可用不存在");
ErrorCode WORKSHOP_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_040_000_004, "导入车间不能为空");
//生产线ErrorCode
ErrorCode PRODUCTIONLINE_NOT_EXISTS = new ErrorCode(1_000_039_000, "生产线不存在");
ErrorCode PRODUCTIONLINE_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_039_001, "导入生产线数据不能为空");
@ -58,6 +181,14 @@ public interface ErrorCodeConstants {
ErrorCode PRODUCTIONLINE_WORKSHOP_CODE_NOT_EXISTS = new ErrorCode(1_000_039_004, "车间代码不存在");
ErrorCode PRODUCTIONLINE_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_039_005, "是否可用不存在");
//工序ErrorCode
ErrorCode WORKSTATION_NOT_EXISTS = new ErrorCode(1_000_040_000, "工位不存在");
ErrorCode WORKSTATION_CODE_NOT_EXISTS = new ErrorCode(1_000_040_001, "code不存在");
ErrorCode WORKSTATION_CODE_EXISTS = new ErrorCode(1_000_040_002, "code已存在");
ErrorCode WORKSTATION_AVAIABLE_NOT_EXISTS = new ErrorCode(1_000_040_003, "是否可用不存在");
ErrorCode WORKSTATION_WORKSHOP_CODE_NOT_EXISTS = new ErrorCode(1_000_040_004, "车间代码不存在");
ErrorCode WORKSTATION_PRODUECTION_LINE_CODE_NOT_EXISTS = new ErrorCode(1_000_040_005, "生产线代码不存在");
ErrorCode WORKSTATION_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_040_006, "导入工序不能为空");
//工序ErrorCode
ErrorCode PROCESS_NOT_EXISTS = new ErrorCode(1_000_041_000, "工序不存在");
ErrorCode PROCESS_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_041_001, "导入工序数据不能为空");
ErrorCode PROCESS_CODE_EXISTS = new ErrorCode(1_000_041_002, "code已存在");
@ -65,7 +196,29 @@ public interface ErrorCodeConstants {
ErrorCode PROCESS_WORKSHOP_CODE_NOT_EXISTS = new ErrorCode(1_000_041_004, "车间代码不存在");
ErrorCode PROCESS_PRODUCTION_LINE_CODE_NOT_EXISTS = new ErrorCode(1_000_041_005, "生产线代码不存在");
ErrorCode PROCESS_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_041_006, "是否可用不存在");
ErrorCode RULE_NOT_EXISTS = new ErrorCode(1_045_000_000, "规则不存在");
//系统日历ErrorCode
ErrorCode SYSTEMCALENDAR_NOT_EXISTS = new ErrorCode(1_042_000_000, "系统日历不存在");
ErrorCode SYSTEMCALENDAR_MOUBLE_NOT_EXISTS = new ErrorCode(1_000_042_001, "code已存在");
ErrorCode SYSTEMCALENDAR_AVAIABLE_NOT_EXISTS = new ErrorCode(1_042_000_002, "是否可用不存在");
ErrorCode SYSTEMCALENDAR_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_042_000_003, "导入系统日历不能为空");
//账期日历ErrorCode
ErrorCode ACCOUNTCALENDAR_NOT_EXISTS = new ErrorCode(1_000_043_000, "账期日历不存在");
ErrorCode ACCOUNTCALENDAR_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_043_001, "导入账期日历不能为空");
ErrorCode ACCOUNTCALENDAR_AVAIABLE_NOT_EXISTS = new ErrorCode(1_000_043_002, "是否可用不存在");
//货币转换ErrorCode
ErrorCode CURRENCYEXCHANGE_NOT_EXISTS = new ErrorCode(1_000_044_000, "货币转换不存在");
ErrorCode CURRENCYEXCHANGE_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_044_001, "导入货币转换不能为空");
ErrorCode CURRENCYEXCHANGE_BASICCURRENCY_NOT_EXISTS = new ErrorCode(1_000_044_002, "基础货币转换不存在");
ErrorCode CURRENCYEXCHANGE_RATE_NOT_EXISTS = new ErrorCode(1_000_044_003, "比率不存在");
ErrorCode CURRENCYEXCHANGE_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_044_004, "是否可用不存在");
ErrorCode CURRENCYEXCHANGE_CURRENCY_NOT_EXISTS = new ErrorCode(1_000_044_005, "货币不存在");
//规则ErrorCode
ErrorCode RULE_NOT_EXISTS = new ErrorCode(1_000_045_000, "规则不存在");
ErrorCode RULE_CODE_EXISTS = new ErrorCode(1_000_045_001, "code已存在");
ErrorCode RULE_CODE_NOT_EXISTS = new ErrorCode(1_000_045_001, "code不存在");
ErrorCode RULE_STRATEGYCODE_NOT_EXISTS = new ErrorCode(1_000_045_001, "策略规则不存在");
ErrorCode RULE_PRIORITY_NOT_EXISTS = new ErrorCode(1_000_045_001, "策略规则不存在");
ErrorCode RULE_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_045_001, "导入规则不能为空");
//条件ErrorCode
ErrorCode CONDITION_NOT_EXISTS = new ErrorCode(1_046_000_000, "条件不存在");
ErrorCode CONDITION_STRATEG_CODE_NOT_EXISTS = new ErrorCode(1_046_000_001, "策略代码不存在");
@ -77,8 +230,8 @@ public interface ErrorCodeConstants {
ErrorCode CONFIGURATION_NOT_EXISTS = new ErrorCode(1_047_000_000, "配置不存在");
ErrorCode CONFIGURATION_STRATEG_CODE_NOT_EXISTS = new ErrorCode(1_047_000_001, "策略代码不存在");
ErrorCode CONFIGURATION_RULE_CODE_NOT_EXISTS = new ErrorCode(1_047_000_002, "规则代码不存在");
ErrorCode CONFIGURATION_CONFIGURATION_CODE_NOT_EXISTS = new ErrorCode(1_047_000_002, "规则代码不存在");
ErrorCode CONFIGURATION_CONFIGURATION_VALUE_NOT_EXISTS = new ErrorCode(1_047_000_002, "规则代码不存在");
ErrorCode CONFIGURATION_CONFIGURATION_CODE_NOT_EXISTS = new ErrorCode(1_047_000_003, "规则代码不存在");
ErrorCode CONFIGURATION_CONFIGURATION_VALUE_NOT_EXISTS = new ErrorCode(1_047_000_004, "规则代码不存在");
//配置设置ErrorCode
ErrorCode CONFIGURATIONSETTING_NOT_EXISTS = new ErrorCode(1_048_000_000, "配置设置不存在");
ErrorCode CONFIGURATIONSETTING_STRATEG_CODE_NOT_EXISTS = new ErrorCode(1_048_000_001, "策略代码不存在");
@ -87,34 +240,40 @@ public interface ErrorCodeConstants {
ErrorCode CONFIGURATIONSETTING_IS_REQUIRED_NOT_EXISTS = new ErrorCode(1_048_000_004, "是否必填不存在");
ErrorCode CONFIGURATIONSETTING_DATA_TYPE_NOT_EXISTS = new ErrorCode(1_048_000_005, "数据类型不存在");
ErrorCode CONFIGURATIONSETTING_VALUE_SCOPE_NOT_EXISTS = new ErrorCode(1_048_000_006, "值范围不存在");
//参数设置ErrorCode
ErrorCode PARAMSETTING_NOT_EXISTS = new ErrorCode(1_000_048_000, "参数设置不存在");
ErrorCode PARAMSETTING_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_048_001, "导入参数设置不能为空!");
ErrorCode PARAMSETTING_STRATEGY_TYPE_NOT_EXISTS = new ErrorCode(1_000_048_002, "策略代码不存在");
ErrorCode PARAMSETTING_PARAM_CODE_NOT_EXISTS = new ErrorCode(1_000_048_003, "参数代码不存在");
ErrorCode PARAMSETTING_USABLE_OPEARTORS_NOT_EXISTS = new ErrorCode(1_000_048_004, "可用操作符不存在");
ErrorCode PARAMSETTING_IS_REQUIRED_NOT_EXISTS = new ErrorCode(1_000_048_005, "必填不存在");
ErrorCode PARAMSETTING_DATA_TYPE_NOT_EXISTS = new ErrorCode(1_000_048_006, "数据类型不存在");
ErrorCode PARAMSETTING_VALUE_SCOPE_NOT_EXISTS = new ErrorCode(1_000_048_007, "值范围不存在");
// 事务类型ErrorCode
ErrorCode TRANSACTIONTYPE_NOT_EXISTS = new ErrorCode(1_049_000_000, "事务类型不存在");
ErrorCode TRANSACTIONTYPE_CODE_EXISTS = new ErrorCode(1_049_000_001, "code已存在");
ErrorCode TRANSACTIONTYPE_CODE_NOT_EXISTS = new ErrorCode(1_049_000_002, "code不存在");
ErrorCode TRANSACTIONTYPE_AVAIABLE_NOT_EXISTS = new ErrorCode(1_049_000_003, "是否可用不存在");
ErrorCode TRANSACTIONTYPE_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_049_000_004, "导入事务类型不能为空");
//业务类型ErrorCode
ErrorCode BUSINESSTYPE_NOT_EXISTS = new ErrorCode(1_050_000_000, "业务类型不存在");
ErrorCode BUSINESSTYPE_CODE_NOT_EXISTS = new ErrorCode(1_050_000_001, "code不存在");
ErrorCode BUSINESSTYPE_CODE_EXISTS = new ErrorCode(1_050_000_002, "code已存在");
ErrorCode BUSINESSTYPE_NAME_NOT_EXISTS = new ErrorCode(1_050_000_003, "名称不存在");
ErrorCode BUSINESSTYPE_ITEM_TYPES_NOT_EXISTS = new ErrorCode(1_050_000_004, "可用物品类型范围不存在");
ErrorCode BUSINESSTYPE_ITEM_STATUSES_ITEM_CODE_NOT_EXISTS = new ErrorCode(1_050_000_005, "可用物品状态范围不存在");
ErrorCode BUSINESSTYPE_OUT_TRANSACTION_TYPE_NOT_EXISTS = new ErrorCode(1_050_000_006, "出库事务类型不存在");
ErrorCode BUSINESSTYPE_IN_TRANSACTION_TYPE_NOT_EXISTS = new ErrorCode(1_050_000_007, "入库事务类型不存在");
ErrorCode BUSINESSTYPE_USE_ON_THE_WAY__NOT_EXISTS = new ErrorCode(1_050_000_007, "是否使用在途库不存在");
ErrorCode BUSINESSTYPE_AVAILABLE_NOT_EXISTS = new ErrorCode(1_050_000_007, "是否可用不存在");
ErrorCode BUSINESSTYPE_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_050_000_008, "导入业务类型不能为空");
// 单据设置ErrorCode
ErrorCode DOCUMENTSETTING_NOT_EXISTS = new ErrorCode(1_000_051_000, "单据设置不存在");
ErrorCode DOCUMENTSETTING_CODE_EXISTS = new ErrorCode(1_000_051_000, "code已存在");
ErrorCode DOCUMENTSETTING_CODE_NOT_EXISTS = new ErrorCode(1_000_051_000, "code不存在");
ErrorCode DOCUMENTSETTING_NAME_NOT_EXISTS = new ErrorCode(1_000_051_001, "名称不存在");
ErrorCode DOCUMENTSETTING_DESCRIPTION_NOT_EXISTS = new ErrorCode(1_000_051_002, "描述不存在");
ErrorCode DOCUMENTSETTING_TYPE_NOT_EXISTS = new ErrorCode(1_000_051_003, "单据类型不存在");
ErrorCode DOCUMENTSETTING_BUSINESS_TYPE_NOT_EXISTS = new ErrorCode(1_000_051_004, "业务类型不存在");
ErrorCode DOCUMENTSETTING_NUMBER_PREFIX_NOT_EXISTS = new ErrorCode(1_000_051_005, "号码前缀不存在");
ErrorCode DOCUMENTSETTING_DATE_FORMAT_NOT_EXISTS = new ErrorCode(1_000_051_006, "号码时间格式不存在");
ErrorCode DOCUMENTSETTING_SERIAL_LENGTH_NOT_EXISTS = new ErrorCode(1_000_051_007, "号码流水长度不存在");
ErrorCode DOCUMENTSETTING_RESET_PERIOD_NOT_EXISTS = new ErrorCode(1_000_051_008, "流水充值周期不存在");
ErrorCode DOCUMENTSETTING_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_051_009, "是否可用不存在");
ErrorCode DOCUMENTSETTING_CODE_EXISTS = new ErrorCode(1_000_051_001, "code已存在");
ErrorCode DOCUMENTSETTING_CODE_NOT_EXISTS = new ErrorCode(1_000_051_002, "code不存在");
ErrorCode DOCUMENTSETTING_NAME_NOT_EXISTS = new ErrorCode(1_000_051_003, "名称不存在");
ErrorCode DOCUMENTSETTING_DESCRIPTION_NOT_EXISTS = new ErrorCode(1_000_051_004, "描述不存在");
ErrorCode DOCUMENTSETTING_TYPE_NOT_EXISTS = new ErrorCode(1_000_051_005, "单据类型不存在");
ErrorCode DOCUMENTSETTING_BUSINESS_TYPE_NOT_EXISTS = new ErrorCode(1_000_051_006, "业务类型不存在");
ErrorCode DOCUMENTSETTING_NUMBER_PREFIX_NOT_EXISTS = new ErrorCode(1_000_051_007, "号码前缀不存在");
ErrorCode DOCUMENTSETTING_DATE_FORMAT_NOT_EXISTS = new ErrorCode(1_000_051_008, "号码时间格式不存在");
ErrorCode DOCUMENTSETTING_SERIAL_LENGTH_NOT_EXISTS = new ErrorCode(1_000_051_009, "号码流水长度不存在");
ErrorCode DOCUMENTSETTING_RESET_PERIOD_NOT_EXISTS = new ErrorCode(1_000_051_010, "流水充值周期不存在");
ErrorCode DOCUMENTSETTING_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_051_011, "是否可用不存在");
//申请设置ErrorCode
ErrorCode REQUESTSETTING_NOT_EXISTS = new ErrorCode(1_000_052_000, "申请设置不存在");
ErrorCode REQUESTSETTING_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_052_001, "导入申请设置不存在");
ErrorCode REQUESTSETTING_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_052_001, "导入申请设置不能为空");
ErrorCode REQUESTSETTING_CODE_EXISTS = new ErrorCode(1_000_052_002, "code已存在");
ErrorCode REQUESTSETTING_CODE_NOT_EXISTS = new ErrorCode(1_000_052_003, "code不存在");
ErrorCode REQUESTSETTING_REQUEST_MODE_NOT_EXISTS = new ErrorCode(1_000_052_004, "申请模式不存在");
@ -125,20 +284,20 @@ public interface ErrorCodeConstants {
ErrorCode REQUESTSETTING_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_052_009, "是否可用不存在");
//任务设置ErrorCode
ErrorCode JOBSETTING_NOT_EXISTS = new ErrorCode(1_000_053_000, "任务设置不存在");
ErrorCode JOBSETTING_CODE_NOT_EXISTS = new ErrorCode(1_000_053_000, "code不存在");
ErrorCode JOBSETTING_CODE_EXISTS = new ErrorCode(1_000_053_000, "code已存在");
ErrorCode JOBSETTING_AUTOCOMPLETE_NOT_EXISTS = new ErrorCode(1_000_053_000, "自动完成不存在");
ErrorCode JOBSETTING_VALIDMINUTES_NOT_EXISTS = new ErrorCode(1_000_053_000, "有效分钟不存在");
ErrorCode JOBSETTING_ALLOW_MODIFY_LACATION_NOT_EXISTS = new ErrorCode(1_000_053_000, "允许修改库位不存在");
ErrorCode JOBSETTING_ALLOW_MODIFY_QTY_NOT_EXISTS = new ErrorCode(1_000_053_000, "允许修改数量不存在");
ErrorCode JOBSETTING_ALLOW_BIGGER_QTY_NOT_EXISTS = new ErrorCode(1_000_053_000, "允许大于推荐数量不存在");
ErrorCode JOBSETTING_ALLOW_SMALL_QTY_NOT_EXISTS = new ErrorCode(1_000_053_000, "允许小于推荐数量不存在");
ErrorCode JOBSETTING_ALLOW_MODIFY_INVENTORY_STATUS_NOT_EXISTS = new ErrorCode(1_000_053_000, "允许修改库存状态不存在");
ErrorCode JOBSETTING_ALLOW_CONTINUOUS_SCANNING_NOT_EXISTS = new ErrorCode(1_000_053_000, "允许连续扫描不存在");
ErrorCode JOBSETTING_ALLOW_PARTIAL_COMPLETE_NOT_EXISTS = new ErrorCode(1_000_053_000, "允许部分完成不存在");
ErrorCode JOBSETTING_ALLOW_MODIFY_BACH_NOT_EXISTS = new ErrorCode(1_000_053_000, "允许修改批次不存在");
ErrorCode JOBSETTING_ALLOW_MODIFY_PACKING_NUMBER_NOT_EXISTS = new ErrorCode(1_000_053_000, "允许修改包装号不存在");
ErrorCode JOBSETTING_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_053_000, "是否可用不存在");
ErrorCode JOBSETTING_CODE_NOT_EXISTS = new ErrorCode(1_000_053_001, "code不存在");
ErrorCode JOBSETTING_CODE_EXISTS = new ErrorCode(1_000_053_002, "code已存在");
ErrorCode JOBSETTING_AUTOCOMPLETE_NOT_EXISTS = new ErrorCode(1_000_053_003, "自动完成不存在");
ErrorCode JOBSETTING_VALIDMINUTES_NOT_EXISTS = new ErrorCode(1_000_053_004, "有效分钟不存在");
ErrorCode JOBSETTING_ALLOW_MODIFY_LACATION_NOT_EXISTS = new ErrorCode(1_000_053_005, "允许修改库位不存在");
ErrorCode JOBSETTING_ALLOW_MODIFY_QTY_NOT_EXISTS = new ErrorCode(1_000_053_006, "允许修改数量不存在");
ErrorCode JOBSETTING_ALLOW_BIGGER_QTY_NOT_EXISTS = new ErrorCode(1_000_053_007, "允许大于推荐数量不存在");
ErrorCode JOBSETTING_ALLOW_SMALL_QTY_NOT_EXISTS = new ErrorCode(1_000_053_008, "允许小于推荐数量不存在");
ErrorCode JOBSETTING_ALLOW_MODIFY_INVENTORY_STATUS_NOT_EXISTS = new ErrorCode(1_000_053_009, "允许修改库存状态不存在");
ErrorCode JOBSETTING_ALLOW_CONTINUOUS_SCANNING_NOT_EXISTS = new ErrorCode(1_000_053_010, "允许连续扫描不存在");
ErrorCode JOBSETTING_ALLOW_PARTIAL_COMPLETE_NOT_EXISTS = new ErrorCode(1_000_053_011, "允许部分完成不存在");
ErrorCode JOBSETTING_ALLOW_MODIFY_BACH_NOT_EXISTS = new ErrorCode(1_000_053_012, "允许修改批次不存在");
ErrorCode JOBSETTING_ALLOW_MODIFY_PACKING_NUMBER_NOT_EXISTS = new ErrorCode(1_000_053_013, "允许修改包装号不存在");
ErrorCode JOBSETTING_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_053_014, "是否可用不存在");
//记录设置ErrorCode
ErrorCode RECORDSETTING_NOT_EXISTS = new ErrorCode(1_054_000_000, "记录设置不存在");
ErrorCode RECORDSETTING_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_054_000_001, "导入记录设置不能为空");
@ -152,15 +311,34 @@ public interface ErrorCodeConstants {
ErrorCode OWNER_CODE_NOT_EXISTS = new ErrorCode(1_000_055_002, "code不存在");
ErrorCode OWNER_SHORTNAME_NOT_EXISTS = new ErrorCode(1_000_055_003, "简称不存在");
ErrorCode OWNER_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_055_004, "是否可用不存在");
ErrorCode OWNER_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_055_005, "导入货主不能为空");
//承运商ErrorCode
ErrorCode CARRIER_NOT_EXISTS = new ErrorCode(1_000_056_000, "承运商不存在");
ErrorCode CARRIER_CODE_NOT_EXISTS = new ErrorCode(1_000_056_001, "code不存在");
ErrorCode CARRIER_CODE_EXISTS = new ErrorCode(1_000_056_002, "code已存在");
ErrorCode CARRIER_SHORTNAME_NOT_EXISTS = new ErrorCode(1_000_056_003, "名称不存在");
ErrorCode CARRIER_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_056_007, "是否可用不存在");
ErrorCode CARRIER_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_056_008, "导入承运商不能为空");
//班次ErrorCode
ErrorCode SHIFT_NOT_EXISTS = new ErrorCode(1_057_000_000, "班次不存在");
ErrorCode SHIFT_NOT_EXISTS = new ErrorCode(1_000_057_000, "班次不存在");
ErrorCode SHIFT_BEGIN_TIME_NOT_EXISTS = new ErrorCode(1_000_057_001, "开始时间不存在");
ErrorCode SHIFT_END_TIME_NOT_EXISTS = new ErrorCode(1_000_057_002, "结束时间不存在");
ErrorCode SHIFT_AVAIABLE_NOT_EXISTS = new ErrorCode(1_000_057_003, "是否可用不存在");
ErrorCode SHIFT_ENDATNEXTDAY_NOT_EXISTS = new ErrorCode(1_000_057_004, "是否跨天不存在");
ErrorCode SHIFT_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_057_005, "导入班次不能为空");
ErrorCode SHIFT_CODE_EMPTY = new ErrorCode(1_000_057_006, "code已存在");
ErrorCode SHIFT_CODE_NOT_EMPTY = new ErrorCode(1_000_057_007, "code不存在");
//班组ErrorCode
ErrorCode TEAM_NOT_EXISTS = new ErrorCode(1_058_000_000, "班组不存在");
ErrorCode TEAM_NOT_EXISTS = new ErrorCode(1_000_058_000, "班组不存在");
ErrorCode TEAM_CODE_EXISTS = new ErrorCode(1_000_058_001, "code已存在");
ErrorCode TEAM_CODE_NOT_EXISTS = new ErrorCode(1_000_058_001, "code不存在");
ErrorCode TEAM_AVAIABLE_NOT_EXISTS = new ErrorCode(1_000_058_002, "是否可用不存在");
ErrorCode TEAM_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_058_004, "导入班组不能为空");
//标签定义ErrorCode
ErrorCode LABLE_TYPE_NOT_EXISTS = new ErrorCode(1_000_059_000, "标签定义不存在");
//条码片段ErrorCode
ErrorCode BARCODE_NOT_EXISTS = new ErrorCode(1_000_060_000, "条码片段不存在");
ErrorCode BARCODE_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_060_001, "导入条码片段不存在");
ErrorCode BARCODE_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_060_001, "导入条码片段不能为空");
ErrorCode BARCODE_CODE_EXISTS = new ErrorCode(1_000_060_002, "code已存在");
ErrorCode BARCODE_CODE_NOT_EXISTS = new ErrorCode(1_000_060_003, "code不存在");
ErrorCode BARCODE_ORDER_NOT_EXISTS = new ErrorCode(1_000_060_004, "顺序不存在");
@ -171,5 +349,13 @@ public interface ErrorCodeConstants {
ErrorCode BARCODE_IS_ENCYPT_NOT_EXISTS = new ErrorCode(1_000_060_009, "是否加密不存在");
//策略ErrorCode
ErrorCode STRATEGY_NOT_EXISTS = new ErrorCode(1_000_061_000, "策略不存在");
//参数设置ErrorCode
ErrorCode PARAMSETTING_NOT_EXISTS = new ErrorCode(1_000_062_000, "参数设置不存在");
ErrorCode PARAMSETTING_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_000_062_001, "导入参数设置不能为空!");
ErrorCode PARAMSETTING_STRATEGY_TYPE_NOT_EXISTS = new ErrorCode(1_000_062_002, "策略代码不存在");
ErrorCode PARAMSETTING_PARAM_CODE_NOT_EXISTS = new ErrorCode(1_000_062_003, "参数代码不存在");
ErrorCode PARAMSETTING_USABLE_OPEARTORS_NOT_EXISTS = new ErrorCode(1_000_062_004, "可用操作符不存在");
ErrorCode PARAMSETTING_IS_REQUIRED_NOT_EXISTS = new ErrorCode(1_000_062_005, "必填不存在");
ErrorCode PARAMSETTING_DATA_TYPE_NOT_EXISTS = new ErrorCode(1_000_062_006, "数据类型不存在");
ErrorCode PARAMSETTING_VALUE_SCOPE_NOT_EXISTS = new ErrorCode(1_000_062_007, "值范围不存在");
}

14
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/accountcalendar/ErrorCodeConstants.java

@ -1,14 +0,0 @@
package com.win.module.wms.enums.accountcalendar;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode ACCOUNTCALENDAR_NOT_EXISTS = new ErrorCode(1_043_000_000, "账期日历不存在");
ErrorCode AVAIABLE_NOT_EXISTS = new ErrorCode(1_043_000_001, "是否可用不存在");
}

17
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/areabasic/ErrorCodeConstants.java

@ -1,17 +0,0 @@
package com.win.module.wms.enums.areabasic;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode AREABASIC_NOT_EXISTS = new ErrorCode(1_035_000_000, "库区不存在");
ErrorCode CODE_EXISTS = new ErrorCode(1_035_000_001, "code已存在");
ErrorCode WAREHOUSE_CODE_EXISTS = new ErrorCode(1_035_000_002, "仓库代码不存在");
ErrorCode IS_FUNCTIONAL_EXISTS = new ErrorCode(1_035_000_003, "是否是功能区不存在");
ErrorCode AVAIABLE_NOT_EXISTS = new ErrorCode(1_035_000_004, "是否可用不存在");
}

22
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/bom/ErrorCodeConstants.java

@ -1,22 +0,0 @@
package com.win.module.wms.enums.bom;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode BOM_NOT_EXISTS = new ErrorCode(1_022_000_000, "物料清单不存在");
ErrorCode PRODUCT_ITEMCODE_NOT_EXISTS = new ErrorCode(1_022_000_001, "父物料代码不存在");
ErrorCode PRODUCT_ITEMCODE_EXISTS = new ErrorCode(1_022_000_002, "父物料代码已存在");
ErrorCode COMPONENT_UOM_NOT_EXISTS = new ErrorCode(1_022_000_003, "子物料计量单位不存在");
ErrorCode AVAIABLE_NOT_EXISTS = new ErrorCode(1_022_000_004, "是否可用不存在");
ErrorCode COMPONENT_ITEM_CODE_NOT_EXISTS = new ErrorCode(1_022_000_005, "子物料代码不存在");
ErrorCode COMPONENT_QTY_EXISTS = new ErrorCode(1_022_000_006, "子物料数量不存在");
ErrorCode PROCESS_CODE_NOT_EXISTS = new ErrorCode(1_022_000_007, "工序代码不存在");
}

24
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/businesstype/ErrorCodeConstants.java

@ -1,24 +0,0 @@
package com.win.module.wms.enums.businesstype;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode BUSINESSTYPE_NOT_EXISTS = new ErrorCode(1_050_000_000, "业务类型不存在");
ErrorCode CODE_NOT_EXISTS = new ErrorCode(1_050_000_001, "code不存在");
ErrorCode CODE_EXISTS = new ErrorCode(1_050_000_002, "code已存在");
ErrorCode NAME_NOT_EXISTS = new ErrorCode(1_050_000_003, "名称不存在");
ErrorCode ITEM_TYPES_NOT_EXISTS = new ErrorCode(1_050_000_004, "可用物品类型范围不存在");
ErrorCode ITEM_STATUSES_ITEM_CODE_NOT_EXISTS = new ErrorCode(1_050_000_005, "可用物品状态范围不存在");
ErrorCode OUT_TRANSACTION_TYPE_NOT_EXISTS = new ErrorCode(1_050_000_006, "出库事务类型不存在");
ErrorCode IN_TRANSACTION_TYPE_NOT_EXISTS = new ErrorCode(1_050_000_007, "入库事务类型不存在");
ErrorCode USE_ON_THE_WAY__NOT_EXISTS = new ErrorCode(1_050_000_007, "是否使用在途库不存在");
ErrorCode AVAILABLE_NOT_EXISTS = new ErrorCode(1_050_000_007, "是否可用不存在");
}

19
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/carrier/ErrorCodeConstants.java

@ -1,19 +0,0 @@
package com.win.module.wms.enums.carrier;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode CARRIER_NOT_EXISTS = new ErrorCode(1_056_000_000, "承运商不存在");
ErrorCode CODE_NOT_EXISTS = new ErrorCode(1_056_000_001, "code不存在");
ErrorCode CODE_EXISTS = new ErrorCode(1_056_000_002, "code已存在");
ErrorCode SHORTNAME_NOT_EXISTS = new ErrorCode(1_056_000_003, "名称不存在");
ErrorCode AVAILABLE_NOT_EXISTS = new ErrorCode(1_056_000_007, "是否可用不存在");
}

18
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/currencyexchange/ErrorCodeConstants.java

@ -1,18 +0,0 @@
package com.win.module.wms.enums.currencyexchange;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode CURRENCYEXCHANGE_NOT_EXISTS = new ErrorCode(1_044_000_000, "货币转换不存在");
ErrorCode CURRENCYEXCHANGE_CURRENCY_NOT_EXISTS = new ErrorCode(1_044_000_001, "货币不存在");
ErrorCode CURRENCYEXCHANGE_BASICCURRENCY_NOT_EXISTS = new ErrorCode(1_044_000_002, "基础货币转换不存在");
ErrorCode CURRENCYEXCHANGE_RATE_NOT_EXISTS = new ErrorCode(1_044_000_003, "比率不存在");
ErrorCode CURRENCYEXCHANGE_AVAILABLE_NOT_EXISTS = new ErrorCode(1_044_000_004, "是否可用不存在");
}

18
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/customer/ErrorCodeConstants.java

@ -1,18 +0,0 @@
package com.win.module.wms.enums.customer;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode CUSTOMER_NOT_EXISTS = new ErrorCode(1_028_000_000, "客户不存在");
ErrorCode CUSTOMER_CODE_EXISTS = new ErrorCode(1_028_000_001, "code已存在");
ErrorCode CUSTOMER_CODE_NOT_EXISTS = new ErrorCode(1_028_000_002, "code不存在");
ErrorCode CUSTOMER_SHORTNAME_NOT_EXISTS = new ErrorCode(1_028_000_003, "简称不存在");
ErrorCode CUSTOMER_AVAILABLE_NOT_EXISTS = new ErrorCode(1_028_000_004, "是否可用不存在");
}

20
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/customerdock/ErrorCodeConstants.java

@ -1,20 +0,0 @@
package com.win.module.wms.enums.customerdock;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode CUSTOMERDOCK_NOT_EXISTS = new ErrorCode(1_029_000_000, "客户月台不存在");
ErrorCode CUSTOMERDOCK_CODE_EXISTS = new ErrorCode(1_029_000_001, "code已存在");
ErrorCode CUSTOMERDOCK_CODE_NOT_EXISTS = new ErrorCode(1_029_000_002, "code不存在");
ErrorCode CUSTOMERDOCK_CUSTOMER_CODE_NOT_EXISTS = new ErrorCode(1_029_000_003, "客户代码不存在");
ErrorCode CUSTOMERDOCK_DEFAULT_LOCATION_CODE_NOT_EXISTS = new ErrorCode(1_029_000_004, "默认库位不存在");
ErrorCode CUSTOMERDOCK_AVAILABLE_NOT_EXISTS = new ErrorCode(1_029_000_005, "是否可用不存在");
}

23
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/customeritem/ErrorCodeConstants.java

@ -1,23 +0,0 @@
package com.win.module.wms.enums.customeritem;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode CUSTOMERITEM_NOT_EXISTS = new ErrorCode(1_000_030_000, "客户物品不存在");
ErrorCode CUSTOMERITEM_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_030_001, "是否可用不存在");
ErrorCode CUSTOMERITEM_ITEM_CODE_NOT_EXISTS = new ErrorCode(1_000_030_002, "物料代码不存在");
ErrorCode CUSTOMERITEM_ITEM_CODE_EXISTS = new ErrorCode(1_000_030_003, "物料代码已存在");
ErrorCode CUSTOMERITEM_CUSTOMER_CODE_NOT_EXISTS = new ErrorCode(1_000_030_004, "客户代码不存在");
ErrorCode CUSTOMERITEM_PACKUNIT_NOT_EXISTS = new ErrorCode(1_000_030_005, "客户包装单位不存在");
ErrorCode CUSTOMERITEM_PACKQTY_NOT_EXISTS = new ErrorCode(1_000_030_006, "客户包装量不存在");
ErrorCode CUSTOMERITEM_PACKQTY_OF_CONTAINER_NOT_EXISTS = new ErrorCode(1_000_030_007, "每器具包装数不存在");
}

20
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/dock/ErrorCodeConstants.java

@ -1,20 +0,0 @@
package com.win.module.wms.enums.dock;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode DOCK_NOT_EXISTS = new ErrorCode(1_000_034_000, "月台不存在");
ErrorCode DOCK_CODE_NOT_EXISTS = new ErrorCode(1_000_034_001, "code不存在");
ErrorCode DOCK_CODE_EXISTS = new ErrorCode(1_000_034_002, "code已存在");
ErrorCode DOCK_TYPE_NOT_EXISTS = new ErrorCode(1_000_034_003, "类型不存在");
ErrorCode DOCK_WARE_HOUSE_CODE_NOT_EXISTS = new ErrorCode(1_000_034_004, "仓库代码不存在");
ErrorCode DOCK_DEFAULT_LOCATION_CODE_NOT_EXISTS = new ErrorCode(1_000_034_005, "默认库位代码不存在");
ErrorCode DOCK_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_034_006, "是否可用不存在");
}

28
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/itembasic/ErrorCodeConstants.java

@ -1,28 +0,0 @@
package com.win.module.wms.enums.itembasic;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode ITEMBASIC_NOT_EXISTS = new ErrorCode(1_020_000_000, "物品基本信息不存在");
ErrorCode CODE_NOT_EXISTS = new ErrorCode(1_020_000_001, "物品基本信息不正确");
ErrorCode CODE_EXISTS = new ErrorCode(1_020_000_002, "code已存在");
ErrorCode STATUS_NOT_EXISTS = new ErrorCode(1_020_000_003, "状态不存在");
ErrorCode UOM_NOT_EXISTS = new ErrorCode(1_020_000_004, "计量单位不存在");
ErrorCode IS_STDPACK_NOT_EXISTS = new ErrorCode(1_020_000_005, "是否标包不存在");
ErrorCode ENABLE_BUY_NOT_EXISTS = new ErrorCode(1_020_000_006, "可采购不存在");
ErrorCode ENABLE_MAKE_NOT_EXISTS = new ErrorCode(1_020_000_007, "可制造不存在");
ErrorCode ENABLE_OUTSOURING_NOT_EXISTS = new ErrorCode(1_020_000_008, "可委外加工不存在");
ErrorCode IS_RECYCLED_NOT_EXISTS = new ErrorCode(1_020_000_009, "回收件不存在");
ErrorCode IS_PHANTOM_NOT_EXISTS = new ErrorCode(1_020_000_010, "虚零件不存在");
ErrorCode ABC_CLASS_NOT_EXISTS = new ErrorCode(1_020_000_011, "ABC类不存在");
ErrorCode TYPE_NOT_EXISTS = new ErrorCode(1_020_000_012, "类型不存在");
ErrorCode VALIDITY_DAYS_NOT_EXISTS = new ErrorCode(1_020_000_013, "有效天数不存在");
ErrorCode AVAIABLE_NOT_EXISTS = new ErrorCode(1_020_000_014, "是否可用不存在");
}

20
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/itempackaging/ErrorCodeConstants.java

@ -1,20 +0,0 @@
package com.win.module.wms.enums.itempackaging;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode ITEMPACKAGING_NOT_EXISTS = new ErrorCode(1_000_021_000, "物品包装信息 不存在");
ErrorCode ITEMPACKAGING_ITEM_CODE_NOT_EXISTS = new ErrorCode(1_000_021_000, "code不存在");
ErrorCode ITEMPACKAGING_ITEM_CODE_EXISTS = new ErrorCode(1_000_021_000, "code已存在");
ErrorCode ITEMPACKAGING_UOM_NOT_EXISTS = new ErrorCode(1_000_021_000, "物品包装信息不存在");
ErrorCode ITEMPACKAGING_STD_PACK_UNIT_NOT_EXISTS = new ErrorCode(1_000_021_000, "包装单位不存在");
ErrorCode ITEMPACKAGING_STD_PACK_QTY_NOT_EXISTS = new ErrorCode(1_000_021_000, "包装数量不存在");
ErrorCode ITEMPACKAGING_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_021_000, "是否可用不存在");
}

18
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/rule/ErrorCodeConstants.java

@ -1,18 +0,0 @@
package com.win.module.wms.enums.rule;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode RULE_NOT_EXISTS = new ErrorCode(1_000_045_000, "规则不存在");
ErrorCode RULE_STRATEGYCODE_NOT_EXISTS = new ErrorCode(1_000_045_001, "策略规则不存在");
ErrorCode RULE_PRIORITY_NOT_EXISTS = new ErrorCode(1_000_045_001, "策略规则不存在");
}

23
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/saleprice/ErrorCodeConstants.java

@ -1,23 +0,0 @@
package com.win.module.wms.enums.saleprice;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode SALEPRICE_NOT_EXISTS = new ErrorCode(1_000_032_000, "销售价格单不存在");
ErrorCode SALEPRICE_ITEMCODE_NOT_EXISTS = new ErrorCode(1_000_032_001, "物料代码不存在");
ErrorCode SALEPRICE_CURRENCY_NOT_EXISTS = new ErrorCode(1_000_032_002, "物料代码不存在");
ErrorCode SALEPRICE_PRICE_NOT_EXISTS = new ErrorCode(1_000_032_003, "价格不存在");
ErrorCode SALEPRICE_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_032_003, "是否可用不存在");
}

20
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/shift/ErrorCodeConstants.java

@ -1,20 +0,0 @@
package com.win.module.wms.enums.shift;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode SHIFT_NOT_EXISTS = new ErrorCode(1_000_057_000, "班次不存在");
ErrorCode SHIFT_BEGIN_TIME_NOT_EXISTS = new ErrorCode(1_000_057_001, "开始时间不存在");
ErrorCode SHIFT_END_TIME_NOT_EXISTS = new ErrorCode(1_000_057_002, "结束时间不存在");
ErrorCode SHIFT_AVAIABLE_NOT_EXISTS = new ErrorCode(1_000_057_003, "是否可用不存在");
ErrorCode SHIFT_ENDATNEXTDAY_NOT_EXISTS = new ErrorCode(1_000_057_003, "是否跨天不存在");
}

22
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/stdcostprice/ErrorCodeConstants.java

@ -1,22 +0,0 @@
package com.win.module.wms.enums.stdcostprice;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode STDCOSTPRICE_NOT_EXISTS = new ErrorCode(1_023_000_000, "标准成本价格单不存在");
ErrorCode STDCOSTPRICE_SUPPLIER_CODE_NOT_EXISTS = new ErrorCode(1_023_000_000, "供应商代码不存在");
ErrorCode STDCOSTPRICE_ITEN_CODE_NOT_EXISTS = new ErrorCode(1_023_000_000, "物料代码不存在");
ErrorCode STDCOSTPRICE_CURRENCY_NOT_EXISTS = new ErrorCode(1_023_000_000, "物料代码不存在");
ErrorCode STDCOSTPRICE_AVAILABLE_NOT_EXISTS = new ErrorCode(1_023_000_000, "物料代码不存在");
}

20
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/supplier/ErrorCodeConstants.java

@ -1,20 +0,0 @@
package com.win.module.wms.enums.supplier;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode SUPPLIER_NOT_EXISTS = new ErrorCode(1_000_025_000, "供应商不存在");
ErrorCode SUPPLIER_NOT_EXISTSNO = new ErrorCode(1_000_025_001, "code已存在");
ErrorCode SUPPLIER_MOUBLE_EXISTSNO = new ErrorCode(1_000_025_002, "code已存在");
ErrorCode SUPPLIER_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_026_003, "是否可用不存在");
ErrorCode SUPPLIER_SHORTNAME_NOT_EXISTS = new ErrorCode(1_000_026_003, "简称不存在");
}

25
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/supplieritem/ErrorCodeConstants.java

@ -1,25 +0,0 @@
package com.win.module.wms.enums.supplieritem;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode SUPPLIERITEM_NOT_EXISTS = new ErrorCode(1_000_026_000, "供应商物品不存在");
ErrorCode SUPPLIERITEM_SUPPLIER_CODE_NOT_EXISTS = new ErrorCode(1_000_026_001, "供应商代码不存在");
ErrorCode SUPPLIERITEM_ITEM_CODE_NOT_EXISTS = new ErrorCode(1_000_026_002, "物料代码不存在");
ErrorCode SUPPLIERITEM_PACK_UNIT_NOT_EXISTS = new ErrorCode(1_000_026_003, "供应商包装单位不存在");
ErrorCode SUPPLIERITEM_PACK_QTY_NOT_EXISTS = new ErrorCode(1_000_026_003, "供应商包装数量不存在");
ErrorCode SUPPLIERITEM_AVAILABLE_NOT_EXISTS = new ErrorCode(1_000_026_003, "是否可用不存在");
}

19
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/systemcalendar/ErrorCodeConstants.java

@ -1,19 +0,0 @@
package com.win.module.wms.enums.systemcalendar;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode SYSTEMCALENDAR_NOT_EXISTS = new ErrorCode(1_042_000_000, "系统日历不存在");
ErrorCode SYSTEMCALENDAR_MOUBLE_EXISTS = new ErrorCode(1_000_058_001, "code已存在");
ErrorCode SYSTEMCALENDAR_MOUBLE_EXISTSNO = new ErrorCode(1_049_000_002, "code已存在");
ErrorCode SYSTEMCALENDAR_AVAIABLE_NOT_EXISTS = new ErrorCode(1_040_000_000, "是否可用不存在");
}

19
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/team/ErrorCodeConstants.java

@ -1,19 +0,0 @@
package com.win.module.wms.enums.team;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode TEAM_NOT_EXISTS = new ErrorCode(1_000_058_000, "班组不存在");
ErrorCode TEAM_CODE_EXISTSNO = new ErrorCode(1_000_058_001, "code已存在");
ErrorCode TEAM_AVAIABLE_NOT_EXISTS = new ErrorCode(1_000_058_002, "是否可用不存在");
}

20
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/transactiontype/ErrorCodeConstants.java

@ -1,20 +0,0 @@
package com.win.module.wms.enums.transactiontype;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode TRANSACTIONTYPE_NOT_EXISTS = new ErrorCode(1_049_000_000, "事务类型不存在");
ErrorCode TRANSACTIONTYPE_CODE_EXISTS = new ErrorCode(1_049_000_001, "code已存在");
ErrorCode CODE_EXISTSNO = new ErrorCode(1_049_000_002, "code已存在");
ErrorCode TRANSACTIONTYPE_AVAIABLE_NOT_EXISTS = new ErrorCode(1_049_000_003, "是否可用不存在");
}

19
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/warehouse/ErrorCodeConstants.java

@ -1,19 +0,0 @@
package com.win.module.wms.enums.warehouse;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode WAREHOUSE_NOT_EXISTS = new ErrorCode(1_033_000_000, "仓库不存在");
ErrorCode WAREHOUSE_CODE_EXISTS = new ErrorCode(1_033_000_001, "code已存在");
ErrorCode WAREHOUSE_CODE_EXISTSNO = new ErrorCode(1_033_000_002, "code不存在");
ErrorCode WAREHOUSE_AVAIABLE_NOT_EXISTS = new ErrorCode(1_033_000_003, "是否可用不存在");
}

20
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/workshop/ErrorCodeConstants.java

@ -1,20 +0,0 @@
package com.win.module.wms.enums.workshop;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode WORKSHOP_NOT_EXISTS = new ErrorCode(1_038_000_000, "车间不存在");
ErrorCode CODE_EXISTS = new ErrorCode(1_039_000_000, "code已存在");
ErrorCode CODE_EXISTSNO = new ErrorCode(1_039_000_000, "code已存在");
ErrorCode AVAIABLE_NOT_EXISTS = new ErrorCode(1_040_000_000, "是否可用不存在");
}

23
win-module-wms/win-module-wms-api/src/main/java/com/win/module/wms/enums/workstation/ErrorCodeConstants.java

@ -1,23 +0,0 @@
package com.win.module.wms.enums.workstation;
import com.win.framework.common.exception.ErrorCode;
/**
* System 错误码枚举类
*
* system 系统使用 1-002-000-000
*/
public interface ErrorCodeConstants {
ErrorCode WORKSTATION_NOT_EXISTS = new ErrorCode(1_000_040_000, "工位不存在");
ErrorCode WORKSTATION_CODE_NOT_EXISTS = new ErrorCode(1_000_040_001, "code不存在");
ErrorCode WORKSTATION_CODE_EXISTS = new ErrorCode(1_000_040_002, "code已存在");
ErrorCode WORKSTATION_AVAIABLE_NOT_EXISTS = new ErrorCode(1_000_040_003, "是否可用不存在");
ErrorCode WORKSTATION_WORKSHOP_CODE_NOT_EXISTS = new ErrorCode(1_000_040_004, "车间代码不存在");
ErrorCode WORKSTATION_PRODUECTION_LINE_CODE_NOT_EXISTS = new ErrorCode(1_000_040_005, "生产线代码不存在");
}

4
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/itembasic/ItembasicController.java

@ -34,7 +34,7 @@ import java.util.*;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.framework.common.pojo.CommonResult.success;
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
import static com.win.module.wms.enums.itembasic.ErrorCodeConstants.CODE_EXISTS;
import static com.win.module.wms.enums.ErrorCodeConstants.ITEMBASIC_CODE_EXISTS;
@Tag(name = "管理后台 - 物品基本信息")
@RestController
@ -75,7 +75,7 @@ public class ItembasicController {
if(!(null == itembasicMapper.selectOne(queryWrapper))){
ItembasicDO itembasicDO = itembasicMapper.selectOne(queryWrapper);
if(itembasicDO.getCode().equals(vo.getCode()) && !itembasicDO.getId().equals(vo.getId())){
throw exception(CODE_EXISTS);
throw exception(ITEMBASIC_CODE_EXISTS);
}
}
}

11
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/saleprice/SalepriceMapper.java

@ -1,16 +1,15 @@
package com.win.module.wms.dal.mysql.saleprice;
import java.util.*;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.win.framework.mybatis.core.mapper.BaseMapperX;
import com.win.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.win.module.wms.controller.saleprice.vo.SalepriceExportReqVO;
import com.win.module.wms.controller.saleprice.vo.SalepricePageReqVO;
import com.win.module.wms.dal.dataobject.saleprice.SalepriceDO;
import com.win.module.wms.dal.dataobject.shift.ShiftDO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 销售价格单 Mapper
*
@ -19,8 +18,8 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface SalepriceMapper extends BaseMapperX<SalepriceDO> {
default SalepriceDO selectByCustomercodeCode(String customercode) {
return selectOne(SalepriceDO::getCustomercode, customercode);
default SalepriceDO selectByItemCode(String itemcode) {
return selectOne(SalepriceDO::getItemcode, itemcode);
}
default PageResult<SalepriceDO> selectPage(SalepricePageReqVO reqVO) {

9
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/supplieritem/SupplieritemMapper.java

@ -1,17 +1,15 @@
package com.win.module.wms.dal.mysql.supplieritem;
import java.util.*;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.win.framework.mybatis.core.mapper.BaseMapperX;
import com.win.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.win.module.wms.controller.supplieritem.vo.SupplieritemExportReqVO;
import com.win.module.wms.controller.supplieritem.vo.SupplieritemPageReqVO;
import com.win.module.wms.dal.dataobject.supplieritem.SupplieritemDO;
import com.win.module.wms.dal.dataobject.systemcalendar.SystemcalendarDO;
import com.win.module.wms.dal.dataobject.team.TeamDO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 供应商物品 Mapper
*
@ -71,4 +69,5 @@ public interface SupplieritemMapper extends BaseMapperX<SupplieritemDO> {
.orderByDesc(SupplieritemDO::getId));
}
default SupplieritemDO selectByItemcodeCode(String itemcode){return selectOne(SupplieritemDO::getItemCode,itemcode);}
}

10
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/systemcalendar/SystemcalendarMapper.java

@ -1,16 +1,15 @@
package com.win.module.wms.dal.mysql.systemcalendar;
import java.util.*;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.win.framework.mybatis.core.mapper.BaseMapperX;
import com.win.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.win.module.wms.controller.systemcalendar.vo.SystemcalendarExportReqVO;
import com.win.module.wms.controller.systemcalendar.vo.SystemcalendarPageReqVO;
import com.win.module.wms.dal.dataobject.systemcalendar.SystemcalendarDO;
import com.win.module.wms.dal.dataobject.team.TeamDO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 系统日历 Mapper
*
@ -19,9 +18,6 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface SystemcalendarMapper extends BaseMapperX<SystemcalendarDO> {
default SystemcalendarDO selectByMoudule(String mouble) {
return selectOne(SystemcalendarDO::getModule, mouble);
}
default PageResult<SystemcalendarDO> selectPage(SystemcalendarPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<SystemcalendarDO>()
.eqIfPresent(SystemcalendarDO::getModule, reqVO.getModule())

8
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/accountcalendar/AccountcalendarServiceImpl.java

@ -19,9 +19,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.accountcalendar.ErrorCodeConstants.ACCOUNTCALENDAR_NOT_EXISTS;
import static com.win.module.wms.enums.accountcalendar.ErrorCodeConstants.AVAIABLE_NOT_EXISTS;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
@ -86,7 +84,7 @@ public class AccountcalendarServiceImpl implements AccountcalendarService {
public List<AccountcalendarImportExcelVo> importAccountcalendarList(List<AccountcalendarImportExcelVo> importAccountcalendars, Integer mode, boolean updatePart) {
if (CollUtil.isEmpty(importAccountcalendars)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(ACCOUNTCALENDAR_IMPORT_LIST_IS_EMPTY);
}
List<AccountcalendarImportExcelVo> errorList = new ArrayList<>();
importAccountcalendars.forEach(importAccountcalendar -> {
@ -138,7 +136,7 @@ public class AccountcalendarServiceImpl implements AccountcalendarService {
@VisibleForTesting
private void validateAvailableExists(String available) {
if (available.isEmpty()) {
throw exception(AVAIABLE_NOT_EXISTS);
throw exception(ACCOUNTCALENDAR_AVAIABLE_NOT_EXISTS);
}
}
}

17
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/areabasic/AreabasicServiceImpl.java

@ -20,8 +20,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.areabasic.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 库区 Service 实现类
@ -85,7 +84,7 @@ public class AreabasicServiceImpl implements AreabasicService {
@Override
public List<AreabasicImportExcelVo> importAreabasicList(List<AreabasicImportExcelVo> areabasics, Integer mode, Boolean updatePart) {
if (CollUtil.isEmpty(areabasics)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(AREABASIC_IMPORT_LIST_IS_EMPTY);
}
List<AreabasicImportExcelVo> errorList = new ArrayList<>();
areabasics.forEach(areabasic -> {
@ -136,7 +135,7 @@ public class AreabasicServiceImpl implements AreabasicService {
@VisibleForTesting
private void validateCodeExists(Long id,String code) {
if (code.isEmpty()) {
throw exception(CODE_EXISTS);
throw exception(AREABASIC_CODE_NOT_EXISTS);
}
if (StrUtil.isBlank(code)) {
return;
@ -147,28 +146,28 @@ public class AreabasicServiceImpl implements AreabasicService {
}
// 如果 id 为空,说明不用比较是否为相同 id 的用户
if (id == null) {
throw exception(CODE_EXISTS);
throw exception(AREABASIC_CODE_EXISTS);
}
if (!areabasic.getId().equals(id)) {
throw exception(CODE_EXISTS);
throw exception(AREABASIC_CODE_EXISTS);
}
}
@VisibleForTesting
private void validateWarehouseCodeExists(String warehouseCode) {
if (warehouseCode.isEmpty()) {
throw exception(WAREHOUSE_CODE_EXISTS);
throw exception(AREABASIC_WAREHOUSE_CODE_EXISTS);
}
}
@VisibleForTesting
private void validateIsFunctionalExists(String isFunctional) {
if (isFunctional.isEmpty()) {
throw exception(IS_FUNCTIONAL_EXISTS);
throw exception(AREABASIC_IS_FUNCTIONAL_EXISTS);
}
}
@VisibleForTesting
private void validateAvailableExists(String available) {
if (available.isEmpty()) {
throw exception(AVAIABLE_NOT_EXISTS);
throw exception(AREABASIC_AVAIABLE_NOT_EXISTS);
}
}
}

21
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/bom/BomServiceImpl.java

@ -21,8 +21,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.bom.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 物料清单 Service 实现类
@ -89,7 +88,7 @@ public class BomServiceImpl implements BomService {
@Override
public List<BomImportExcelVo> importBomList(List<BomImportExcelVo> boms, Integer mode, Boolean updatePart) {
if (CollUtil.isEmpty(boms)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(BOM_IMPORT_LIST_IS_EMPTY);
}
List<BomImportExcelVo> errorList = new ArrayList<>();
boms.forEach(bom -> {
@ -147,7 +146,7 @@ public class BomServiceImpl implements BomService {
@VisibleForTesting
private void validateProductItemCodeExists(Long id,String productItemCode) {
if (productItemCode.isEmpty()) {
throw exception(PRODUCT_ITEMCODE_NOT_EXISTS);
throw exception(BOM_PRODUCT_ITEM_CODE_NOT_EXISTS);
}
if (StrUtil.isBlank(productItemCode)) {
return;
@ -158,40 +157,40 @@ public class BomServiceImpl implements BomService {
}
// 如果 id 为空,说明不用比较是否为相同 id 的用户
if (id == null) {
throw exception(PRODUCT_ITEMCODE_EXISTS);
throw exception(BOM_PRODUCT_ITEM_CODE_EXISTS);
}
if (!bom.getId().equals(id)) {
throw exception(PRODUCT_ITEMCODE_EXISTS);
throw exception(BOM_PRODUCT_ITEM_CODE_EXISTS);
}
}
@VisibleForTesting
private void validateComponentUomExists(String componentUom) {
if (componentUom.isEmpty()) {
throw exception(COMPONENT_UOM_NOT_EXISTS);
throw exception(BOM_COMPONENT_UOM_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateAvailableExists(String available) {
if (available.isEmpty()) {
throw exception(AVAIABLE_NOT_EXISTS);
throw exception(BOM_AVAIABLE_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateComponentItemCodeExists(String componentItemCode) {
if (componentItemCode.isEmpty()) {
throw exception(COMPONENT_ITEM_CODE_NOT_EXISTS);
throw exception(BOM_COMPONENT_ITEM_CODE_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateComponentQtyExists(BigDecimal componentQty) {
if (componentQty == null) {
throw exception(COMPONENT_QTY_EXISTS);
throw exception(BOM_COMPONENT_QTY_EXISTS);
}
}
@VisibleForTesting
private void validateProcessCodeExists(String processCode) {
if (processCode.isEmpty()) {
throw exception(PROCESS_CODE_NOT_EXISTS);
throw exception(BOM_PROCESS_CODE_NOT_EXISTS);
}
}
}

25
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/businesstype/BusinesstypeServiceImpl.java

@ -20,8 +20,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.businesstype.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 业务类型 Service 实现类
@ -90,7 +89,7 @@ public class BusinesstypeServiceImpl implements BusinesstypeService {
@Override
public List<BusinesstypeImportExcelVo> importBusinesstypeList(List<BusinesstypeImportExcelVo> businesstypes, Integer mode, Boolean updatePart) {
if (CollUtil.isEmpty(businesstypes)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(BUSINESSTYPE_IMPORT_LIST_IS_EMPTY);
}
List<BusinesstypeImportExcelVo> errorList = new ArrayList<>();
businesstypes.forEach(businesstype -> {
@ -153,7 +152,7 @@ public class BusinesstypeServiceImpl implements BusinesstypeService {
@VisibleForTesting
private void validateCodeExists(Long id,String code) {
if (code.isEmpty()) {
throw exception(CODE_NOT_EXISTS);
throw exception(BUSINESSTYPE_CODE_NOT_EXISTS);
}
if (StrUtil.isBlank(code)) {
return;
@ -164,52 +163,52 @@ public class BusinesstypeServiceImpl implements BusinesstypeService {
}
// 如果 id 为空,说明不用比较是否为相同 id 的用户
if (id == null) {
throw exception(CODE_EXISTS);
throw exception(BUSINESSTYPE_CODE_EXISTS);
}
if (!businesstype.getId().equals(id)) {
throw exception(CODE_EXISTS);
throw exception(BUSINESSTYPE_CODE_EXISTS);
}
}
@VisibleForTesting
private void validateNameExists(String name) {
if (name.isEmpty()) {
throw exception(NAME_NOT_EXISTS);
throw exception(BUSINESSTYPE_NAME_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateItemTypesExists(String itemTypes) {
if (itemTypes.isEmpty()) {
throw exception(ITEM_TYPES_NOT_EXISTS);
throw exception(BUSINESSTYPE_ITEM_TYPES_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateItemStatusesExists(String itemStatuses) {
if (itemStatuses.isEmpty()) {
throw exception(ITEM_STATUSES_ITEM_CODE_NOT_EXISTS);
throw exception(BUSINESSTYPE_ITEM_STATUSES_ITEM_CODE_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateOutTransactionTypeExists(String outTransactionType) {
if (outTransactionType.isEmpty()) {
throw exception(OUT_TRANSACTION_TYPE_NOT_EXISTS);
throw exception(BUSINESSTYPE_OUT_TRANSACTION_TYPE_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateInTransactionTypeExists(String inTransactionType) {
if (inTransactionType.isEmpty()) {
throw exception(IN_TRANSACTION_TYPE_NOT_EXISTS);
throw exception(BUSINESSTYPE_IN_TRANSACTION_TYPE_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateOnTheWayAreaExists(String onTheWayArea) {
if (onTheWayArea.isEmpty()) {
throw exception(USE_ON_THE_WAY__NOT_EXISTS);
throw exception(BUSINESSTYPE_USE_ON_THE_WAY__NOT_EXISTS);
}
}
@VisibleForTesting
private void validateAvailableExists(String available) {
if (available.isEmpty()) {
throw exception(AVAILABLE_NOT_EXISTS);
throw exception(BUSINESSTYPE_AVAILABLE_NOT_EXISTS);
}
}
}

16
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/carrier/CarrierServiceImpl.java

@ -20,9 +20,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.businesstype.ErrorCodeConstants.AVAILABLE_NOT_EXISTS;
import static com.win.module.wms.enums.carrier.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
@ -88,7 +86,7 @@ public class CarrierServiceImpl implements CarrierService {
@Override
public List<CarrierImportExcelVo> importCarrierList(List<CarrierImportExcelVo> carriers, Integer mode, Boolean updatePart) {
if (CollUtil.isEmpty(carriers)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(CARRIER_IMPORT_LIST_IS_EMPTY);
}
List<CarrierImportExcelVo> errorList = new ArrayList<>();
carriers.forEach(carrier -> {
@ -142,7 +140,7 @@ public class CarrierServiceImpl implements CarrierService {
@VisibleForTesting
private void validateCodeExists(Long id,String code) {
if (code.isEmpty()) {
throw exception(CODE_NOT_EXISTS);
throw exception(CARRIER_CODE_NOT_EXISTS);
}
if (StrUtil.isBlank(code)) {
return;
@ -153,22 +151,22 @@ public class CarrierServiceImpl implements CarrierService {
}
// 如果 id 为空,说明不用比较是否为相同 id 的用户
if (id == null) {
throw exception(CODE_EXISTS);
throw exception(CARRIER_CODE_EXISTS);
}
if (!carrier.getId().equals(id)) {
throw exception(CODE_EXISTS);
throw exception(CARRIER_CODE_EXISTS);
}
}
@VisibleForTesting
private void validateShortNameExists(String shortName) {
if (shortName.isEmpty()) {
throw exception(SHORTNAME_NOT_EXISTS);
throw exception(CARRIER_SHORTNAME_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateAvailableExists(String available) {
if (available.isEmpty()) {
throw exception(AVAILABLE_NOT_EXISTS);
throw exception(CARRIER_AVAILABLE_NOT_EXISTS);
}
}
}

1
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/configurationsetting/ConfigurationsettingServiceImpl.java

@ -21,7 +21,6 @@ import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
import static com.win.module.wms.enums.itembasic.ErrorCodeConstants.ITEMBASIC_NOT_EXISTS;
/**
* 配置设置 Service 实现类

5
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/currencyexchange/CurrencyexchangeServiceImpl.java

@ -20,8 +20,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.currencyexchange.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 货币转换 Service 实现类
@ -94,7 +93,7 @@ public class CurrencyexchangeServiceImpl implements CurrencyexchangeService {
@Override
public List<CurrencyexchangeImportExcelVo> importCurrencyexchangeList(List<CurrencyexchangeImportExcelVo> currencyexchanges, Integer mode, Boolean updatePart) {
if (CollUtil.isEmpty(currencyexchanges)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(CURRENCYEXCHANGE_IMPORT_LIST_IS_EMPTY);
}
List<CurrencyexchangeImportExcelVo> errorList = new ArrayList<>();
currencyexchanges.forEach(currencyexchange -> {

5
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/customer/CustomerServiceImpl.java

@ -21,8 +21,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.customer.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
@ -87,7 +86,7 @@ public class CustomerServiceImpl implements CustomerService {
@Override
public List<CustomerImportExcelVo> importCustomerList(List<CustomerImportExcelVo> customers, Integer mode, Boolean updatePart) {
if (CollUtil.isEmpty(customers)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(CUSTOMER_IMPORT_LIST_IS_EMPTY);
}
List<CustomerImportExcelVo> errorList = new ArrayList<>();
customers.forEach(customer -> {

5
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/customerdock/CustomerdockServiceImpl.java

@ -21,8 +21,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.customerdock.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 客户月台 Service 实现类
@ -94,7 +93,7 @@ public class CustomerdockServiceImpl implements CustomerdockService {
@Override
public List<CustomerdockImportExcelVo> importCustomerdockList(List<CustomerdockImportExcelVo> customerdocks, Integer mode, Boolean updatePart) {
if (CollUtil.isEmpty(customerdocks)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(CUSTOMERDOCK_IMPORT_LIST_IS_EMPTY);
}
List<CustomerdockImportExcelVo> errorList = new ArrayList<>();
customerdocks.forEach(customerdock -> {

5
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/customeritem/CustomeritemServiceImpl.java

@ -21,8 +21,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.customeritem.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 客户物品 Service 实现类
@ -93,7 +92,7 @@ public class CustomeritemServiceImpl implements CustomeritemService {
@Override
public List<CustomeritemImportExcelVO> CustomeritemimportCustomeritemList(List<CustomeritemImportExcelVO> customeritems, Integer mode, Boolean updatePart) {
if (CollUtil.isEmpty(customeritems)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(CUSTOMERITEM_IMPORT_LIST_IS_EMPTY);
}
List<CustomeritemImportExcelVO> errorList = new ArrayList<>();
customeritems.forEach(customeritem -> {

8
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/dock/DockServiceImpl.java

@ -20,9 +20,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.customeritem.ErrorCodeConstants.*;
import static com.win.module.wms.enums.dock.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 月台 Service 实现类
@ -87,7 +85,7 @@ public class DockServiceImpl implements DockService {
@Override
public List<DockImportExcelVO> dockimportDockList(List<DockImportExcelVO> docks, Integer mode, Boolean updatePart) {
if (CollUtil.isEmpty(docks)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(DOCK_IMPORT_LIST_IS_EMPTY);
}
List<DockImportExcelVO> errorList = new ArrayList<>();
docks.forEach(dock -> {
@ -137,7 +135,7 @@ public class DockServiceImpl implements DockService {
}
DockDO dock = dockMapper.selectById(id);
if (dock == null) {
throw exception(CUSTOMERITEM_NOT_EXISTS);
throw exception(DOCK_NOT_EXISTS);
}
}
@VisibleForTesting

39
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/itembasic/ItembasicServiceImpl.java

@ -20,8 +20,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.itembasic.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 物品基本信息 Service 实现类
@ -61,9 +60,7 @@ public class ItembasicServiceImpl implements ItembasicService {
@Override
public void deleteItembasic(Long id) {
// 校验存在
if(itembasicMapper.selectById(999) == null){
throw exception(ITEMBASIC_NOT_EXISTS);
}
validateItembasicExists(id);
// 删除
itembasicMapper.deleteById(id);
}
@ -90,7 +87,7 @@ public class ItembasicServiceImpl implements ItembasicService {
public List<ItembasicImportExcelVo> importItembasicList(List<ItembasicImportExcelVo> importItembasics, Integer mode, boolean updatePart) {
if (CollUtil.isEmpty(importItembasics)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(ITEMBASIC_IMPORT_LIST_IS_EMPTY);
}
List<ItembasicImportExcelVo> errorList = new ArrayList<>();
importItembasics.forEach(importItembasic -> {
@ -159,7 +156,7 @@ public class ItembasicServiceImpl implements ItembasicService {
@VisibleForTesting
private void validateCodeExists(Long id,String code) {
if (code.isEmpty()) {
throw exception(CODE_NOT_EXISTS);
throw exception(ITEMBASIC_CODE_NOT_EXISTS);
}
if (StrUtil.isBlank(code)) {
return;
@ -170,82 +167,82 @@ public class ItembasicServiceImpl implements ItembasicService {
}
// 如果 id 为空,说明不用比较是否为相同 id 的用户
if (id == null) {
throw exception(CODE_EXISTS);
throw exception(ITEMBASIC_CODE_EXISTS);
}
if (!itembasic.getId().equals(id)) {
throw exception(CODE_EXISTS);
throw exception(ITEMBASIC_CODE_EXISTS);
}
}
@VisibleForTesting
private void validateStatusExists(String status) {
if (status.isEmpty()) {
throw exception(STATUS_NOT_EXISTS);
throw exception(ITEMBASIC_STATUS_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateUomExists(String uom) {
if (uom.isEmpty()) {
throw exception(UOM_NOT_EXISTS);
throw exception(ITEMBASIC_UOM_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateIsStdPackExists(String stdPack) {
if (stdPack == null) {
throw exception(IS_STDPACK_NOT_EXISTS);
throw exception(ITEMBASIC_IS_STDPACK_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateEnableBuyExists(String enableBuy) {
if (enableBuy == null) {
throw exception(ENABLE_BUY_NOT_EXISTS);
throw exception(ITEMBASIC_ENABLE_BUY_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateEnableMakeExists(String enableMark) {
if (enableMark == null) {
throw exception(ENABLE_MAKE_NOT_EXISTS);
throw exception(ITEMBASIC_ENABLE_MAKE_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateEnableOutsouringExists(String enblOutsouring) {
if (enblOutsouring == null) {
throw exception(ENABLE_OUTSOURING_NOT_EXISTS);
throw exception(ITEMBASIC_ENABLE_OUTSOURING_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateIsRecycledExists(String isRecycled) {
if (isRecycled == null) {
throw exception(IS_RECYCLED_NOT_EXISTS);
throw exception(ITEMBASIC_IS_RECYCLED_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateIsPhantomExists(String isPhantom) {
if (isPhantom == null) {
throw exception(IS_PHANTOM_NOT_EXISTS);
throw exception(ITEMBASIC_IS_PHANTOM_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateAbcClassExists(String abcClass) {
if (abcClass.isEmpty()) {
throw exception(ABC_CLASS_NOT_EXISTS);
throw exception(ITEMBASIC_ABC_CLASS_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateTypeExists(String type) {
if (type.isEmpty()) {
throw exception(TYPE_NOT_EXISTS);
throw exception(ITEMBASIC_TYPE_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateValidityDaysExists(Integer validityDays) {
if (validityDays == null) {
throw exception(VALIDITY_DAYS_NOT_EXISTS);
throw exception(ITEMBASIC_VALIDITY_DAYS_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateAvailableExists(String available) {
if (available == null) {
throw exception(AVAIABLE_NOT_EXISTS);
throw exception(ITEMBASIC_AVAIABLE_NOT_EXISTS);
}
}
}

5
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/itempackaging/ItempackagingServiceImpl.java

@ -21,8 +21,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.itempackaging.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 物品包装信息 Service 实现类
@ -87,7 +86,7 @@ public class ItempackagingServiceImpl implements ItempackagingService {
@Override
public List<ItempackagingImportExcelVO> itempackagingimportDocumentList(List<ItempackagingImportExcelVO> itempackagings, Integer mode, Boolean updatePart) {
if (CollUtil.isEmpty(itempackagings)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(ITEMPACKAGING_IMPORT_LIST_IS_EMPTY);
}
List<ItempackagingImportExcelVO> errorList = new ArrayList<>();
itempackagings.forEach(itempackaging -> {

5
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/location/LocationServiceImpl.java

@ -20,7 +20,6 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
@ -89,7 +88,7 @@ public class LocationServiceImpl implements LocationService {
@Override
public List<LocationImportExcelVO> importLocationList(List<LocationImportExcelVO> locations, Integer mode, Boolean updatePart) {
if (CollUtil.isEmpty(locations)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(LOCATION_IMPORT_LIST_IS_EMPTY);
}
List<LocationImportExcelVO> errorList = new ArrayList<>();
locations.forEach(location -> {
@ -139,7 +138,7 @@ public class LocationServiceImpl implements LocationService {
}
private void validateLocationExists(Long id) {
if (locationMapper.selectById(id) == null) {
throw exception(LOCATIONGROUP_NOT_EXISTS);
throw exception(LOCATION_NOT_EXISTS);
}
}
@VisibleForTesting

13
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/locationgroup/LocationgroupServiceImpl.java

@ -21,7 +21,6 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
@ -65,12 +64,6 @@ public class LocationgroupServiceImpl implements LocationgroupService {
locationgroupMapper.deleteById(id);
}
private void validateLocationgroupExists(Long id) {
if (locationgroupMapper.selectById(id) == null) {
throw exception(LOCATIONGROUP_NOT_EXISTS);
}
}
@Override
public LocationgroupDO getLocationgroup(Long id) {
return locationgroupMapper.selectById(id);
@ -94,7 +87,7 @@ public class LocationgroupServiceImpl implements LocationgroupService {
@Override
public List<LocationGroupImportExcelVO> importLocationGroupList(List<LocationGroupImportExcelVO> locationGroups, Integer mode, Boolean updatePart) {
if (CollUtil.isEmpty(locationGroups)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(LOCATIONGROUP_IMPORT_LIST_IS_EMPTY);
}
List<LocationGroupImportExcelVO> errorList = new ArrayList<>();
locationGroups.forEach(locationGroup -> {
@ -127,7 +120,7 @@ public class LocationgroupServiceImpl implements LocationgroupService {
private void validateLocationForCreateOrUpdate(Long id, String code,String warehouseCode, String areaCode,String available) {
// 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确
DataPermissionUtils.executeIgnore(() -> {
validateLocationExists(id);
validateLocationgroupExists(id);
validateCodeExists(id,code);
// 校验code唯一
validateWarehouseCodeExists(warehouseCode);
@ -135,7 +128,7 @@ public class LocationgroupServiceImpl implements LocationgroupService {
validateAvailableExists(available);
});
}
private void validateLocationExists(Long id) {
private void validateLocationgroupExists(Long id) {
if (locationgroupMapper.selectById(id) == null) {
throw exception(LOCATIONGROUP_NOT_EXISTS);
}

3
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/owner/OwnerServiceImpl.java

@ -20,7 +20,6 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
@ -85,7 +84,7 @@ public class OwnerServiceImpl implements OwnerService {
@Override
public List<OwnerImportExcelVO> importOwnerList(List<OwnerImportExcelVO> owners, Integer mode, Boolean updatePart) {
if (CollUtil.isEmpty(owners)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(OWNER_IMPORT_LIST_IS_EMPTY);
}
List<OwnerImportExcelVO> errorList = new ArrayList<>();
owners.forEach(owner -> {

48
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/rule/RuleServiceImpl.java

@ -4,31 +4,23 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.google.common.annotations.VisibleForTesting;
import com.win.framework.common.exception.ServiceException;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.datapermission.core.util.DataPermissionUtils;
import com.win.module.wms.controller.rule.vo.RuleCreateReqVO;
import com.win.module.wms.controller.rule.vo.RuleExportReqVO;
import com.win.module.wms.controller.rule.vo.RulePageReqVO;
import com.win.module.wms.controller.rule.vo.RuleUpdateReqVO;
import com.win.module.wms.controller.rule.vo.RuleImportExcelVo;
import com.win.module.wms.controller.rule.vo.*;
import com.win.module.wms.convert.rule.RuleConvert;
import com.win.module.wms.dal.dataobject.rule.RuleDO;
import com.win.module.wms.dal.mysql.rule.RuleMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.validation.annotation.Validated;
import java.util.*;
import com.win.framework.common.pojo.PageResult;
import com.win.module.wms.convert.rule.RuleConvert;
import com.win.module.wms.dal.mysql.rule.RuleMapper;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.rule.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 规则 Service 实现类
@ -68,12 +60,6 @@ public class RuleServiceImpl implements RuleService {
ruleMapper.deleteById(id);
}
private void validateRuleExists(Long id) {
if (ruleMapper.selectById(id) == null) {
throw exception(RULE_NOT_EXISTS);
}
}
@Override
public RuleDO getRule(Long id) {
return ruleMapper.selectById(id);
@ -96,7 +82,7 @@ public class RuleServiceImpl implements RuleService {
public List<RuleImportExcelVo> importRuleList(List<RuleImportExcelVo> rules, Integer mode, boolean updatePart) {
if (CollUtil.isEmpty(rules)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(RULE_IMPORT_LIST_IS_EMPTY);
}
List<RuleImportExcelVo> errorList = new ArrayList<>();
rules.forEach(rule -> {
@ -131,7 +117,7 @@ public class RuleServiceImpl implements RuleService {
private void validateRuleForCreateOrUpdate(Long id, String code, String strategycode,Integer priority) {
// 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确
DataPermissionUtils.executeIgnore(() -> {
validateRulepExists(id);
validateRuleExists(id);
// 校验code唯一
validateCodeExists(id,code);
validateStrategycode(strategycode);
@ -140,12 +126,8 @@ public class RuleServiceImpl implements RuleService {
});
}
@VisibleForTesting
private void validateRulepExists(Long id) {
if (id == null) {
return;
}
RuleDO rule = ruleMapper.selectById(id);
if (rule == null) {
private void validateRuleExists(Long id) {
if (ruleMapper.selectById(id) == null) {
throw exception(RULE_NOT_EXISTS);
}
}
@ -153,7 +135,7 @@ public class RuleServiceImpl implements RuleService {
@VisibleForTesting
private void validateCodeExists(Long id,String code) {
if (code.isEmpty()) {
throw exception(RULE_NOT_EXISTS);
throw exception(RULE_CODE_NOT_EXISTS);
}
if (StrUtil.isBlank(code)) {
return;
@ -164,10 +146,10 @@ public class RuleServiceImpl implements RuleService {
}
// 如果 id 为空,说明不用比较是否为相同 id 的用户
if (id == null) {
throw exception(RULE_NOT_EXISTS);
throw exception(RULE_CODE_EXISTS);
}
if (!rule.getId().equals(id)) {
throw exception(RULE_NOT_EXISTS);
throw exception(RULE_CODE_EXISTS);
}
}
@VisibleForTesting

56
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/saleprice/SalepriceServiceImpl.java

@ -6,14 +6,8 @@ import com.google.common.annotations.VisibleForTesting;
import com.win.framework.common.exception.ServiceException;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.datapermission.core.util.DataPermissionUtils;
import com.win.module.wms.controller.saleprice.vo.SalepriceCreateReqVO;
import com.win.module.wms.controller.saleprice.vo.SalepriceExportReqVO;
import com.win.module.wms.controller.saleprice.vo.SalepricePageReqVO;
import com.win.module.wms.controller.saleprice.vo.SalepriceUpdateReqVO;
import com.win.module.wms.controller.saleprice.vo.SalepriceImportExcelVo;
import com.win.module.wms.controller.saleprice.vo.*;
import com.win.module.wms.convert.saleprice.SalepriceConvert;
import com.win.module.wms.convert.saleprice.SalepriceConvert;
import com.win.module.wms.dal.dataobject.saleprice.SalepriceDO;
import com.win.module.wms.dal.dataobject.saleprice.SalepriceDO;
import com.win.module.wms.dal.mysql.saleprice.SalepriceMapper;
import org.springframework.stereotype.Service;
@ -27,9 +21,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.saleprice.ErrorCodeConstants.SALEPRICE_NOT_EXISTS;
import static com.win.module.wms.enums.saleprice.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 销售价格单 Service 实现类
@ -69,12 +61,6 @@ public class SalepriceServiceImpl implements SalepriceService {
salepriceMapper.deleteById(id);
}
private void validateSalepriceExists(Long id) {
if (salepriceMapper.selectById(id) == null) {
throw exception(SALEPRICE_NOT_EXISTS);
}
}
@Override
public SalepriceDO getSaleprice(Long id) {
return salepriceMapper.selectById(id);
@ -97,7 +83,7 @@ public class SalepriceServiceImpl implements SalepriceService {
public List<SalepriceImportExcelVo> importSalepriceList(List<SalepriceImportExcelVo> saleprices, Integer mode, boolean updatePart) {
if (CollUtil.isEmpty(saleprices)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(SALEPRICE_IMPORT_LIST_IS_EMPTY);
}
List<SalepriceImportExcelVo> errorList = new ArrayList<>();
saleprices.forEach(saleprice -> {
@ -113,7 +99,7 @@ public class SalepriceServiceImpl implements SalepriceService {
}
// 判断如果不存在,在进行插入
SalepriceDO existSaleprice = salepriceMapper.selectByCustomercodeCode(saleprice.getCustomercode());
SalepriceDO existSaleprice = salepriceMapper.selectByItemCode(saleprice.getItemcode());
if (existSaleprice == null&& mode != 3) {
salepriceMapper.insert(SalepriceConvert.INSTANCE.convert(saleprice));
}
@ -134,10 +120,10 @@ public class SalepriceServiceImpl implements SalepriceService {
BigDecimal price, String available ) {
// 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确
DataPermissionUtils.executeIgnore(() -> {
validateSalepricepExists(id);
validateSalepriceExists(id);
// 校验code唯一
validateCodeExists(id,customercode);
validateItemCodeExists(itemcode);
validateCodeExists(id,itemcode);
validateCustomerCodeExists(customercode);
validateCurrencyExists(currency);
validatePriceExists(price);
validateAvailableExists(available);
@ -145,34 +131,30 @@ public class SalepriceServiceImpl implements SalepriceService {
});
}
@VisibleForTesting
private void validateSalepricepExists(Long id) {
if (id == null) {
return;
}
SalepriceDO saleprice = salepriceMapper.selectById(id);
if (saleprice == null) {
private void validateSalepriceExists(Long id) {
if (salepriceMapper.selectById(id) == null) {
throw exception(SALEPRICE_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateCodeExists(Long id,String code) {
if (code.isEmpty()) {
throw exception(SALEPRICE_NOT_EXISTS);
private void validateCodeExists(Long id,String itemcode) {
if (itemcode.isEmpty()) {
throw exception(SALEPRICE_ITEM_CODE_NOT_EXISTS);
}
if (StrUtil.isBlank(code)) {
if (StrUtil.isBlank(itemcode)) {
return;
}
SalepriceDO saleprice = salepriceMapper.selectByCustomercodeCode(code);
SalepriceDO saleprice = salepriceMapper.selectByItemCode(itemcode);
if (saleprice == null) {
return;
}
// 如果 id 为空,说明不用比较是否为相同 id 的用户
if (id == null) {
throw exception(SALEPRICE_NOT_EXISTS);
throw exception(SALEPRICE_ITEM_CODE_EXISTS);
}
if (!saleprice.getId().equals(id)) {
throw exception(SALEPRICE_NOT_EXISTS);
throw exception(SALEPRICE_ITEM_CODE_EXISTS);
}
}
@VisibleForTesting
@ -191,9 +173,9 @@ public class SalepriceServiceImpl implements SalepriceService {
@VisibleForTesting
private void validateItemCodeExists(String itemcode) {
if (itemcode.isEmpty()) {
throw exception(SALEPRICE_ITEMCODE_NOT_EXISTS);
private void validateCustomerCodeExists(String customerCode) {
if (customerCode.isEmpty()) {
throw exception(SALEPRICE_CURRENCY_NOT_EXISTS);
}
}

55
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/shift/ShiftServiceImpl.java

@ -1,38 +1,27 @@
package com.win.module.wms.service.shift;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.util.StrUtil;
import com.google.common.annotations.VisibleForTesting;
import com.win.framework.common.exception.ServiceException;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.datapermission.core.util.DataPermissionUtils;
import com.win.module.wms.controller.shift.vo.ShiftCreateReqVO;
import com.win.module.wms.controller.shift.vo.ShiftExportReqVO;
import com.win.module.wms.controller.shift.vo.ShiftPageReqVO;
import com.win.module.wms.controller.shift.vo.ShiftUpdateReqVO;
import com.win.module.wms.controller.shift.vo.ShiftImportExcelVo;
import com.win.module.wms.controller.shift.vo.*;
import com.win.module.wms.convert.shift.ShiftConvert;
import com.win.module.wms.dal.dataobject.shift.ShiftDO;
import com.win.module.wms.dal.mysql.shift.ShiftMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.*;
import com.win.module.wms.dal.dataobject.shift.ShiftDO;
import com.win.framework.common.pojo.PageResult;
import com.win.module.wms.convert.shift.ShiftConvert;
import com.win.module.wms.dal.mysql.shift.ShiftMapper;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.shift.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 班次 Service 实现类
@ -72,12 +61,6 @@ public class ShiftServiceImpl implements ShiftService {
shiftMapper.deleteById(id);
}
private void validateShiftExists(Long id) {
if (shiftMapper.selectById(id) == null) {
throw exception(SHIFT_NOT_EXISTS);
}
}
@Override
public ShiftDO getShift(Long id) {
return shiftMapper.selectById(id);
@ -102,7 +85,7 @@ public class ShiftServiceImpl implements ShiftService {
public List<ShiftImportExcelVo> importShiftList(List<ShiftImportExcelVo> shifts, Integer mode, boolean updatePart) {
if (CollUtil.isEmpty(shifts)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(SHIFT_IMPORT_LIST_IS_EMPTY);
}
List<ShiftImportExcelVo> errorList = new ArrayList<>();
shifts.forEach(shift -> {
@ -139,7 +122,7 @@ public class ShiftServiceImpl implements ShiftService {
String available) {
// 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确
DataPermissionUtils.executeIgnore(() -> {
validateShiftpExists(id);
validateShiftExists(id);
// 校验code唯一
validateCodeExists(id,code);
validateBeginTimeExists(begintime);
@ -150,24 +133,16 @@ public class ShiftServiceImpl implements ShiftService {
});
}
@VisibleForTesting
private void validateShiftpExists(Long id) {
if (id == null) {
return;
}
ShiftDO shift = shiftMapper.selectById(id);
if (shift == null) {
private void validateShiftExists(Long id) {
if (shiftMapper.selectById(id) == null) {
throw exception(SHIFT_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateCodeExists(Long id,String code) {
if (code.isEmpty()) {
throw exception(SHIFT_NOT_EXISTS);
throw exception(SHIFT_CODE_NOT_EMPTY);
}
if (StrUtil.isBlank(code)) {
return;
@ -178,10 +153,10 @@ public class ShiftServiceImpl implements ShiftService {
}
// 如果 id 为空,说明不用比较是否为相同 id 的用户
if (id == null) {
throw exception(SHIFT_NOT_EXISTS);
throw exception(SHIFT_CODE_EMPTY);
}
if (!shift.getId().equals(id)) {
throw exception(SHIFT_NOT_EXISTS);
throw exception(SHIFT_CODE_EMPTY);
}
}

68
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/stdcostprice/StdcostpriceServiceImpl.java

@ -4,33 +4,24 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.google.common.annotations.VisibleForTesting;
import com.win.framework.common.exception.ServiceException;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.datapermission.core.util.DataPermissionUtils;
import com.win.module.wms.controller.stdcostprice.vo.StdcostpriceCreateReqVO;
import com.win.module.wms.controller.stdcostprice.vo.StdcostpriceExportReqVO;
import com.win.module.wms.controller.stdcostprice.vo.StdcostpricePageReqVO;
import com.win.module.wms.controller.stdcostprice.vo.StdcostpriceUpdateReqVO;
import com.win.module.wms.controller.stdcostprice.vo.StdcostpriceImportExcelVo;
import com.win.module.wms.controller.stdcostprice.vo.*;
import com.win.module.wms.convert.stdcostprice.StdcostpriceConvert;
import com.win.module.wms.dal.dataobject.stdcostprice.StdcostpriceDO;
import com.win.module.wms.dal.mysql.stdcostprice.StdcostpriceMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
import com.win.module.wms.dal.dataobject.stdcostprice.StdcostpriceDO;
import com.win.framework.common.pojo.PageResult;
import com.win.module.wms.convert.stdcostprice.StdcostpriceConvert;
import com.win.module.wms.dal.mysql.stdcostprice.StdcostpriceMapper;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.stdcostprice.ErrorCodeConstants.STDCOSTPRICE_NOT_EXISTS;
import static com.win.module.wms.enums.stdcostprice.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 标准成本价格单 Service 实现类
@ -70,12 +61,6 @@ public class StdcostpriceServiceImpl implements StdcostpriceService {
stdcostpriceMapper.deleteById(id);
}
private void validateStdcostpriceExists(Long id) {
if (stdcostpriceMapper.selectById(id) == null) {
throw exception(STDCOSTPRICE_NOT_EXISTS);
}
}
@Override
public StdcostpriceDO getStdcostprice(Long id) {
return stdcostpriceMapper.selectById(id);
@ -97,7 +82,7 @@ public class StdcostpriceServiceImpl implements StdcostpriceService {
}
public List<StdcostpriceImportExcelVo> importStdcostpriceList(List<StdcostpriceImportExcelVo> stdcostprices, Integer mode, boolean updatePart) {
if (CollUtil.isEmpty(stdcostprices)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(STDCOSTPRICE_IMPORT_LIST_IS_EMPTY);
}
List<StdcostpriceImportExcelVo> errorList = new ArrayList<>();
stdcostprices.forEach(stdcostprice -> {
@ -134,11 +119,10 @@ public class StdcostpriceServiceImpl implements StdcostpriceService {
BigDecimal price,String available) {
// 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确
DataPermissionUtils.executeIgnore(() -> {
validateStdcostpricepExists(id);
validateStdcostpriceExists(id);
// 校验code唯一
validateCodeExists(id,suppercode);
validateItemCodeExists(itemcode);
validateCodeExists(id,itemcode);
validateSuppercodeExists(suppercode);
validateCurrencyExists(currency);
validatePriceExists(price);
validateAvailableExists(available);
@ -146,41 +130,37 @@ public class StdcostpriceServiceImpl implements StdcostpriceService {
});
}
@VisibleForTesting
private void validateStdcostpricepExists(Long id) {
if (id == null) {
return;
}
StdcostpriceDO stdcostprice = stdcostpriceMapper.selectById(id);
if (stdcostprice == null) {
private void validateStdcostpriceExists(Long id) {
if (stdcostpriceMapper.selectById(id) == null) {
throw exception(STDCOSTPRICE_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateCodeExists(Long id,String suppercode) {
if (suppercode.isEmpty()) {
throw exception(STDCOSTPRICE_SUPPLIER_CODE_NOT_EXISTS);
private void validateCodeExists(Long id,String itemcode) {
if (itemcode.isEmpty()) {
throw exception(STDCOSTPRICE_ITEN_CODE_NOT_EXISTS);
}
if (StrUtil.isBlank(suppercode)) {
if (StrUtil.isBlank(itemcode)) {
return;
}
StdcostpriceDO stdcostprice = stdcostpriceMapper.selectByStdcostpriceCode(suppercode);
StdcostpriceDO stdcostprice = stdcostpriceMapper.selectByStdcostpriceCode(itemcode);
if (stdcostprice == null) {
return;
}
// 如果 id 为空,说明不用比较是否为相同 id 的用户
if (id == null) {
throw exception(STDCOSTPRICE_SUPPLIER_CODE_NOT_EXISTS);
throw exception(STDCOSTPRICE_ITEN_CODE_EXISTS);
}
if (!stdcostprice.getId().equals(id)) {
throw exception(STDCOSTPRICE_SUPPLIER_CODE_NOT_EXISTS);
throw exception(STDCOSTPRICE_ITEN_CODE_EXISTS);
}
}
@VisibleForTesting
private void validateItemCodeExists(String itemcode) {
if (itemcode.isEmpty()) {
throw exception(STDCOSTPRICE_ITEN_CODE_NOT_EXISTS);
private void validateSuppercodeExists(String suppercode) {
if (suppercode.isEmpty()) {
throw exception(STDCOSTPRICE_SUPPLIER_CODE_NOT_EXISTS);
}
}
@VisibleForTesting

34
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/supplier/SupplierServiceImpl.java

@ -7,15 +7,7 @@ import com.win.framework.common.exception.ServiceException;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.datapermission.core.util.DataPermissionUtils;
import com.win.module.wms.controller.supplier.vo.*;
import com.win.module.wms.controller.supplier.vo.SupplierImportExcelVo;
import com.win.module.wms.convert.supplier.SupplierConvert;
import com.win.module.wms.convert.supplier.SupplierConvert;
import com.win.module.wms.dal.dataobject.supplier.SupplierDO;
import com.win.module.wms.dal.dataobject.supplier.SupplierDO;
import com.win.module.wms.dal.mysql.supplier.SupplierMapper;
import org.springframework.stereotype.Service;
@ -28,11 +20,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.supplier.ErrorCodeConstants.SUPPLIER_NOT_EXISTS;
import static com.win.module.wms.enums.supplier.ErrorCodeConstants.*;
import static com.win.module.wms.enums.supplier.ErrorCodeConstants.*;
import static com.win.module.wms.enums.supplier.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 供应商 Service 实现类
@ -72,12 +60,6 @@ public class SupplierServiceImpl implements SupplierService {
supplierMapper.deleteById(id);
}
private void validateSupplierExists(Long id) {
if (supplierMapper.selectById(id) == null) {
throw exception(SUPPLIER_NOT_EXISTS);
}
}
@Override
public SupplierDO getSupplier(Long id) {
return supplierMapper.selectById(id);
@ -99,7 +81,7 @@ public class SupplierServiceImpl implements SupplierService {
}
public List<SupplierImportExcelVo> importSupplierList(List<SupplierImportExcelVo> suppliers, Integer mode, boolean updatePart) {
if (CollUtil.isEmpty(suppliers)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(SUPPLIER_IMPORT_LIST_IS_EMPTY);
}
List<SupplierImportExcelVo> errorList = new ArrayList<>();
suppliers.forEach(supplier -> {
@ -134,7 +116,7 @@ public class SupplierServiceImpl implements SupplierService {
private void validateSupplierForCreateOrUpdate(Long id, String code, String shortname, String available) {
// 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确
DataPermissionUtils.executeIgnore(() -> {
validateSupplierpExists(id);
validateSupplierExists(id);
// 校验code唯一
validateCodeExists(id,code);
validateShortnameExists(shortname);
@ -143,13 +125,9 @@ public class SupplierServiceImpl implements SupplierService {
});
}
@VisibleForTesting
private void validateSupplierpExists(Long id) {
if (id == null) {
return;
}
SupplierDO supplier = supplierMapper.selectById(id);
if (supplier == null) {
throw exception(SUPPLIER_NOT_EXISTSNO);
private void validateSupplierExists(Long id) {
if (supplierMapper.selectById(id) == null) {
throw exception(SUPPLIER_NOT_EXISTS);
}
}

51
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/supplieritem/SupplieritemServiceImpl.java

@ -6,17 +6,9 @@ import com.google.common.annotations.VisibleForTesting;
import com.win.framework.common.exception.ServiceException;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.datapermission.core.util.DataPermissionUtils;
import com.win.module.wms.controller.supplieritem.vo.SupplieritemCreateReqVO;
import com.win.module.wms.controller.supplieritem.vo.SupplieritemExportReqVO;
import com.win.module.wms.controller.supplieritem.vo.SupplieritemPageReqVO;
import com.win.module.wms.dal.dataobject.supplieritem.SupplieritemDO;;
import com.win.module.wms.controller.supplieritem.vo.SupplieritemUpdateReqVO;
import com.win.module.wms.controller.supplieritem.vo.SupplieriteamImportExcelVo;
import com.win.module.wms.controller.supplieritem.vo.*;
import com.win.module.wms.convert.supplieritem.SupplieritemConvert;
import com.win.module.wms.dal.dataobject.supplieritem.SupplieritemDO;
import com.win.module.wms.dal.dataobject.systemcalendar.SystemcalendarDO;
import com.win.module.wms.dal.mysql.supplieritem.SupplieritemMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
@ -29,8 +21,9 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.supplieritem.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
;
/**
@ -71,12 +64,6 @@ public class SupplieritemServiceImpl implements SupplieritemService {
supplieritemMapper.deleteById(id);
}
private void validateSupplieritemExists(Long id) {
if (supplieritemMapper.selectById(id) == null) {
throw exception(SUPPLIERITEM_NOT_EXISTS);
}
}
@Override
public SupplieritemDO getSupplieritem(Long id) {
return supplieritemMapper.selectById(id);
@ -99,7 +86,7 @@ public class SupplieritemServiceImpl implements SupplieritemService {
public List<SupplieriteamImportExcelVo> importSupplieriteamList(List<SupplieriteamImportExcelVo> supplieriteams, Integer mode, boolean updatePart) {
if (CollUtil.isEmpty(supplieriteams)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(SUPPLIERITEM_IMPORT_LIST_IS_EMPTY);
}
List<SupplieriteamImportExcelVo> errorList = new ArrayList<>();
supplieriteams.forEach(supplieriteam -> {
@ -136,10 +123,10 @@ public class SupplieritemServiceImpl implements SupplieritemService {
String available) {
// 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确
DataPermissionUtils.executeIgnore(() -> {
validateSupplieriteampExists(id);
validateSupplieritemExists(id);
// 校验code唯一
validateItemCodeExists(id,itemcode);
validateSupperCodeExists(suppliercode);
validateItemCodeExists(itemcode);
validatePackunitExists(packunit);
validatePackQtyExists(packqty);
validateAvailableExists(available);
@ -147,12 +134,8 @@ public class SupplieritemServiceImpl implements SupplieritemService {
});
}
@VisibleForTesting
private void validateSupplieriteampExists(Long id) {
if (id == null) {
return;
}
SupplieritemDO supplieritem = supplieritemMapper.selectById(id);
if (supplieritem == null) {
private void validateSupplieritemExists(Long id) {
if (supplieritemMapper.selectById(id) == null) {
throw exception(SUPPLIERITEM_NOT_EXISTS);
}
}
@ -164,10 +147,24 @@ public class SupplieritemServiceImpl implements SupplieritemService {
}
@VisibleForTesting
private void validateItemCodeExists(String itemcode) {
private void validateItemCodeExists(Long id,String itemcode) {
if (itemcode.isEmpty()) {
throw exception(SUPPLIERITEM_ITEM_CODE_NOT_EXISTS);
}
if (StrUtil.isBlank(itemcode)) {
return;
}
SupplieritemDO supplieritemDO = supplieritemMapper.selectByItemcodeCode(itemcode);
if (supplieritemDO == null) {
return;
}
// 如果 id 为空,说明不用比较是否为相同 id 的用户
if (id == null) {
throw exception(SUPPLIERITEM_ITEM_CODE_EXISTS);
}
if (!supplieritemDO.getId().equals(id)) {
throw exception(SUPPLIERITEM_ITEM_CODE_EXISTS);
}
}

58
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/systemcalendar/SystemcalendarServiceImpl.java

@ -1,19 +1,12 @@
package com.win.module.wms.service.systemcalendar;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.google.common.annotations.VisibleForTesting;
import com.win.framework.common.exception.ServiceException;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.datapermission.core.util.DataPermissionUtils;
import com.win.module.wms.controller.systemcalendar.vo.SystemcalendarCreateReqVO;
import com.win.module.wms.controller.systemcalendar.vo.SystemcalendarExportReqVO;
import com.win.module.wms.controller.systemcalendar.vo.SystemcalendarPageReqVO;
import com.win.module.wms.controller.systemcalendar.vo.SystemcalendarUpdateReqVO;
import com.win.module.wms.controller.systemcalendar.vo.SystemcalendarImportExcelVo;
import com.win.module.wms.controller.systemcalendar.vo.*;
import com.win.module.wms.convert.systemcalendar.SystemcalendarConvert;
import com.win.module.wms.convert.systemcalendar.SystemcalendarConvert;
import com.win.module.wms.dal.dataobject.systemcalendar.SystemcalendarDO;
import com.win.module.wms.dal.dataobject.systemcalendar.SystemcalendarDO;
import com.win.module.wms.dal.mysql.systemcalendar.SystemcalendarMapper;
import org.springframework.stereotype.Service;
@ -26,10 +19,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.systemcalendar.ErrorCodeConstants.SYSTEMCALENDAR_NOT_EXISTS;
import static com.win.module.wms.enums.systemcalendar.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 系统日历 Service 实现类
*
@ -68,12 +58,6 @@ public class SystemcalendarServiceImpl implements SystemcalendarService {
systemcalendarMapper.deleteById(id);
}
private void validateSystemcalendarExists(Long id) {
if (systemcalendarMapper.selectById(id) == null) {
throw exception(SYSTEMCALENDAR_NOT_EXISTS);
}
}
@Override
public SystemcalendarDO getSystemcalendar(Long id) {
return systemcalendarMapper.selectById(id);
@ -95,7 +79,7 @@ public class SystemcalendarServiceImpl implements SystemcalendarService {
}
public List<SystemcalendarImportExcelVo> importSystemcalendarList(List<SystemcalendarImportExcelVo> systemcalendars, Integer mode, boolean updatePart) {
if (CollUtil.isEmpty(systemcalendars)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(SYSTEMCALENDAR_IMPORT_LIST_IS_EMPTY);
}
List<SystemcalendarImportExcelVo> errorList = new ArrayList<>();
systemcalendars.forEach(systemcalendar -> {
@ -110,7 +94,7 @@ public class SystemcalendarServiceImpl implements SystemcalendarService {
}
// 判断如果不存在,在进行插入
SystemcalendarDO existSystemcalendar = systemcalendarMapper.selectByMoudule(systemcalendar.getModule());
SystemcalendarDO existSystemcalendar = null;
if (existSystemcalendar == null&& mode != 3) {
systemcalendarMapper.insert(SystemcalendarConvert.INSTANCE.convert(systemcalendar));
}
@ -130,42 +114,24 @@ public class SystemcalendarServiceImpl implements SystemcalendarService {
private void validateSystemcalendarForCreateOrUpdate(Long id, String mouble, String available) {
// 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确
DataPermissionUtils.executeIgnore(() -> {
validateSystemcalendarpExists(id);
validateSystemcalendarExists(id);
// 校验code唯一
validateCodeExists(id,mouble);
validateMoubleExists(mouble);
validateAvailableExists(available);
});
}
@VisibleForTesting
private void validateSystemcalendarpExists(Long id) {
if (id == null) {
return;
}
SystemcalendarDO systemcalendar = systemcalendarMapper.selectById(id);
if (systemcalendar == null) {
throw exception(SYSTEMCALENDAR_MOUBLE_EXISTS);
private void validateSystemcalendarExists(Long id) {
if (systemcalendarMapper.selectById(id) == null) {
throw exception(SYSTEMCALENDAR_NOT_EXISTS);
}
}
@VisibleForTesting
private void validateCodeExists(Long id,String mouble) {
if (mouble.isEmpty()) {
throw exception(SYSTEMCALENDAR_MOUBLE_EXISTS);
}
if (StrUtil.isBlank(mouble)) {
return;
}
SystemcalendarDO systemcalendar = systemcalendarMapper.selectByMoudule(mouble);
if (systemcalendar == null) {
return;
}
// 如果 id 为空,说明不用比较是否为相同 id 的用户
if (id == null) {
throw exception(SYSTEMCALENDAR_MOUBLE_EXISTS);
}
if (!systemcalendar.getId().equals(id)) {
throw exception(SYSTEMCALENDAR_MOUBLE_EXISTS);
private void validateMoubleExists(String mouble) {
if (mouble == null) {
throw exception(SYSTEMCALENDAR_MOUBLE_NOT_EXISTS);
}
}
@VisibleForTesting

51
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/team/TeamServiceImpl.java

@ -4,32 +4,23 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.google.common.annotations.VisibleForTesting;
import com.win.framework.common.exception.ServiceException;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.datapermission.core.util.DataPermissionUtils;
import com.win.module.wms.controller.team.vo.TeamCreateReqVO;
import com.win.module.wms.controller.team.vo.TeamExportReqVO;
import com.win.module.wms.controller.team.vo.TeamPageReqVO;
import com.win.module.wms.controller.team.vo.TeamUpdateReqVO;
import com.win.module.wms.controller.team.vo.TeamImportExcelVo;
import com.win.module.wms.controller.team.vo.*;
import com.win.module.wms.convert.team.TeamConvert;
import com.win.module.wms.dal.dataobject.team.TeamDO;
import com.win.module.wms.dal.mysql.team.TeamMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.validation.annotation.Validated;
import java.util.*;
import com.win.module.wms.dal.dataobject.team.TeamDO;
import com.win.framework.common.pojo.PageResult;
import com.win.module.wms.convert.team.TeamConvert;
import com.win.module.wms.dal.mysql.team.TeamMapper;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.team.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 班组 Service 实现类
@ -69,12 +60,6 @@ public class TeamServiceImpl implements TeamService {
teamMapper.deleteById(id);
}
private void validateTeamExists(Long id) {
if (teamMapper.selectById(id) == null) {
throw exception(TEAM_NOT_EXISTS);
}
}
@Override
public TeamDO getTeam(Long id) {
return teamMapper.selectById(id);
@ -97,7 +82,7 @@ public class TeamServiceImpl implements TeamService {
public List<TeamImportExcelVo> importTeamList(List<TeamImportExcelVo> teams, Integer mode, boolean updatePart) {
if (CollUtil.isEmpty(teams)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(TEAM_IMPORT_LIST_IS_EMPTY);
}
List<TeamImportExcelVo> errorList = new ArrayList<>();
teams.forEach(team -> {
@ -132,20 +117,16 @@ public class TeamServiceImpl implements TeamService {
private void validateTeamForCreateOrUpdate(Long id, String code, String available) {
// 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确
DataPermissionUtils.executeIgnore(() -> {
validateTeampExists(id);
validateTeamExists(id);
// 校验code唯一
validateCodeExists(id,code);
validateAvailableExists(available);
});
}
@VisibleForTesting
private void validateTeampExists(Long id) {
if (id == null) {
return;
}
TeamDO team = teamMapper.selectById(id);
if (team == null) {
private void validateTeamExists(Long id) {
if (teamMapper.selectById(id) == null) {
throw exception(TEAM_NOT_EXISTS);
}
}
@ -153,7 +134,7 @@ public class TeamServiceImpl implements TeamService {
@VisibleForTesting
private void validateCodeExists(Long id,String code) {
if (code.isEmpty()) {
throw exception(TEAM_CODE_EXISTSNO);
throw exception(TEAM_CODE_NOT_EXISTS);
}
if (StrUtil.isBlank(code)) {
return;
@ -164,10 +145,10 @@ public class TeamServiceImpl implements TeamService {
}
// 如果 id 为空,说明不用比较是否为相同 id 的用户
if (id == null) {
throw exception(TEAM_CODE_EXISTSNO);
throw exception(TEAM_CODE_EXISTS);
}
if (!team.getId().equals(id)) {
throw exception(TEAM_CODE_EXISTSNO);
throw exception(TEAM_CODE_EXISTS);
}
}
@VisibleForTesting

46
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/transactiontype/TransactiontypeServiceImpl.java

@ -4,32 +4,23 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.google.common.annotations.VisibleForTesting;
import com.win.framework.common.exception.ServiceException;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.datapermission.core.util.DataPermissionUtils;
import com.win.module.wms.controller.transactiontype.vo.TransactiontypeCreateReqVO;
import com.win.module.wms.controller.transactiontype.vo.TransactiontypeExportReqVO;
import com.win.module.wms.controller.transactiontype.vo.TransactiontypePageReqVO;
import com.win.module.wms.controller.transactiontype.vo.TransactiontypeUpdateReqVO;
import com.win.module.wms.controller.transactiontype.vo.TransactiontypeImportExcelVo;
import com.win.module.wms.controller.transactiontype.vo.*;
import com.win.module.wms.convert.transactiontype.TransactiontypeConvert;
import com.win.module.wms.dal.dataobject.transactiontype.TransactiontypeDO;
import com.win.module.wms.dal.mysql.transactiontype.TransactiontypeMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.validation.annotation.Validated;
import java.util.*;
import com.win.framework.common.pojo.PageResult;
import com.win.module.wms.dal.mysql.transactiontype.TransactiontypeMapper;
;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
import static com.win.module.wms.enums.transactiontype.ErrorCodeConstants.*;
import static com.win.module.wms.enums.transactiontype.ErrorCodeConstants.TRANSACTIONTYPE_NOT_EXISTS;
/**
@ -70,12 +61,6 @@ public class TransactiontypeServiceImpl implements TransactiontypeService {
transactiontypeMapper.deleteById(id);
}
private void validateTransactiontypeExists(Long id) {
if (transactiontypeMapper.selectById(id) == null) {
throw exception(TRANSACTIONTYPE_NOT_EXISTS);
}
}
@Override
public TransactiontypeDO getTransactiontype(Long id) {
return transactiontypeMapper.selectById(id);
@ -97,7 +82,7 @@ public class TransactiontypeServiceImpl implements TransactiontypeService {
}
public List<TransactiontypeImportExcelVo> importTransactiontypeList(List<TransactiontypeImportExcelVo> transactiontypes, Integer mode, boolean updatePart) {
if (CollUtil.isEmpty(transactiontypes)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(TRANSACTIONTYPE_IMPORT_LIST_IS_EMPTY);
}
List<TransactiontypeImportExcelVo> errorList = new ArrayList<>();
transactiontypes.forEach(transactiontype -> {
@ -132,20 +117,15 @@ public class TransactiontypeServiceImpl implements TransactiontypeService {
private void validateTransactiontypeForCreateOrUpdate(Long id, String code, String available) {
// 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确
DataPermissionUtils.executeIgnore(() -> {
validateTransactiontypepExists(id);
validateTransactiontypeExists(id);
// 校验code唯一
validateCodeExists(id,code);
validateAvailableExists(available);
});
}
@VisibleForTesting
private void validateTransactiontypepExists(Long id) {
if (id == null) {
return;
}
TransactiontypeDO transactiontype = transactiontypeMapper.selectById(id);
if (transactiontype == null) {
private void validateTransactiontypeExists(Long id) {
if (transactiontypeMapper.selectById(id) == null) {
throw exception(TRANSACTIONTYPE_NOT_EXISTS);
}
}
@ -153,7 +133,7 @@ public class TransactiontypeServiceImpl implements TransactiontypeService {
@VisibleForTesting
private void validateCodeExists(Long id,String code) {
if (code.isEmpty()) {
throw exception(CODE_EXISTSNO);
throw exception(TRANSACTIONTYPE_CODE_NOT_EXISTS);
}
if (StrUtil.isBlank(code)) {
return;
@ -167,7 +147,7 @@ public class TransactiontypeServiceImpl implements TransactiontypeService {
throw exception(TRANSACTIONTYPE_CODE_EXISTS);
}
if (!transactiontype.getId().equals(id)) {
throw exception(CODE_EXISTSNO);
throw exception(TRANSACTIONTYPE_CODE_EXISTS);
}
}
@VisibleForTesting

33
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/warehouse/WarehouseServiceImpl.java

@ -11,28 +11,18 @@ import com.win.module.wms.controller.warehouse.vo.WarehouseExportReqVO;
import com.win.module.wms.controller.warehouse.vo.WarehousePageReqVO;
import com.win.module.wms.controller.warehouse.vo.WarehouseUpdateReqVO;
import com.win.module.wms.controller.warehouse.vo.WarehouseImportExcelVo;
import com.win.module.wms.controller.warehouse.vo.WarehouseImportExcelVo;
import com.win.module.wms.convert.warehouse.WarehouseConvert;
import com.win.module.wms.convert.warehouse.WarehouseConvert;
import com.win.module.wms.convert.warehouse.WarehouseConvert;
import com.win.module.wms.convert.workshop.WorkshopConvert;
import com.win.module.wms.dal.dataobject.warehouse.WarehouseDO;
import com.win.module.wms.dal.dataobject.warehouse.WarehouseDO;
import com.win.module.wms.dal.dataobject.warehouse.WarehouseDO;
import com.win.module.wms.dal.mysql.warehouse.WarehouseMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.warehouse.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
@ -76,12 +66,6 @@ public class WarehouseServiceImpl implements WarehouseService {
warehouseMapper.deleteById(id);
}
private void validateWarehouseExists(Long id) {
if (warehouseMapper.selectById(id) == null) {
throw exception(WAREHOUSE_NOT_EXISTS);
}
}
@Override
public WarehouseDO getWarehouse(Long id) {
return warehouseMapper.selectById(id);
@ -104,7 +88,7 @@ public class WarehouseServiceImpl implements WarehouseService {
public List<WarehouseImportExcelVo> importWarehouseList(List<WarehouseImportExcelVo> warehouses, Integer mode, boolean updatePart) {
if (CollUtil.isEmpty(warehouses)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(WAREHOUSE_IMPORT_LIST_IS_EMPTY);
}
List<WarehouseImportExcelVo> errorList = new ArrayList<>();
warehouses.forEach(warehouse -> {
@ -139,20 +123,15 @@ public class WarehouseServiceImpl implements WarehouseService {
private void validateWarehouseForCreateOrUpdate(Long id, String code, String available) {
// 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确
DataPermissionUtils.executeIgnore(() -> {
validateWarehousepExists(id);
validateWarehouseExists(id);
// 校验code唯一
validateCodeExists(id,code);
validateAvailableExists(available);
});
}
@VisibleForTesting
private void validateWarehousepExists(Long id) {
if (id == null) {
return;
}
WarehouseDO warehouse = warehouseMapper.selectById(id);
if (warehouse == null) {
private void validateWarehouseExists(Long id) {
if (warehouseMapper.selectById(id) == null) {
throw exception(WAREHOUSE_NOT_EXISTS);
}
}
@ -160,7 +139,7 @@ public class WarehouseServiceImpl implements WarehouseService {
@VisibleForTesting
private void validateCodeExists(Long id,String code) {
if (code.isEmpty()) {
throw exception(WAREHOUSE_CODE_EXISTS);
throw exception(WAREHOUSE_CODE_NOT_EXISTS);
}
if (StrUtil.isBlank(code)) {
return;

37
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/workshop/WorkshopServiceImpl.java

@ -1,20 +1,15 @@
package com.win.module.wms.service.workshop;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.util.StrUtil;
import com.google.common.annotations.VisibleForTesting;
import com.win.framework.common.exception.ServiceException;
import com.win.framework.common.pojo.PageResult;
import com.win.framework.datapermission.core.util.DataPermissionUtils;
import com.win.module.wms.controller.itembasic.vo.ItembasicImportExcelVo;
import com.win.module.wms.controller.workshop.vo.*;
import com.win.module.wms.convert.itembasic.ItembasicConvert;
import com.win.module.wms.convert.workshop.WorkshopConvert;
import com.win.module.wms.dal.dataobject.itembasic.ItembasicDO;
import com.win.module.wms.dal.dataobject.workshop.WorkshopDO;
import com.win.module.wms.dal.mysql.workshop.WorkshopMapper;
import net.sf.jsqlparser.expression.DateTimeLiteralExpression;
import org.springframework.stereotype.Service;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.validation.annotation.Validated;
@ -25,10 +20,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.workshop.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 车间 Service 实现类
@ -69,12 +61,6 @@ public class WorkshopServiceImpl implements WorkshopService {
workshopMapper.deleteById(id);
}
private void validateWorkshopExists(Long id) {
if (workshopMapper.selectById(id) == null) {
throw exception(WORKSHOP_NOT_EXISTS);
}
}
@Override
public WorkshopDO getWorkshop(Long id) {
return workshopMapper.selectById(id);
@ -97,7 +83,7 @@ public class WorkshopServiceImpl implements WorkshopService {
public List<WorkshopImportExcelVo> importUserList(List<WorkshopImportExcelVo> importWork, Integer mode, boolean updatePart) {
if (CollUtil.isEmpty(importWork)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(WORKSHOP_IMPORT_LIST_IS_EMPTY);
}
List<WorkshopImportExcelVo> errorList = new ArrayList<>();
importWork.forEach(importWorkshop -> {
@ -132,20 +118,15 @@ public class WorkshopServiceImpl implements WorkshopService {
private void validateWorkshopForCreateOrUpdate(Long id, String code, String available) {
// 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确
DataPermissionUtils.executeIgnore(() -> {
validateWorkshoppExists(id);
validateWorkshopExists(id);
// 校验code唯一
validateCodeExists(id,code);
validateAvailableExists(available);
});
}
@VisibleForTesting
private void validateWorkshoppExists(Long id) {
if (id == null) {
return;
}
WorkshopDO workshop = workshopMapper.selectById(id);
if (workshop == null) {
private void validateWorkshopExists(Long id) {
if (workshopMapper.selectById(id) == null) {
throw exception(WORKSHOP_NOT_EXISTS);
}
}
@ -153,7 +134,7 @@ public class WorkshopServiceImpl implements WorkshopService {
@VisibleForTesting
private void validateCodeExists(Long id,String code) {
if (code.isEmpty()) {
throw exception(CODE_EXISTSNO);
throw exception(WORKSHOP_CODE_NOT_EXISTS);
}
if (StrUtil.isBlank(code)) {
return;
@ -164,16 +145,16 @@ public class WorkshopServiceImpl implements WorkshopService {
}
// 如果 id 为空,说明不用比较是否为相同 id 的用户
if (id == null) {
throw exception(CODE_EXISTS);
throw exception(WORKSHOP_CODE_EXISTS);
}
if (!workshop.getId().equals(id)) {
throw exception(CODE_EXISTS);
throw exception(WORKSHOP_CODE_EXISTS);
}
}
@VisibleForTesting
private void validateAvailableExists(String available) {
if (available == null) {
throw exception(AVAIABLE_NOT_EXISTS);
throw exception(WORKSHOP_AVAIABLE_NOT_EXISTS);
}
}

7
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/workstation/WorkstationServiceImpl.java

@ -21,8 +21,7 @@ import java.util.Collection;
import java.util.List;
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.win.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIST_IS_EMPTY;
import static com.win.module.wms.enums.workstation.ErrorCodeConstants.*;
import static com.win.module.wms.enums.ErrorCodeConstants.*;
/**
* 工位 Service 实现类
@ -89,7 +88,7 @@ public class WorkstationServiceImpl implements WorkstationService {
@Transactional(rollbackFor = Exception.class) // 添加事务,异常则回滚所有导入
public List<WorkstationImportExcelVo> importWorkstationList(List<WorkstationImportExcelVo> workstations, Integer mode,Boolean updatePart) {
if (CollUtil.isEmpty(workstations)) {
throw exception(USER_IMPORT_LIST_IS_EMPTY);
throw exception(WORKSTATION_IMPORT_LIST_IS_EMPTY);
}
List<WorkstationImportExcelVo> errorList = new ArrayList<>();
workstations.forEach(workstation -> {
@ -159,7 +158,7 @@ public class WorkstationServiceImpl implements WorkstationService {
throw exception(WORKSTATION_CODE_EXISTS);
}
if (!workstation.getId().equals(id)) {
throw exception(WORKSTATION_AVAIABLE_NOT_EXISTS);
throw exception(WORKSTATION_CODE_EXISTS);
}
}
@VisibleForTesting

Loading…
Cancel
Save