From f6ce79358aed712c2d6983d07efa40f0f095d980 Mon Sep 17 00:00:00 2001 From: dimengzhe Date: Mon, 6 May 2024 11:17:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AF=E5=BE=AE?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yxt-base-biz/pom.xml | 134 +++++++++ .../java/com/yxt/base/YxtBaseApplication.java | 24 ++ .../com/yxt/base/apiadmin/AdminHomeRest.java | 16 + .../apiadmin/base/BaseCategoryBrandRest.java | 55 ++++ .../apiadmin/base/BaseGoodsBrandRest.java | 60 ++++ .../apiadmin/base/BaseGoodsSkuExtendRest.java | 55 ++++ .../base/apiadmin/base/BaseGoodsSkuRest.java | 81 +++++ .../apiadmin/base/BaseGoodsSpuDetailRest.java | 53 ++++ .../base/apiadmin/base/BaseGoodsSpuRest.java | 58 ++++ .../base/apiadmin/base/BaseGoodsTypeRest.java | 61 ++++ .../base/apiadmin/base/BaseGoodsUnitRest.java | 61 ++++ .../apiadmin/base/BaseManufacturerRest.java | 69 +++++ .../base/apiadmin/base/BaseSpecGroupRest.java | 57 ++++ .../base/apiadmin/base/BaseSpecParamRest.java | 57 ++++ .../apiadmin/base/BaseSupplierBankRest.java | 89 ++++++ .../apiadmin/base/BaseSupplierFileRest.java | 89 ++++++ .../apiadmin/base/BaseSupplierInfoRest.java | 97 ++++++ .../apiadmin/base/BaseSupplierTypeRest.java | 89 ++++++ .../java/com/yxt/base/apiwx/WxHomeRest.java | 10 + .../biz/base/basebrandinfo/BaseBrandInfo.java | 21 ++ .../base/basebrandinfo/BaseBrandInfoDto.java | 27 ++ .../basebrandinfo/BaseBrandInfoMapper.java | 18 ++ .../basebrandinfo/BaseBrandInfoMapper.xml | 15 + .../basebrandinfo/BaseBrandInfoQuery.java | 13 + .../basebrandinfo/BaseBrandInfoService.java | 127 ++++++++ .../base/basebrandinfo/BaseBrandInfoVo.java | 32 ++ .../basecategorybrand/BaseCategoryBrand.java | 15 + .../BaseCategoryBrandDto.java | 22 ++ .../BaseCategoryBrandMapper.java | 23 ++ .../BaseCategoryBrandMapper.xml | 29 ++ .../BaseCategoryBrandQuery.java | 13 + .../BaseCategoryBrandService.java | 115 ++++++++ .../BaseCategoryBrandVo.java | 24 ++ .../biz/base/basegoodssku/BaseGoodsSku.java | 21 ++ .../basegoodssku/BaseGoodsSkuDetailsVo.java | 69 +++++ .../base/basegoodssku/BaseGoodsSkuDto.java | 31 ++ .../base/basegoodssku/BaseGoodsSkuMapper.java | 30 ++ .../base/basegoodssku/BaseGoodsSkuMapper.xml | 75 +++++ .../BaseGoodsSkuPurSelectList.java | 35 +++ .../BaseGoodsSkuPurSelectQuery.java | 30 ++ .../base/basegoodssku/BaseGoodsSkuQuery.java | 13 + .../BaseGoodsSkuReturnSelectList.java | 21 ++ .../basegoodssku/BaseGoodsSkuSelectList.java | 36 +++ .../basegoodssku/BaseGoodsSkuSelectQuery.java | 15 + .../basegoodssku/BaseGoodsSkuService.java | 233 +++++++++++++++ .../biz/base/basegoodssku/BaseGoodsSkuVo.java | 38 +++ .../biz/base/basegoodssku/GoodsSkuQuery.java | 18 ++ .../biz/base/basegoodssku/GoodsSkuVo.java | 50 ++++ .../BaseGoodsSkuExtend.java | 34 +++ .../BaseGoodsSkuExtendDto.java | 46 +++ .../BaseGoodsSkuExtendMapper.java | 20 ++ .../BaseGoodsSkuExtendMapper.xml | 28 ++ .../BaseGoodsSkuExtendQuery.java | 13 + .../BaseGoodsSkuExtendService.java | 140 +++++++++ .../BaseGoodsSkuExtendVo.java | 53 ++++ .../biz/base/basegoodsskuextend/UrlsVo.java | 12 + .../biz/base/basegoodsspu/BaseGoodsSpu.java | 32 ++ .../base/basegoodsspu/BaseGoodsSpuDto.java | 47 +++ .../base/basegoodsspu/BaseGoodsSpuMapper.java | 19 ++ .../base/basegoodsspu/BaseGoodsSpuMapper.xml | 27 ++ .../base/basegoodsspu/BaseGoodsSpuQuery.java | 13 + .../basegoodsspu/BaseGoodsSpuService.java | 172 +++++++++++ .../biz/base/basegoodsspu/BaseGoodsSpuVo.java | 51 ++++ .../BaseGoodsSpuDetail.java | 20 ++ .../BaseGoodsSpuDetailDto.java | 29 ++ .../BaseGoodsSpuDetailMapper.java | 20 ++ .../BaseGoodsSpuDetailMapper.xml | 24 ++ .../BaseGoodsSpuDetailQuery.java | 13 + .../BaseGoodsSpuDetailService.java | 107 +++++++ .../BaseGoodsSpuDetailVo.java | 35 +++ .../biz/base/basegoodstype/BaseGoodsType.java | 22 ++ .../base/basegoodstype/BaseGoodsTypeDto.java | 33 +++ .../basegoodstype/BaseGoodsTypeMapper.java | 17 ++ .../basegoodstype/BaseGoodsTypeMapper.xml | 15 + .../basegoodstype/BaseGoodsTypeQuery.java | 13 + .../basegoodstype/BaseGoodsTypeService.java | 120 ++++++++ .../base/basegoodstype/BaseGoodsTypeVo.java | 38 +++ .../biz/base/basegoodsunit/BaseGoodsUnit.java | 14 + .../base/basegoodsunit/BaseGoodsUnitDto.java | 27 ++ .../basegoodsunit/BaseGoodsUnitMapper.java | 17 ++ .../basegoodsunit/BaseGoodsUnitMapper.xml | 15 + .../basegoodsunit/BaseGoodsUnitQuery.java | 13 + .../basegoodsunit/BaseGoodsUnitService.java | 107 +++++++ .../base/basegoodsunit/BaseGoodsUnitVo.java | 27 ++ .../basemanufacturer/BaseManufacturer.java | 20 ++ .../basemanufacturer/BaseManufacturerDto.java | 35 +++ .../BaseManufacturerMapper.java | 21 ++ .../BaseManufacturerMapper.xml | 20 ++ .../BaseManufacturerQuery.java | 13 + .../BaseManufacturerService.java | 111 +++++++ .../basemanufacturer/BaseManufacturerVo.java | 36 +++ .../biz/base/basespecgroup/BaseSpecGroup.java | 15 + .../base/basespecgroup/BaseSpecGroupDto.java | 22 ++ .../basespecgroup/BaseSpecGroupMapper.java | 23 ++ .../basespecgroup/BaseSpecGroupMapper.xml | 27 ++ .../basespecgroup/BaseSpecGroupQuery.java | 13 + .../basespecgroup/BaseSpecGroupService.java | 115 ++++++++ .../base/basespecgroup/BaseSpecGroupVo.java | 23 ++ .../biz/base/basespecparam/BaseSpecParam.java | 22 ++ .../base/basespecparam/BaseSpecParamDto.java | 30 ++ .../basespecparam/BaseSpecParamMapper.java | 23 ++ .../basespecparam/BaseSpecParamMapper.xml | 29 ++ .../basespecparam/BaseSpecParamQuery.java | 13 + .../basespecparam/BaseSpecParamService.java | 122 ++++++++ .../base/basespecparam/BaseSpecParamVo.java | 30 ++ .../basesupplierBank/BaseSupplierBank.java | 76 +++++ .../BaseSupplierBankDetailsVo.java | 77 +++++ .../basesupplierBank/BaseSupplierBankDto.java | 77 +++++ .../BaseSupplierBankMapper.java | 67 +++++ .../BaseSupplierBankMapper.xml | 13 + .../BaseSupplierBankQuery.java | 75 +++++ .../BaseSupplierBankService.java | 105 +++++++ .../basesupplierBank/BaseSupplierBankVo.java | 77 +++++ .../basesupplierfile/BaseSupplierFile.java | 66 +++++ .../BaseSupplierFileDetailsVo.java | 66 +++++ .../basesupplierfile/BaseSupplierFileDto.java | 66 +++++ .../BaseSupplierFileMapper.java | 60 ++++ .../BaseSupplierFileMapper.xml | 13 + .../BaseSupplierFileQuery.java | 64 ++++ .../BaseSupplierFileService.java | 94 ++++++ .../basesupplierfile/BaseSupplierFileVo.java | 66 +++++ .../basesupplierinfo/BaseSupplierInfo.java | 112 +++++++ .../BaseSupplierInfoChoice.java | 54 ++++ .../BaseSupplierInfoDetailsVo.java | 117 ++++++++ .../basesupplierinfo/BaseSupplierInfoDto.java | 117 ++++++++ .../BaseSupplierInfoMapper.java | 67 +++++ .../BaseSupplierInfoMapper.xml | 13 + .../BaseSupplierInfoQuery.java | 63 ++++ .../BaseSupplierInfoService.java | 168 +++++++++++ .../basesupplierinfo/BaseSupplierInfoVo.java | 66 +++++ .../basesuppliertype/BaseSupplierType.java | 62 ++++ .../BaseSupplierTypeDetailsVo.java | 62 ++++ .../basesuppliertype/BaseSupplierTypeDto.java | 62 ++++ .../BaseSupplierTypeMapper.java | 60 ++++ .../BaseSupplierTypeMapper.xml | 13 + .../BaseSupplierTypeQuery.java | 60 ++++ .../BaseSupplierTypeService.java | 94 ++++++ .../basesuppliertype/BaseSupplierTypeVo.java | 62 ++++ .../java/com/yxt/base/biz/package-info.java | 4 + .../com/yxt/base/config/package-info.java | 4 + .../java/com/yxt/base/feign/package-info.java | 4 + .../sysorganization/SysOrganizationFeign.java | 35 +++ .../sysorganization/SysOrganizationVo.java | 88 ++++++ .../portal/sysstafforg/SysStaffOrgFeign.java | 25 ++ .../wms/wmsinventory/WmsGoodsInventoryVo.java | 19 ++ .../wms/wmsinventory/WmsInventoryFeign.java | 20 ++ .../java/com/yxt/base/utils/DoubleUtils.java | 93 ++++++ .../java/com/yxt/base/utils/PinYinUtils.java | 277 ++++++++++++++++++ .../java/com/yxt/base/utils/StyleUtils.java | 89 ++++++ .../src/main/resources/application-dev.yml | 30 ++ .../src/main/resources/application-pro.yml | 27 ++ .../src/main/resources/application-test.yml | 31 ++ .../src/main/resources/application.yml | 43 +++ .../src/main/resources/logback-spring.xml | 50 ++++ .../com/yxt/base/YxtBaseApplicationTest.java | 24 ++ 155 files changed, 7797 insertions(+) create mode 100644 yxt-base-biz/pom.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/YxtBaseApplication.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/AdminHomeRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseCategoryBrandRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsBrandRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSkuExtendRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSkuRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSpuDetailRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSpuRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsTypeRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsUnitRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseManufacturerRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSpecGroupRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSpecParamRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierBankRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierFileRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierInfoRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierTypeRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/apiwx/WxHomeRest.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoDto.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoMapper.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoMapper.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoService.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrand.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandDto.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandMapper.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandMapper.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandService.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSku.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuDetailsVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuDto.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuMapper.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuMapper.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuPurSelectList.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuPurSelectQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuReturnSelectList.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuSelectList.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuSelectQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuService.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/GoodsSkuQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/GoodsSkuVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtend.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendDto.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendMapper.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendMapper.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendService.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/UrlsVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpu.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuDto.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuMapper.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuMapper.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuService.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetail.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailDto.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailMapper.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailMapper.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailService.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsType.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeDto.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeMapper.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeMapper.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeService.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnit.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitDto.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitMapper.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitMapper.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitService.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturer.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerDto.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerMapper.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerMapper.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerService.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroup.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupDto.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupMapper.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupMapper.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupService.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParam.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamDto.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamMapper.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamMapper.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamService.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBank.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankDetailsVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankDto.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankMapper.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankMapper.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankService.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFile.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileDetailsVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileDto.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileMapper.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileMapper.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileService.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoChoice.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoDetailsVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoDto.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoMapper.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoMapper.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoService.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierType.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeDetailsVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeDto.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeMapper.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeMapper.xml create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeQuery.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeService.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/biz/package-info.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/config/package-info.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/feign/package-info.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/feign/portal/sysorganization/SysOrganizationFeign.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/feign/portal/sysorganization/SysOrganizationVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/feign/portal/sysstafforg/SysStaffOrgFeign.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/feign/wms/wmsinventory/WmsGoodsInventoryVo.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/feign/wms/wmsinventory/WmsInventoryFeign.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/utils/DoubleUtils.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/utils/PinYinUtils.java create mode 100644 yxt-base-biz/src/main/java/com/yxt/base/utils/StyleUtils.java create mode 100644 yxt-base-biz/src/main/resources/application-dev.yml create mode 100644 yxt-base-biz/src/main/resources/application-pro.yml create mode 100644 yxt-base-biz/src/main/resources/application-test.yml create mode 100644 yxt-base-biz/src/main/resources/application.yml create mode 100644 yxt-base-biz/src/main/resources/logback-spring.xml create mode 100644 yxt-base-biz/src/test/java/com/yxt/base/YxtBaseApplicationTest.java diff --git a/yxt-base-biz/pom.xml b/yxt-base-biz/pom.xml new file mode 100644 index 0000000000..9afda93612 --- /dev/null +++ b/yxt-base-biz/pom.xml @@ -0,0 +1,134 @@ + + + + + com.yxt + yxt-parent + 0.0.1 + + + 4.0.0 + + yxt-base-biz + com.yxt.base + 2.0.1 + + + + com.yxt + yxt-common-base + 0.0.1 + + + + org.springframework.boot + spring-boot-starter-web + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + + + mysql + mysql-connector-java + runtime + + + + com.baomidou + mybatis-plus-boot-starter + + + com.baomidou + mybatis-plus-annotation + + + junit + junit + compile + + + + org.projectlombok + lombok + 1.18.26 + true + + + org.springframework.boot + spring-boot-starter-test + test + + + + + cn.dev33 + sa-token-spring-boot-starter + 1.37.0 + + + cn.hutool + hutool-all + 5.8.23 + + + cn.hutool + hutool-core + 5.8.23 + + + com.google.zxing + core + 3.5.2 + + + com.alibaba + easyexcel + 3.3.2 + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.5.6 + + + + repackage + + + + + + + + src/main/java + + **/*Mapper.xml + + + + src/main/resources + + **/*.* + + false + + + + + diff --git a/yxt-base-biz/src/main/java/com/yxt/base/YxtBaseApplication.java b/yxt-base-biz/src/main/java/com/yxt/base/YxtBaseApplication.java new file mode 100644 index 0000000000..872a2e5774 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/YxtBaseApplication.java @@ -0,0 +1,24 @@ +package com.yxt.base; + + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.scheduling.annotation.EnableScheduling; + +/** + * @author dimengzhe + */ +@SpringBootApplication(scanBasePackages = { + "com.yxt.base.config", + "com.yxt.common.base.config", + "com.yxt.base" +}) +// 启用自带定时任务 +@EnableScheduling +@EnableFeignClients(basePackages = {}) +public class YxtBaseApplication { + public static void main(String[] args) { + SpringApplication.run(YxtBaseApplication.class, args); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/AdminHomeRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/AdminHomeRest.java new file mode 100644 index 0000000000..99c3ed5115 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/AdminHomeRest.java @@ -0,0 +1,16 @@ +package com.yxt.base.apiadmin; + +import com.yxt.common.core.result.ResultBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@RestController("com.yxt.base.apiadmin.AdminHomeRest") +@RequestMapping("/apiadmin/home") +public class AdminHomeRest { + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseCategoryBrandRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseCategoryBrandRest.java new file mode 100644 index 0000000000..1d5f5a030c --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseCategoryBrandRest.java @@ -0,0 +1,55 @@ +package com.yxt.base.apiadmin.base; + +import com.yxt.base.biz.base.basecategorybrand.BaseCategoryBrandDto; +import com.yxt.base.biz.base.basecategorybrand.BaseCategoryBrandQuery; +import com.yxt.base.biz.base.basecategorybrand.BaseCategoryBrandService; +import com.yxt.base.biz.base.basecategorybrand.BaseCategoryBrandVo; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author wangpengfei + * @date 2024/4/10 9:57 + */ +@Api(tags = "品牌与商品类别关联") +@RestController +@RequestMapping("/apiadmin/base/basecategorybrand") +public class BaseCategoryBrandRest { + @Autowired + BaseCategoryBrandService baseCategoryBrandService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return baseCategoryBrandService.listPage(pq); + } + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody BaseCategoryBrandDto dto) { + return baseCategoryBrandService.saveOrUpdate(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return baseCategoryBrandService.initialization(sid); + } + + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable("sid") String sid) { + return baseCategoryBrandService.delete(sid); + } + + @ApiOperation("更改可用状态") + @GetMapping("/updateIsEnable/{sid}/{isEnable}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid, @PathVariable("isEnable") String isEnable) { + return baseCategoryBrandService.updateIsEnable(sid, isEnable); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsBrandRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsBrandRest.java new file mode 100644 index 0000000000..cea7df21a8 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsBrandRest.java @@ -0,0 +1,60 @@ +package com.yxt.base.apiadmin.base; + +import com.yxt.base.biz.base.basebrandinfo.*; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 15:49 + */ +@Api(tags = "商品品牌") +@RestController +@RequestMapping("/apiadmin/base/basegoodsbrand") +public class BaseGoodsBrandRest { + + @Autowired + BaseBrandInfoService baseBrandInfoService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return baseBrandInfoService.listPage(pq); + } + @ApiOperation("查询所有的品牌") + @GetMapping("/listAll") + public ResultBean> listAll() { + return baseBrandInfoService.listAll(); + } + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody BaseBrandInfoDto dto) { + return baseBrandInfoService.saveOrUpdate(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return baseBrandInfoService.initialization(sid); + } + + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable("sid") String sid) { + return baseBrandInfoService.delete(sid); + } + + + @ApiOperation("更改可用状态") + @GetMapping("/updateIsEnable/{sid}/{isEnable}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid,@PathVariable("isEnable")String isEnable) { + return baseBrandInfoService.updateIsEnable(sid,isEnable); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSkuExtendRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSkuExtendRest.java new file mode 100644 index 0000000000..8b4fdb6ec2 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSkuExtendRest.java @@ -0,0 +1,55 @@ +package com.yxt.base.apiadmin.base; + +import com.yxt.base.biz.base.basegoodsskuextend.BaseGoodsSkuExtendDto; +import com.yxt.base.biz.base.basegoodsskuextend.BaseGoodsSkuExtendQuery; +import com.yxt.base.biz.base.basegoodsskuextend.BaseGoodsSkuExtendService; +import com.yxt.base.biz.base.basegoodsskuextend.BaseGoodsSkuExtendVo; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author wangpengfei + * @date 2024/3/11 15:05 + */ +@Api(tags = "商品sku扩展") +@RestController +@RequestMapping("/apiadmin/base/basegoodsskuextend") +public class BaseGoodsSkuExtendRest { + + @Autowired + BaseGoodsSkuExtendService baseGoodsSkuExtendService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return baseGoodsSkuExtendService.listPage(pq); + } + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody BaseGoodsSkuExtendDto dto) { + return baseGoodsSkuExtendService.saveOrUpdate(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return baseGoodsSkuExtendService.initialization(sid); + } + + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable("sid") String sid) { + return baseGoodsSkuExtendService.delete(sid); + } + @ApiOperation("更改可用状态") + @GetMapping("/updateIsEnable/{sid}/{isEnable}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid,@PathVariable("isEnable")String isEnable) { + return baseGoodsSkuExtendService.updateIsEnable(sid,isEnable); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSkuRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSkuRest.java new file mode 100644 index 0000000000..40d04bd821 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSkuRest.java @@ -0,0 +1,81 @@ +package com.yxt.base.apiadmin.base; + +import com.yxt.base.biz.base.basegoodssku.*; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/3/11 14:27 + */ +@Api(tags = "商品sku") +@RestController +@RequestMapping("/apiadmin/base/basegoodssku") +public class BaseGoodsSkuRest { + @Autowired + BaseGoodsSkuService baseGoodsSkuService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return baseGoodsSkuService.listPage(pq); + } + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody BaseGoodsSkuDto dto) { + return baseGoodsSkuService.saveOrUpdate(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return baseGoodsSkuService.initialization(sid); + } + + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable("sid") String sid) { + return baseGoodsSkuService.delete(sid); + } + + @ApiOperation("更改可用状态") + @GetMapping("/updateIsEnable/{sid}/{isEnable}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid, @PathVariable("isEnable") String isEnable) { + return baseGoodsSkuService.updateIsEnable(sid, isEnable); + } + + @ApiOperation("获取商品信息") + @GetMapping("/getDetails") + ResultBean getDetails(@RequestParam("sid") String sid) { + return baseGoodsSkuService.getDetails(sid); + } + + @ApiOperation("入库添加商品列表") + @PostMapping("/getSelectList") + ResultBean> getSelectList(@RequestBody PagerQuery pagerQuery) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = baseGoodsSkuService.getSelectList(pagerQuery); + return rb.success().setData(pv); + } + + @ApiOperation("采购商品分页列表") + @PostMapping("/purGoodsListPage") + public ResultBean> purGoodsListPage(@RequestBody PagerQuery pq) { + return baseGoodsSkuService.purGoodsListPage(pq); + } + @ApiOperation("收货单据商品分页列表") + @PostMapping("/getGoodsListPage") + ResultBean> getGoodsListPage(@RequestBody PagerQuery pagerQuery){ + ResultBean> rb = ResultBean.fireFail(); + PagerVo pv = baseGoodsSkuService.getGoodsListPage(pagerQuery); + return rb.success().setData(pv); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSpuDetailRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSpuDetailRest.java new file mode 100644 index 0000000000..4ff38cb563 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSpuDetailRest.java @@ -0,0 +1,53 @@ +package com.yxt.base.apiadmin.base; + +import com.yxt.base.biz.base.basegoodsspudetail.BaseGoodsSpuDetailDto; +import com.yxt.base.biz.base.basegoodsspudetail.BaseGoodsSpuDetailQuery; +import com.yxt.base.biz.base.basegoodsspudetail.BaseGoodsSpuDetailService; +import com.yxt.base.biz.base.basegoodsspudetail.BaseGoodsSpuDetailVo; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/3/21 16:58 + */ + +@Api(tags = "商品spu详情") +@RestController +@RequestMapping("/apiadmin/base/basegoodsspudetail") +public class BaseGoodsSpuDetailRest { + + @Autowired + BaseGoodsSpuDetailService baseGoodsSpuDetailService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return baseGoodsSpuDetailService.listPage(pq); + } + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody BaseGoodsSpuDetailDto dto) { + return baseGoodsSpuDetailService.saveOrUpdate(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return baseGoodsSpuDetailService.initialization(sid); + } + + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable("sid") String sid) { + return baseGoodsSpuDetailService.delete(sid); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSpuRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSpuRest.java new file mode 100644 index 0000000000..9cda6da133 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsSpuRest.java @@ -0,0 +1,58 @@ +package com.yxt.base.apiadmin.base; + +import com.yxt.base.biz.base.basegoodsspu.BaseGoodsSpuDto; +import com.yxt.base.biz.base.basegoodsspu.BaseGoodsSpuQuery; +import com.yxt.base.biz.base.basegoodsspu.BaseGoodsSpuService; +import com.yxt.base.biz.base.basegoodsspu.BaseGoodsSpuVo; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author wangpengfei + * @date 2024/3/7 16:58 + */ +@Api(tags = "商品spu") +@RestController +@RequestMapping("/apiadmin/base/basegoodsspu") +public class BaseGoodsSpuRest { + @Autowired + BaseGoodsSpuService baseGoodsSpuService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return baseGoodsSpuService.listPage(pq); + } + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody BaseGoodsSpuDto dto) { + return baseGoodsSpuService.saveOrUpdate(dto); + } +// @ApiOperation("保存商品信息及sku") +// @PostMapping("/save") +// public ResultBean save(@RequestBody BaseGoodsSpuDto dto) { +// return baseGoodsSpuService.save(dto); +// } + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return baseGoodsSpuService.initialization(sid); + } + + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable("sid") String sid) { + return baseGoodsSpuService.delete(sid); + } + @ApiOperation("更改可用状态") + @GetMapping("/updateIsEnable/{sid}/{isEnable}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid,@PathVariable("isEnable")String isEnable) { + return baseGoodsSpuService.updateIsEnable(sid,isEnable); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsTypeRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsTypeRest.java new file mode 100644 index 0000000000..ad039f078c --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsTypeRest.java @@ -0,0 +1,61 @@ +package com.yxt.base.apiadmin.base; + +import com.yxt.base.biz.base.basegoodstype.*; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:44 + */ +@Api(tags = "商品类型") +@RestController +@RequestMapping("/apiadmin/base/basegoodstype") +public class BaseGoodsTypeRest { + @Autowired + BaseGoodsTypeService baseGoodsTypeService; + + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return baseGoodsTypeService.listPage(pq); + } + @ApiOperation("查询所有的类别") + @GetMapping("/listAll") + public ResultBean> listAll() { + return baseGoodsTypeService.listAll(); + } + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody BaseGoodsTypeDto dto) { + return baseGoodsTypeService.saveOrUpdate(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return baseGoodsTypeService.initialization(sid); + } + + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable("sid") String sid) { + return baseGoodsTypeService.delete(sid); + } + + + @ApiOperation("更改可用状态") + @GetMapping("/updateIsEnable/{sid}/{isEnable}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid,@PathVariable("isEnable")String isEnable) { + return baseGoodsTypeService.updateIsEnable(sid,isEnable); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsUnitRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsUnitRest.java new file mode 100644 index 0000000000..fa6a121041 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseGoodsUnitRest.java @@ -0,0 +1,61 @@ +package com.yxt.base.apiadmin.base; + +import com.yxt.base.biz.base.basegoodsunit.*; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/3/8 9:19 + */ +@Api(tags = "商品类型") +@RestController +@RequestMapping("/apiadmin/base/basegoodsunit") +public class BaseGoodsUnitRest { + @Autowired + BaseGoodsUnitService baseGoodsUnitService; + + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return baseGoodsUnitService.listPage(pq); + } + @ApiOperation("查询所有的类别") + @GetMapping("/listAll") + public ResultBean> listAll() { + return baseGoodsUnitService.listAll(); + } + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody BaseGoodsUnitDto dto) { + return baseGoodsUnitService.saveOrUpdate(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return baseGoodsUnitService.initialization(sid); + } + + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable("sid") String sid) { + return baseGoodsUnitService.delete(sid); + } + + + @ApiOperation("更改可用状态") + @GetMapping("/updateIsEnable/{sid}/{isEnable}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid,@PathVariable("isEnable")String isEnable) { + return baseGoodsUnitService.updateIsEnable(sid,isEnable); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseManufacturerRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseManufacturerRest.java new file mode 100644 index 0000000000..4ed52019da --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseManufacturerRest.java @@ -0,0 +1,69 @@ +package com.yxt.base.apiadmin.base; + +import com.yxt.base.biz.base.basemanufacturer.*; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/27 13:56 + */ +@Api(tags = "厂家信息") +@RestController +@RequestMapping("/apiadmin/base/basemanufacturer") +public class BaseManufacturerRest { + + @Autowired + BaseManufacturerService baseManufacturerService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return baseManufacturerService.listPage(pq); + } + + @ApiOperation("查询所有的厂家") + @GetMapping("/listAll") + public ResultBean> listAll() { + return baseManufacturerService.listAll(); + } + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody BaseManufacturerDto dto) { + return baseManufacturerService.saveOrUpdate(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return baseManufacturerService.initialization(sid); + } + + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable("sid") String sid) { + return baseManufacturerService.delete(sid); + } + + + @ApiOperation("更改可用状态") + @GetMapping("/updateIsEnable/{sid}/{isEnable}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid, @PathVariable("isEnable") String isEnable) { + return baseManufacturerService.updateIsEnable(sid, isEnable); + } + + @ApiOperation("查询分公司下所有的厂家") + @GetMapping("/getAllTypeByUseOrgSid") + public ResultBean> getAllTypeByUseOrgSid(@RequestParam("useOrgSid") String useOrgSid) { + return baseManufacturerService.getAllTypeByUseOrgSid(useOrgSid); + } + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSpecGroupRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSpecGroupRest.java new file mode 100644 index 0000000000..38c21c8f2a --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSpecGroupRest.java @@ -0,0 +1,57 @@ +package com.yxt.base.apiadmin.base; + + +import com.yxt.base.biz.base.basespecparam.BaseSpecParamDto; +import com.yxt.base.biz.base.basespecparam.BaseSpecParamQuery; +import com.yxt.base.biz.base.basespecparam.BaseSpecParamService; +import com.yxt.base.biz.base.basespecparam.BaseSpecParamVo; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author wangpengfei + * @date 2024/3/11 14:27 + */ +@Api(tags = "规格参数组表") +@RestController +@RequestMapping("/apiadmin/base/basespecgroup") +public class BaseSpecGroupRest { + @Autowired + BaseSpecParamService baseSpecParamService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return baseSpecParamService.listPage(pq); + } + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody BaseSpecParamDto dto) { + return baseSpecParamService.saveOrUpdate(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return baseSpecParamService.initialization(sid); + } + + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable("sid") String sid) { + return baseSpecParamService.delete(sid); + } + + @ApiOperation("更改可用状态") + @GetMapping("/updateIsEnable/{sid}/{isEnable}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid, @PathVariable("isEnable") String isEnable) { + return baseSpecParamService.updateIsEnable(sid, isEnable); + } + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSpecParamRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSpecParamRest.java new file mode 100644 index 0000000000..42a82c3ffe --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSpecParamRest.java @@ -0,0 +1,57 @@ +package com.yxt.base.apiadmin.base; + + +import com.yxt.base.biz.base.basespecparam.BaseSpecParamDto; +import com.yxt.base.biz.base.basespecparam.BaseSpecParamQuery; +import com.yxt.base.biz.base.basespecparam.BaseSpecParamService; +import com.yxt.base.biz.base.basespecparam.BaseSpecParamVo; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author wangpengfei + * @date 2024/3/11 14:27 + */ +@Api(tags = "规格参数定义表") +@RestController +@RequestMapping("/apiadmin/base/basespecparam") +public class BaseSpecParamRest { + @Autowired + BaseSpecParamService baseSpecParamService; + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return baseSpecParamService.listPage(pq); + } + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public ResultBean saveOrUpdate(@RequestBody BaseSpecParamDto dto) { + return baseSpecParamService.saveOrUpdate(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return baseSpecParamService.initialization(sid); + } + + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable("sid") String sid) { + return baseSpecParamService.delete(sid); + } + + @ApiOperation("更改可用状态") + @GetMapping("/updateIsEnable/{sid}/{isEnable}") + public ResultBean updateIsEnable(@PathVariable("sid") String sid, @PathVariable("isEnable") String isEnable) { + return baseSpecParamService.updateIsEnable(sid, isEnable); + } + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierBankRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierBankRest.java new file mode 100644 index 0000000000..116e0a5a28 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierBankRest.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.apiadmin.base; + +import com.yxt.base.biz.base.basesupplierBank.*; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBankFeignFallback.java
+ * Class: com.yxt.base.biz.basesupplierbank.BaseSupplierBankRest
+ * Description: 供应商开户行信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "供应商开户行信息") +@RestController +@RequestMapping("/apiadmin/base/basesupplierbank") +public class BaseSupplierBankRest { + + @Autowired + private BaseSupplierBankService baseSupplierBankService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = baseSupplierBankService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody BaseSupplierBankDto dto){ + ResultBean rb = ResultBean.fireFail(); + baseSupplierBankService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + baseSupplierBankService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + BaseSupplierBankDetailsVo vo = baseSupplierBankService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierFileRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierFileRest.java new file mode 100644 index 0000000000..347dfa33d2 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierFileRest.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.apiadmin.base; + +import com.yxt.base.biz.base.basesupplierfile.*; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFileFeignFallback.java
+ * Class: com.yxt.anrui.as.biz.basesupplierfile.BaseSupplierFileRest
+ * Description: 供应商附件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "供应商附件") +@RestController +@RequestMapping("/apiadmin/base/basesupplierfile") +public class BaseSupplierFileRest { + + @Autowired + private BaseSupplierFileService baseSupplierFileService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = baseSupplierFileService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody BaseSupplierFileDto dto){ + ResultBean rb = ResultBean.fireFail(); + baseSupplierFileService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + baseSupplierFileService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + BaseSupplierFileDetailsVo vo = baseSupplierFileService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierInfoRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierInfoRest.java new file mode 100644 index 0000000000..ba36c8a33d --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierInfoRest.java @@ -0,0 +1,97 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.apiadmin.base; + +import com.yxt.base.biz.base.basesupplierinfo.*; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierInfoFeignFallback.java
+ * Class: com.yxt.anrui.as.biz.basesupplierinfo.BaseSupplierInfoRest
+ * Description: 供应商信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "供应商信息") +@RestController +@RequestMapping("/apiadmin/base/basesupplierinfo") +public class BaseSupplierInfoRest { + + @Autowired + private BaseSupplierInfoService baseSupplierInfoService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = baseSupplierInfoService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody BaseSupplierInfoDto dto){ + return baseSupplierInfoService.saveOrUpdateDto(dto); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + baseSupplierInfoService.delAll(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + BaseSupplierInfoDetailsVo vo = baseSupplierInfoService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + @ApiOperation("选择供应商") + @PostMapping("/choiceSupplierInfo") + public ResultBean> choiceSupplierInfo(@RequestParam("createOrgSid") String createOrgSid){ + ResultBean rb = ResultBean.fireFail(); + List baseSupplierInfoChoiceList = baseSupplierInfoService.choiceSupplierInfo(createOrgSid); + return rb.success().setData(baseSupplierInfoChoiceList); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierTypeRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierTypeRest.java new file mode 100644 index 0000000000..efb36ef5cd --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiadmin/base/BaseSupplierTypeRest.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.apiadmin.base; + +import com.yxt.base.biz.base.basesuppliertype.*; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierTypeFeignFallback.java
+ * Class: com.yxt.anrui.as.biz.basesuppliertype.BaseSupplierTypeRest
+ * Description: 供应商类型.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "供应商类型") +@RestController +@RequestMapping("/apiadmin/base/basesuppliertype") +public class BaseSupplierTypeRest { + + @Autowired + private BaseSupplierTypeService baseSupplierTypeService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = baseSupplierTypeService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody BaseSupplierTypeDto dto){ + ResultBean rb = ResultBean.fireFail(); + baseSupplierTypeService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + baseSupplierTypeService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + BaseSupplierTypeDetailsVo vo = baseSupplierTypeService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/apiwx/WxHomeRest.java b/yxt-base-biz/src/main/java/com/yxt/base/apiwx/WxHomeRest.java new file mode 100644 index 0000000000..f5a0735876 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/apiwx/WxHomeRest.java @@ -0,0 +1,10 @@ +package com.yxt.base.apiwx; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController("com.yxt.base.apiwx.WxHomeRest") +@RequestMapping("/apiwx/home") +public class WxHomeRest { + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfo.java new file mode 100644 index 0000000000..c9f086eb5a --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfo.java @@ -0,0 +1,21 @@ +package com.yxt.base.biz.base.basebrandinfo; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:36 + */ +@Data +public class BaseBrandInfo extends BaseEntity { + + private String brandName;//品牌代码 + private String brandCode;//品牌名称 + private String image;//品牌图片url地址 + private String letter;//品牌的首字母大写 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoDto.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoDto.java new file mode 100644 index 0000000000..118f2ed15a --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoDto.java @@ -0,0 +1,27 @@ +package com.yxt.base.biz.base.basebrandinfo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class BaseBrandInfoDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String brandName;//品牌代码 + private String brandCode;//品牌名称 + private String image;//品牌图片url地址 + private String letter;//品牌的首字母大写 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoMapper.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoMapper.java new file mode 100644 index 0000000000..906ca2eb7f --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoMapper.java @@ -0,0 +1,18 @@ +package com.yxt.base.biz.base.basebrandinfo; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface BaseBrandInfoMapper extends BaseMapper { + + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoMapper.xml b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoMapper.xml new file mode 100644 index 0000000000..798f066dc7 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoMapper.xml @@ -0,0 +1,15 @@ + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoQuery.java new file mode 100644 index 0000000000..6960b805d7 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoQuery.java @@ -0,0 +1,13 @@ +package com.yxt.base.biz.base.basebrandinfo; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseBrandInfoQuery implements Query { + private String name; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoService.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoService.java new file mode 100644 index 0000000000..ae51d038bb --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoService.java @@ -0,0 +1,127 @@ +package com.yxt.base.biz.base.basebrandinfo; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.config.component.FileUploadComponent; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.text.SimpleDateFormat; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class BaseBrandInfoService extends MybatisBaseService { + @Autowired + private FileUploadComponent fileUploadComponent; + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + BaseBrandInfoQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + + if(StringUtils.isNotBlank(query.getName())){ + qw.like("brandName",query.getName()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + records.removeAll(Collections.singleton(null)); +// if (!records.isEmpty()) { +// for (BaseBrandInfoVo record : records) { +// if (StringUtils.isNotBlank(record.getBigPic())) { +// record.setBigPic(fileUploadComponent.getUrlPrefix() + record.getBigPic()); +// } +// } +// } + return rb.success().setData(p); + } + public ResultBean> listAll() { + ResultBean rb = ResultBean.fireFail(); + List pagging = baseMapper.selectList(new QueryWrapper().eq("isEnable",1)); + return rb.success().setData(pagging); +} + public ResultBean saveOrUpdate(BaseBrandInfoDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + BaseBrandInfo wmsGoodsBrand = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsGoodsBrand, "id", "sid"); +// if (StringUtils.isNotBlank(dto.getBigPic())) { +// String urlPrefix = fileUploadComponent.getUrlPrefix(); +// String path = dto.getBigPic().substring(urlPrefix.length()); +// wmsGoodsBrand.setBigPic(path); +// } + wmsGoodsBrand.setModifyTime(new Date()); + baseMapper.updateById(wmsGoodsBrand); + } else { + BaseBrandInfo goods=baseMapper.selectOne(new QueryWrapper().eq("name",dto.getBrandName())); + if(null!=goods){ + return rb.setMsg("商品名不能重复"); + } + BaseBrandInfo wmsGoodsBrand = new BaseBrandInfo(); + sid = wmsGoodsBrand.getSid(); + BeanUtil.copyProperties(dto, wmsGoodsBrand, "id", "sid"); + wmsGoodsBrand.setCreateTime(new DateTime()); +// if (StringUtils.isNotBlank(dto.getBigPic())) { +// String urlPrefix = fileUploadComponent.getUrlPrefix(); +// String path = dto.getBigPic().substring(urlPrefix.length()); +// wmsGoodsBrand.setBigPic(path); +// } + baseMapper.insert(wmsGoodsBrand); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseBrandInfoVo vo = new BaseBrandInfoVo(); + BaseBrandInfo wmsGoodsBrand = fetchBySid(sid); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + BeanUtil.copyProperties(wmsGoodsBrand, vo); +// if (null != wmsGoodsBrand) { +// +// if (StringUtils.isNotBlank(wmsGoodsBrand.getBigPic())) { +// vo.setBigPic(fileUploadComponent.getUrlPrefix() + wmsGoodsBrand.getBigPic()); +// } +//// vo.setCreateTime(sdf.format(lpkGoods.getCreateTime())); +// } + return rb.success().setData(vo); + } + + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseBrandInfo wmsGoodsBrand = fetchBySid(sid); + if (null != wmsGoodsBrand) { + baseMapper.deleteById(wmsGoodsBrand.getId()); + } + return rb.success().setMsg("成功"); + } + public ResultBean updateIsEnable(String sid,String isEnable) { + ResultBean rb = ResultBean.fireFail(); + BaseBrandInfo wmsGoodsBrand = fetchBySid(sid); + if (null != wmsGoodsBrand) { + wmsGoodsBrand.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsGoodsBrand); + } + return rb.success().setMsg("成功"); + } + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoVo.java new file mode 100644 index 0000000000..ecf1ac8962 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoVo.java @@ -0,0 +1,32 @@ +package com.yxt.base.biz.base.basebrandinfo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseBrandInfoVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String brandName;//品牌代码 + private String brandCode;//品牌名称 + private String image;//品牌图片url地址 + private String letter;//品牌的首字母大写 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrand.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrand.java new file mode 100644 index 0000000000..c1d2f3cea3 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrand.java @@ -0,0 +1,15 @@ +package com.yxt.base.biz.base.basecategorybrand; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/4/8 9:34 + */ +@Data +public class BaseCategoryBrand extends BaseEntity { + private String categorySid;//商品分类sid + private String brandSid;//品牌sid + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandDto.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandDto.java new file mode 100644 index 0000000000..66566c8d34 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandDto.java @@ -0,0 +1,22 @@ +package com.yxt.base.biz.base.basecategorybrand; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/4/8 9:34 + */ +@Data +public class BaseCategoryBrandDto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String categorySid;//商品分类sid + private String brandSid;//品牌sid +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandMapper.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandMapper.java new file mode 100644 index 0000000000..f361918089 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandMapper.java @@ -0,0 +1,23 @@ +package com.yxt.base.biz.base.basecategorybrand; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface BaseCategoryBrandMapper extends BaseMapper { + + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + List getSkusBySpuSid(@Param("spuSid")String spuSid); + BaseCategoryBrandVo getVoBySid(@Param("sid")String sid); + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandMapper.xml b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandMapper.xml new file mode 100644 index 0000000000..d6589ac7ef --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandQuery.java new file mode 100644 index 0000000000..09ad9990f3 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandQuery.java @@ -0,0 +1,13 @@ +package com.yxt.base.biz.base.basecategorybrand; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/4/8 9:34 + */ +@Data +public class BaseCategoryBrandQuery implements Query { + private String name; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandService.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandService.java new file mode 100644 index 0000000000..1bdedc6bb9 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandService.java @@ -0,0 +1,115 @@ +package com.yxt.base.biz.base.basecategorybrand; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.config.component.FileUploadComponent; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class BaseCategoryBrandService extends MybatisBaseService { + @Autowired + private FileUploadComponent fileUploadComponent; + + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + BaseCategoryBrandQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getName())) { + qw.like("goodsName", query.getName()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return rb.success().setData(p); + } + @Transactional + public ResultBean saveOrUpdate(BaseCategoryBrandDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + BaseCategoryBrand wmsGoods = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsGoods, "id", "sid"); + wmsGoods.setModifyTime(new Date()); + baseMapper.updateById(wmsGoods); + } else { + BaseCategoryBrand wmsGoods = new BaseCategoryBrand(); + BeanUtil.copyProperties(dto, wmsGoods, "id", "sid"); + wmsGoods.setCreateTime(new DateTime()); + baseMapper.insert(wmsGoods); + } + return rb.success().setMsg("成功"); + } + @Transactional + public ResultBean saveOrUpdate(List dtos) { + ResultBean rb = ResultBean.fireFail(); + for (BaseCategoryBrandDto dto : dtos) { + BaseCategoryBrand sku=baseMapper.selectOne(new QueryWrapper().eq("sid",dto.getSid())); + String sid = ""; + if (null!=sku) { + sid = dto.getSid(); + BaseCategoryBrand wmsGoods = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsGoods); + wmsGoods.setModifyTime(new Date()); + baseMapper.updateById(wmsGoods); + } else { + BaseCategoryBrand wmsGoods = new BaseCategoryBrand(); + BeanUtil.copyProperties(dto, wmsGoods); + wmsGoods.setCreateTime(new DateTime()); + baseMapper.insert(wmsGoods); + } + } + + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseCategoryBrandVo vo = baseMapper.getVoBySid(sid); + return rb.success().setData(vo); + } + + public ResultBean> getSkusBySpuSid(String sid) { + ResultBean rb = ResultBean.fireFail(); + List vo = baseMapper.getSkusBySpuSid(sid); + return rb.success().setData(vo); + } + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseCategoryBrand wmsGoods = fetchBySid(sid); + if (null != wmsGoods) { + baseMapper.deleteById(wmsGoods.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid, String isEnable) { + ResultBean rb = ResultBean.fireFail(); + BaseCategoryBrand wmsGoods = fetchBySid(sid); + if (null != wmsGoods) { + wmsGoods.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsGoods); + } + return rb.success().setMsg("成功"); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandVo.java new file mode 100644 index 0000000000..5e8e9cba55 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basecategorybrand/BaseCategoryBrandVo.java @@ -0,0 +1,24 @@ +package com.yxt.base.biz.base.basecategorybrand; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/4/8 9:34 + */ +@Data +public class BaseCategoryBrandVo { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String categorySid;//商品分类sid + private String brandSid;//品牌sid + private String categoryName;//分类名 + private String brandName;//品牌名 +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSku.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSku.java new file mode 100644 index 0000000000..cf40a1c7f5 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSku.java @@ -0,0 +1,21 @@ +package com.yxt.base.biz.base.basegoodssku; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:36 + */ +@Data +public class BaseGoodsSku extends BaseEntity { + private String goodsSkuCode;//商品Sku代码 + private String title;//商品标题 + private String goodsSpuSid;//商品基础信息Sid + private String externalCode;//外部编码 + private String indexes;//特有规格属性在spu表中special_spec字段对应每个参数值数组下标的组合,如0_0_0,1_0_0,相当于SKU这条记录的编码。 + @TableField(value = "own_spec") + private String ownSpec;//sku的特有规格参数键值对,json格式,反序列化时请使用linkedHashMap,保证有序 + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuDetailsVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuDetailsVo.java new file mode 100644 index 0000000000..24986e674f --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuDetailsVo.java @@ -0,0 +1,69 @@ +package com.yxt.base.biz.base.basegoodssku; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/19 + **/ +@Data +public class BaseGoodsSkuDetailsVo { + + @ApiModelProperty("商品代码") + private String goodsCode; + @ApiModelProperty("条形码") + private String barCode; + @ApiModelProperty("商品名称") + private String goodsName; + @ApiModelProperty("副标题") + private String subTitle; + @ApiModelProperty("拼音缩写") + private String goodsPY; + @ApiModelProperty("商品简称") + private String goodsShortName; + @ApiModelProperty("商品分类sid") + private String goodsTypeSid; + @ApiModelProperty("品牌sid") + private String brandSid; + @ApiModelProperty("厂家sid") + private String manufacturersid; + @ApiModelProperty("商品单位sid") + private String goodsUnitSid; + @ApiModelProperty("商品单位名称") + private String goodsUnitName; + + @ApiModelProperty("商品Sku代码") + private String goodsSkuCode; + @ApiModelProperty("商品标题") + private String title; + @ApiModelProperty("是否一品一码(goodID),0否,1是") + @JsonProperty("isGoodsID") + private int isGoodsID; + + //================================= + + //商品名称 + //零件号 + //拼音 + //条形码 + //计量单位 + //商品类别 + private String goodsTypeName;//商品类别名称 + //厂家 + //规格 + //品牌 + //车型 + //原厂标志 + //产地 + //锁定售价 + //备注 + //上限数量 + //下限数量 + //积分商品 + //所需积分 + + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuDto.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuDto.java new file mode 100644 index 0000000000..95bfbdca29 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuDto.java @@ -0,0 +1,31 @@ +package com.yxt.base.biz.base.basegoodssku; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import com.yxt.base.biz.base.basegoodsskuextend.BaseGoodsSkuExtendDto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class BaseGoodsSkuDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String goodsSkuCode;//商品Sku代码 + private String title;//商品标题 + private String goodsSpuSid;//商品基础信息Sid + private String externalCode;//外部编码 + private String indexes;//特有规格属性在spu表中special_spec字段对应每个参数值数组下标的组合,如0_0_0,1_0_0,相当于SKU这条记录的编码。 + @TableField(value = "own_spec") + private String ownSpec;//sku的特有规格参数键值对,json格式,反序列化时请使用linkedHashMap,保证有序 + private BaseGoodsSkuExtendDto baseGoodsSkuExtend;//sku扩展 +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuMapper.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuMapper.java new file mode 100644 index 0000000000..b9a042c9be --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuMapper.java @@ -0,0 +1,30 @@ +package com.yxt.base.biz.base.basegoodssku; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface BaseGoodsSkuMapper extends BaseMapper { + + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + List getSkusBySpuSid(@Param("spuSid") String spuSid); + + BaseGoodsSkuVo getSkuBySid(@Param("sid") String sid); + + IPage getSelectList(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage purGoodsListPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage getGoodsListPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuMapper.xml b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuMapper.xml new file mode 100644 index 0000000000..a7cdb391f1 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuMapper.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuPurSelectList.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuPurSelectList.java new file mode 100644 index 0000000000..02a3fe4f24 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuPurSelectList.java @@ -0,0 +1,35 @@ +package com.yxt.base.biz.base.basegoodssku; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/21 + **/ +@Data +public class BaseGoodsSkuPurSelectList { + + //sid + private String sid; + //零件号 + private String goodsSkuCode; + //规格 + private String title; + //商品名称 + private String goodsName; + //商品拼音 + private String goodsPY; + //商品简称 + private String goodsShortName; + //商品类别sid + private String goodsTypeSid; + //品牌sid + private String brandSid; + //厂家sid + private String manufacturerSid; + //商品单位名称 + private String goodsUnitName; + //sku特有规格参数键值对 + private String ownSpec; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuPurSelectQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuPurSelectQuery.java new file mode 100644 index 0000000000..9653b7cf98 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuPurSelectQuery.java @@ -0,0 +1,30 @@ +package com.yxt.base.biz.base.basegoodssku; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/21 + **/ +@Data +public class BaseGoodsSkuPurSelectQuery implements Query { + + //组织sid + private String orgSid; + //商品名称 + private String goodsName; + //商品类别sid + private String goodsTypeSid; + //商品拼音 + private String goodsPY; + //品牌sid + private String brandSid; + //零件号 + private String goodsSkuCode; + //规格 + private String title; + //其他查询条件 + private String otherQuery; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuQuery.java new file mode 100644 index 0000000000..d386b5bb88 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuQuery.java @@ -0,0 +1,13 @@ +package com.yxt.base.biz.base.basegoodssku; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseGoodsSkuQuery implements Query { + private String name; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuReturnSelectList.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuReturnSelectList.java new file mode 100644 index 0000000000..734ecc843f --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuReturnSelectList.java @@ -0,0 +1,21 @@ +package com.yxt.base.biz.base.basegoodssku; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/21 + **/ +@Data +public class BaseGoodsSkuReturnSelectList { + + //商品名称 + private String goodsName; + //零件号 + private String goodsSkuCode; + //规格 + private String title; + //单位 + private String unit; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuSelectList.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuSelectList.java new file mode 100644 index 0000000000..3cd6e4b8f9 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuSelectList.java @@ -0,0 +1,36 @@ +package com.yxt.base.biz.base.basegoodssku; + +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/21 + **/ +@Data +public class BaseGoodsSkuSelectList { + + //商品名称 + private String goodsSpuSid; + private String goodsSpuName; + //商品sid + private String goodsSkuSid; + //商品编码 + private String goodsSkuCode; + //规格/型号 + private String goodsSkuTitle; + //计量单位 + private String goodsUnitSid; + private String goodsUnitName; + //仓库名称 + //货位 + //单位成本(进货价) + //数量 + //税额 + //含税价 + //金额 + //销售价1 + //销售价2 + //操作时间 + //操作人 +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuSelectQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuSelectQuery.java new file mode 100644 index 0000000000..d0c00fd45a --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuSelectQuery.java @@ -0,0 +1,15 @@ +package com.yxt.base.biz.base.basegoodssku; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/21 + **/ +@Data +public class BaseGoodsSkuSelectQuery implements Query { + + private String goodsSkuCode; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuService.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuService.java new file mode 100644 index 0000000000..412583573a --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuService.java @@ -0,0 +1,233 @@ +package com.yxt.base.biz.base.basegoodssku; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.base.biz.base.basegoodsskuextend.BaseGoodsSkuExtendVo; +import com.yxt.base.biz.base.basegoodsspu.BaseGoodsSpu; +import com.yxt.base.biz.base.basegoodsspu.BaseGoodsSpuService; +import com.yxt.base.biz.base.basegoodstype.BaseGoodsType; +import com.yxt.base.biz.base.basegoodstype.BaseGoodsTypeService; +import com.yxt.base.feign.wms.wmsinventory.WmsGoodsInventoryVo; +import com.yxt.base.feign.wms.wmsinventory.WmsInventoryFeign; +import com.yxt.common.base.config.component.FileUploadComponent; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.base.biz.base.basegoodsskuextend.BaseGoodsSkuExtendService; +import com.yxt.base.biz.base.basegoodsspudetail.BaseGoodsSpuDetailService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.text.SimpleDateFormat; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class BaseGoodsSkuService extends MybatisBaseService { + @Autowired + private FileUploadComponent fileUploadComponent; + @Autowired + BaseGoodsSpuDetailService baseGoodsSpuDetailService; + @Autowired + BaseGoodsSkuExtendService baseGoodsSkuExtendService; + @Autowired + private BaseGoodsSpuService baseGoodsSpuService; + @Autowired + BaseGoodsTypeService baseGoodsTypeService; + @Autowired + private WmsInventoryFeign wmsInventoryFeign; + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSkuQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getName())) { + qw.like("goodsName", query.getName()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return rb.success().setData(p); + } + + @Transactional + public ResultBean saveOrUpdate(BaseGoodsSkuDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + BaseGoodsSku wmsGoods = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsGoods, "id", "sid"); + wmsGoods.setModifyTime(new Date()); + baseMapper.updateById(wmsGoods); + dto.getBaseGoodsSkuExtend().setGoodsSkuSid(wmsGoods.getSid()); + baseGoodsSkuExtendService.saveOrUpdate(dto.getBaseGoodsSkuExtend()); + } else { + BaseGoodsSku wmsGoods = new BaseGoodsSku(); + BeanUtil.copyProperties(dto, wmsGoods, "id", "sid"); + wmsGoods.setCreateTime(new DateTime()); + baseMapper.insert(wmsGoods); + dto.getBaseGoodsSkuExtend().setGoodsSkuSid(wmsGoods.getSid()); + baseGoodsSkuExtendService.saveOrUpdate(dto.getBaseGoodsSkuExtend()); + } + return rb.success().setMsg("成功"); + } + + @Transactional + public ResultBean saveOrUpdate(List dtos) { + ResultBean rb = ResultBean.fireFail(); + for (BaseGoodsSkuDto dto : dtos) { + BaseGoodsSku sku = baseMapper.selectOne(new QueryWrapper().eq("sid", dto.getSid())); + String sid = ""; + if (null != sku) { + sid = dto.getSid(); + BaseGoodsSku wmsGoods = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsGoods); + wmsGoods.setModifyTime(new Date()); + baseMapper.updateById(wmsGoods); + dto.getBaseGoodsSkuExtend().setGoodsSkuSid(wmsGoods.getSid()); + baseGoodsSkuExtendService.saveOrUpdate(dto.getBaseGoodsSkuExtend()); + } else { + BaseGoodsSku wmsGoods = new BaseGoodsSku(); + BeanUtil.copyProperties(dto, wmsGoods); + wmsGoods.setCreateTime(new DateTime()); + baseMapper.insert(wmsGoods); + dto.getBaseGoodsSkuExtend().setGoodsSkuSid(wmsGoods.getSid()); + baseGoodsSkuExtendService.saveOrUpdate(dto.getBaseGoodsSkuExtend()); + } + } + + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSkuVo vo = baseMapper.getSkuBySid(sid); + BaseGoodsSkuExtendVo vo1 = baseGoodsSkuExtendService.getExtendBySkuSid(vo.getSid()).getData(); + if (vo1 == null) { + vo.setBaseGoodsSkuExtend(new BaseGoodsSkuExtendVo()); + } + vo.setBaseGoodsSkuExtend(vo1); + return rb.success().setData(vo); + } + + public ResultBean> getSkusBySpuSid(String sid) { + ResultBean rb = ResultBean.fireFail(); + List vo = baseMapper.getSkusBySpuSid(sid); + return rb.success().setData(vo); + } + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSku wmsGoods = fetchBySid(sid); + if (null != wmsGoods) { + baseMapper.deleteById(wmsGoods.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid, String isEnable) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSku wmsGoods = fetchBySid(sid); + if (null != wmsGoods) { + wmsGoods.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsGoods); + } + return rb.success().setMsg("成功"); + } + + public ResultBean getDetails(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSkuDetailsVo baseGoodsSkuDetailsVo = new BaseGoodsSkuDetailsVo(); + BaseGoodsSku baseGoodsSku = fetchBySid(sid); + BaseGoodsSpu baseGoodsSpu = baseGoodsSpuService.fetchBySid(baseGoodsSku.getGoodsSpuSid()); + BeanUtil.copyProperties(baseGoodsSku, baseGoodsSkuDetailsVo); + BeanUtil.copyProperties(baseGoodsSpu, baseGoodsSkuDetailsVo); + BaseGoodsType baseGoodsType = baseGoodsTypeService.fetchBySid(baseGoodsSpu.getGoodsTypeSid()); + if (baseGoodsType != null && StringUtils.isNotBlank(baseGoodsType.getIsGoodsID())) { + baseGoodsSkuDetailsVo.setIsGoodsID(Integer.parseInt(baseGoodsType.getIsGoodsID())); + baseGoodsSkuDetailsVo.setGoodsTypeName(baseGoodsType.getGoodsTypeName()); + } else { + baseGoodsSkuDetailsVo.setIsGoodsID(0); + } + return rb.success().setData(baseGoodsSkuDetailsVo); + } + + public PagerVo getSelectList(PagerQuery pagerQuery) { + BaseGoodsSkuSelectQuery query = pagerQuery.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (query != null) { + //商品编码 + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("sku.goodsSkuCode", query.getGoodsSkuCode()); + } + } + IPage page = PagerUtil.queryToPage(pagerQuery); + IPage pagging = baseMapper.getSelectList(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public ResultBean> purGoodsListPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSkuPurSelectQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getOrgSid())) { + qw.eq("s.createOrgSid", query.getOrgSid()); + } + if (StringUtils.isNotBlank(query.getGoodsName())) { + qw.like("a.goodsName", query.getGoodsName()); + } + if (StringUtils.isNotBlank(query.getGoodsTypeSid())) { + qw.eq("a.goodsTypeSid", query.getGoodsTypeSid()); + } + if (StringUtils.isNotBlank(query.getGoodsPY())) { + qw.like("a.goodsPY", query.getGoodsPY()); + } + if (StringUtils.isNotBlank(query.getBrandSid())) { + qw.like("a.brandSid", query.getBrandSid()); + } + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("s.goodsSkuCode", query.getGoodsSkuCode()); + } + if (StringUtils.isNotBlank(query.getTitle())) { + qw.like("s.title", query.getTitle()); + } + if (org.apache.commons.lang3.StringUtils.isNotBlank(query.getOtherQuery())) { + qw.and(wrapper -> wrapper.like("a.goodsName", query.getOtherQuery()).or().like("s.goodsSkuCode", query.getOtherQuery()).or().like("a.goodsPY", query.getOtherQuery())); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.purGoodsListPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return rb.success().setData(p); + } + + public PagerVo getGoodsListPage(PagerQuery pagerQuery) { + GoodsSkuQuery query = pagerQuery.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (query != null) { + if (StringUtils.isNotBlank(query.getOrgSid())) { + qw.eq("spu.createOrgSid", query.getOrgSid()); + } + if (StringUtils.isNotBlank(query.getGoodsSkuTitle())) { + qw.like("sku.title", query.getGoodsSkuTitle()); + } + } + IPage page = PagerUtil.queryToPage(pagerQuery); + IPage pagging = baseMapper.getGoodsListPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuVo.java new file mode 100644 index 0000000000..736b2d84ff --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuVo.java @@ -0,0 +1,38 @@ +package com.yxt.base.biz.base.basegoodssku; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.base.biz.base.basegoodsskuextend.BaseGoodsSkuExtendVo; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseGoodsSkuVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String goodsSkuCode;//商品Sku代码 + private String title;//商品标题 + private String goodsSpuSid;//商品基础信息Sid + private String externalCode;//外部编码 + private String indexes;//特有规格属性在spu表中special_spec字段对应每个参数值数组下标的组合,如0_0_0,1_0_0,相当于SKU这条记录的编码。 + @TableField(value = "own_spec") + private String ownSpec;//sku的特有规格参数键值对,json格式,反序列化时请使用linkedHashMap,保证有序 + private String goodsName; + private BaseGoodsSkuExtendVo baseGoodsSkuExtend; + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/GoodsSkuQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/GoodsSkuQuery.java new file mode 100644 index 0000000000..42456d1890 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/GoodsSkuQuery.java @@ -0,0 +1,18 @@ +package com.yxt.base.biz.base.basegoodssku; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/17 + **/ +@Data +public class GoodsSkuQuery implements Query { + + //组织sid + private String orgSid; + //商品名称 + private String goodsSkuTitle; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/GoodsSkuVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/GoodsSkuVo.java new file mode 100644 index 0000000000..ba28b435d9 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/GoodsSkuVo.java @@ -0,0 +1,50 @@ +package com.yxt.base.biz.base.basegoodssku; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/4/17 + **/ +@Data +public class GoodsSkuVo { + + @ApiModelProperty("商品基础信息Sid") + private String goodsSpuSid; + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品sku编码") + private String goodsSkuCode; + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; + @ApiModelProperty("计量单位") + private String unit; + + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位名称") + private String warehouseRackName; + + //入库价 + @ApiModelProperty("单位成本(采购价)") + private String cost; + @ApiModelProperty("税额") + private String taxAmount; + @ApiModelProperty("含税价") + private String taxPrice; + //采购金额 + @ApiModelProperty("金额") + private String amount; + @ApiModelProperty("有效天数") + private String shelfLife; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtend.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtend.java new file mode 100644 index 0000000000..9abe320914 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtend.java @@ -0,0 +1,34 @@ +package com.yxt.base.biz.base.basegoodsskuextend; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:36 + */ +@Data +public class BaseGoodsSkuExtend extends BaseEntity { + private String goodsSkuSid;//商品Sku代码 + private String finalPurchasePrice;//最后采购价 + private String safetyStockDays;//安全库存天数 + private String isOriginalFactory;//是否原厂 + private String isInventoryAlert;//是否库存警戒 + @TableField(value = "InventoryAlertUpperLimit") + private String inventoryAlertUpperLimit;//库存警戒上线 + @TableField(value = "InventoryAlertLowerLimit") + private String inventoryAlertLowerLimit;//库存警戒下线 + private String costPrice;//成本价 + private String tagPrice;//吊牌价 + private String salesPrice;//销售单价 + private String standardPurchasePrice;//标准进价 + private String agencyPrice;//代理价 + private String discount;//折扣 + private String minimumSalesPrice;//最低零售价 + private String isLockingSalesPrice;//是否锁定销售价 + private String isIntegralExchange;//是否可以积分兑换 + private String integralAmount;//积分数量 + private String sortNo;//排序 + private String picUrl;//商品的图片,多个图片以‘,’分割 +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendDto.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendDto.java new file mode 100644 index 0000000000..1fd477dc7c --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendDto.java @@ -0,0 +1,46 @@ +package com.yxt.base.biz.base.basegoodsskuextend; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class BaseGoodsSkuExtendDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String goodsSkuSid;//商品Sku代码 + private String finalPurchasePrice;//最后采购价 + private String safetyStockDays;//安全库存天数 + private String isOriginalFactory;//是否原厂 + private String isInventoryAlert;//是否库存警戒 + @TableField(value = "InventoryAlertUpperLimit") + private String inventoryAlertUpperLimit;//库存警戒上线 + @TableField(value = "InventoryAlertLowerLimit") + private String inventoryAlertLowerLimit;//库存警戒下线 + private String costPrice;//成本价 + private String tagPrice;//吊牌价 + private String salesPrice;//销售单价 + private String standardPurchasePrice;//标准进价 + private String agencyPrice;//代理价 + private String discount;//折扣 + private String minimumSalesPrice;//最低零售价 + private String isLockingSalesPrice;//是否锁定销售价 + private String isIntegralExchange;//是否可以积分兑换 + private String integralAmount;//积分数量 + private String sortNo;//排序 + private String picUrl;//商品的图片,多个图片以‘,’分割 +// private String [] Urls={};//图片数组 + private List urls;//图片数组 +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendMapper.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendMapper.java new file mode 100644 index 0000000000..17f75a5e27 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendMapper.java @@ -0,0 +1,20 @@ +package com.yxt.base.biz.base.basegoodsskuextend; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface BaseGoodsSkuExtendMapper extends BaseMapper { + + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + BaseGoodsSkuExtendVo getExtendBySkuSid(@Param("skuSid")String skuSid); + BaseGoodsSkuExtendVo getExtendBySid(@Param("sid")String sid); +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendMapper.xml b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendMapper.xml new file mode 100644 index 0000000000..9753ba9b9c --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendMapper.xml @@ -0,0 +1,28 @@ + + + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendQuery.java new file mode 100644 index 0000000000..ba0055a5cf --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendQuery.java @@ -0,0 +1,13 @@ +package com.yxt.base.biz.base.basegoodsskuextend; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseGoodsSkuExtendQuery implements Query { + private String name; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendService.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendService.java new file mode 100644 index 0000000000..72ffc2ec98 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendService.java @@ -0,0 +1,140 @@ +package com.yxt.base.biz.base.basegoodsskuextend; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.config.component.FileUploadComponent; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.base.biz.base.basebrandinfo.BaseBrandInfoService; +import com.yxt.base.biz.base.basegoodsspudetail.BaseGoodsSpuDetailService; +import com.yxt.base.biz.base.basegoodstype.BaseGoodsTypeService; +import com.yxt.base.biz.base.basemanufacturer.BaseManufacturerService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.text.SimpleDateFormat; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class BaseGoodsSkuExtendService extends MybatisBaseService { + @Autowired + private FileUploadComponent fileUploadComponent; + @Autowired + private BaseBrandInfoService baseBrandInfoService; + @Autowired + private BaseGoodsTypeService baseGoodsTypeService; + @Autowired + private BaseManufacturerService baseManufacturerService; + @Autowired + BaseGoodsSpuDetailService baseGoodsSpuDetailService; + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSkuExtendQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if(StringUtils.isNotBlank(query.getName())){ + qw.like("goodsName",query.getName()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + records.removeAll(Collections.singleton(null)); +// if (!records.isEmpty()) { +// for (BaseGoodsSpuVo record : records) { +// if (StringUtils.isNotBlank(record.getPicUrl())) { +// record.setPicUrl(fileUploadComponent.getUrlPrefix() + record.getPicUrl()); +// } +// } +// } + return rb.success().setData(p); + } + @Transactional + public ResultBean saveOrUpdate(BaseGoodsSkuExtendDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + BaseGoodsSkuExtend extend=baseMapper.selectOne(new QueryWrapper().eq("sid",dto.getSid())); + if (null!=extend) { + sid = dto.getSid(); + BaseGoodsSkuExtend wmsGoods = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsGoods); + wmsGoods.setModifyTime(new Date()); + for (UrlsVo url : dto.getUrls()) { + String urlPrefix = fileUploadComponent.getUrlPrefix(); + String path = url.getUrl().substring(urlPrefix.length()); + if(StringUtils.isBlank(dto.getPicUrl())){ + wmsGoods.setPicUrl(path); + }else{ + wmsGoods.setPicUrl(wmsGoods.getPicUrl()+","+path); + } + } + if (StringUtils.isNotBlank(dto.getPicUrl())) { + String urlPrefix = fileUploadComponent.getUrlPrefix(); + String path = dto.getPicUrl().substring(urlPrefix.length()); + wmsGoods.setPicUrl(path); + } + baseMapper.updateById(wmsGoods); + + } else { + BaseGoodsSkuExtend wmsGoods = new BaseGoodsSkuExtend(); + sid = wmsGoods.getSid(); + BeanUtil.copyProperties(dto, wmsGoods); + wmsGoods.setCreateTime(new DateTime()); + for (UrlsVo url : dto.getUrls()) { + String urlPrefix = fileUploadComponent.getUrlPrefix(); + String path = url.getUrl().substring(urlPrefix.length()); + if(StringUtils.isBlank(dto.getPicUrl())){ + wmsGoods.setPicUrl(path); + }else{ + wmsGoods.setPicUrl(wmsGoods.getPicUrl()+","+path); + } + } + baseMapper.insert(wmsGoods); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSkuExtendVo vo = baseMapper.getExtendBySid(sid); + return rb.success().setData(vo); + } + + public ResultBean getExtendBySkuSid(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSkuExtendVo vo = baseMapper.getExtendBySkuSid(sid); + return rb.success().setData(vo); + } + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSkuExtend wmsGoods = fetchBySid(sid); + if (null != wmsGoods) { + baseMapper.deleteById(wmsGoods.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid,String isEnable) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSkuExtend wmsGoods = fetchBySid(sid); + if (null != wmsGoods) { + wmsGoods.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsGoods); + } + return rb.success().setMsg("成功"); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendVo.java new file mode 100644 index 0000000000..00e52e75b8 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtendVo.java @@ -0,0 +1,53 @@ +package com.yxt.base.biz.base.basegoodsskuextend; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseGoodsSkuExtendVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String goodsSkuSid;//商品Skusid + private String finalPurchasePrice;//最后采购价 + private String safetyStockDays;//安全库存天数 + private String isOriginalFactory;//是否原厂 + private String isInventoryAlert;//是否库存警戒 + @TableField(value = "InventoryAlertUpperLimit") + private String inventoryAlertUpperLimit;//库存警戒上线 + @TableField(value = "InventoryAlertLowerLimit") + private String inventoryAlertLowerLimit;//库存警戒下线 + private String costPrice;//成本价 + private String tagPrice;//吊牌价 + private String salesPrice;//销售单价 + private String standardPurchasePrice;//标准进价 + private String agencyPrice;//代理价 + private String discount;//折扣 + private String minimumSalesPrice;//最低零售价 + private String isLockingSalesPrice;//是否锁定销售价 + private String isIntegralExchange;//是否可以积分兑换 + private String integralAmount;//积分数量 + private String sortNo;//排序 + private String picUrl;//商品的图片,多个图片以‘,’分割 +// private String [] Urls={};//图片数组 + private List urls;//图片数组 + private String title;//sku标题 + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/UrlsVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/UrlsVo.java new file mode 100644 index 0000000000..185c94af7c --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/UrlsVo.java @@ -0,0 +1,12 @@ +package com.yxt.base.biz.base.basegoodsskuextend; + +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/3/22 10:20 + */ +@Data +public class UrlsVo { + private String url; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpu.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpu.java new file mode 100644 index 0000000000..3e5acaff13 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpu.java @@ -0,0 +1,32 @@ +package com.yxt.base.biz.base.basegoodsspu; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:36 + */ +@Data +public class BaseGoodsSpu extends BaseEntity { + private String goodsCode;//商品代码 + private String barCode;//条形码 + private String goodsName;//商品名称 + private String subTitle;//商品名称 + private String goodsPY;//拼音缩写 + private String goodsShortName;//商品简称 + private String goodsTypeSid;//商品分类sid + private String brandSid;//品牌sid + private String manufacturerSid;//厂家sid + private String goodsUnitSid;//商品单位sid + private String goodsUnitName;//商品单位名称 + private String taxRate;//税率 + private String shelfLife;//保质期天 + private String nationalStandardCode;//国标码 + private String sortNo;//排序 + private String externalCode;//外部编码 + private String factoryCode;//厂家货号 + private String isListed;//是否上架 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuDto.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuDto.java new file mode 100644 index 0000000000..76626bd5e1 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuDto.java @@ -0,0 +1,47 @@ +package com.yxt.base.biz.base.basegoodsspu; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import com.yxt.base.biz.base.basegoodssku.BaseGoodsSkuDto; +import com.yxt.base.biz.base.basegoodsspudetail.BaseGoodsSpuDetailDto; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class BaseGoodsSpuDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String goodsCode;//商品代码 + private String barCode;//条形码 + private String goodsName;//商品名称 + private String subTitle;//副标题 + private String goodsPY;//拼音缩写 + private String goodsShortName;//商品简称 + private String goodsTypeSid;//商品分类sid + private String brandSid;//品牌sid + private String manufacturerSid;//厂家sid + private String goodsUnitSid;//商品单位sid + private String goodsUnitName;//商品单位名称 + private String taxRate;//税率 + private String shelfLife;//保质期天 + private String nationalStandardCode;//国标码 + private String sortNo;//排序 + private String externalCode;//外部编码 + private String factoryCode;//厂家货号 + private String isListed;//是否上架 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + private BaseGoodsSpuDetailDto baseGoodsSpuDetail;//商品spu详情 + private List baseGoodsSkus;//商品sku + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuMapper.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuMapper.java new file mode 100644 index 0000000000..f082933b3e --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuMapper.java @@ -0,0 +1,19 @@ +package com.yxt.base.biz.base.basegoodsspu; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface BaseGoodsSpuMapper extends BaseMapper { + + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + BaseGoodsSpuVo initialization(@Param("sid")String sid); +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuMapper.xml b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuMapper.xml new file mode 100644 index 0000000000..2acb6e459c --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuQuery.java new file mode 100644 index 0000000000..87ab62cc4b --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuQuery.java @@ -0,0 +1,13 @@ +package com.yxt.base.biz.base.basegoodsspu; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseGoodsSpuQuery implements Query { + private String name; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuService.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuService.java new file mode 100644 index 0000000000..3be7a3a638 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuService.java @@ -0,0 +1,172 @@ +package com.yxt.base.biz.base.basegoodsspu; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.base.biz.base.basegoodssku.BaseGoodsSkuVo; +import com.yxt.base.biz.base.basegoodsskuextend.BaseGoodsSkuExtendService; +import com.yxt.base.biz.base.basegoodsskuextend.BaseGoodsSkuExtendVo; +import com.yxt.base.biz.base.basegoodsskuextend.UrlsVo; +import com.yxt.base.biz.base.basegoodsspudetail.BaseGoodsSpuDetailVo; +import com.yxt.base.biz.base.basegoodsunit.BaseGoodsUnit; +import com.yxt.base.biz.base.basegoodsunit.BaseGoodsUnitService; +import com.yxt.base.utils.PinYinUtils; +import com.yxt.common.base.config.component.FileUploadComponent; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.base.biz.base.basebrandinfo.BaseBrandInfo; +import com.yxt.base.biz.base.basebrandinfo.BaseBrandInfoService; +import com.yxt.base.biz.base.basegoodssku.BaseGoodsSkuService; +import com.yxt.base.biz.base.basegoodsspudetail.BaseGoodsSpuDetailService; +import com.yxt.base.biz.base.basegoodstype.BaseGoodsType; +import com.yxt.base.biz.base.basegoodstype.BaseGoodsTypeService; +import com.yxt.base.biz.base.basemanufacturer.BaseManufacturer; +import com.yxt.base.biz.base.basemanufacturer.BaseManufacturerService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class BaseGoodsSpuService extends MybatisBaseService { + @Autowired + private FileUploadComponent fileUploadComponent; + @Autowired + BaseGoodsSpuDetailService baseGoodsSpuDetailService; + @Autowired + BaseGoodsSkuService baseGoodsSkuService; + @Autowired + BaseGoodsUnitService baseGoodsUnitService; + @Autowired + BaseGoodsSkuExtendService baseGoodsSkuExtendService; + + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSpuQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if(StringUtils.isNotBlank(query.getName())){ + qw.like("goodsName",query.getName()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + records.removeAll(Collections.singleton(null)); +// if (!records.isEmpty()) { +// for (BaseGoodsSpuVo record : records) { +// if (StringUtils.isNotBlank(record.getPicUrl())) { +// record.setPicUrl(fileUploadComponent.getUrlPrefix() + record.getPicUrl()); +// } +// } +// } + return rb.success().setData(p); + } + @Transactional + public ResultBean saveOrUpdate(BaseGoodsSpuDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + BaseGoodsSpu spun= baseMapper.selectOne(new QueryWrapper().eq("sid",dto.getSid())); + BaseGoodsUnit baseGoodsUnit=baseGoodsUnitService.getOne(new QueryWrapper().eq("sid",dto.getGoodsUnitSid())); + if(null!=baseGoodsUnit){ + dto.setGoodsUnitName(baseGoodsUnit.getUnitName()); + } + + if (spun!=null) { + if(!spun.getSid().equals(dto.getSid())){ + return rb.setMsg("商品编码重复"); + } + sid = dto.getSid(); + BaseGoodsSpu wmsGoods = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsGoods); + wmsGoods.setModifyTime(new Date()); + wmsGoods.setGoodsPY(PinYinUtils.getPinYinName(wmsGoods.getGoodsName()));; + baseMapper.updateById(wmsGoods); + //spu详情 + dto.getBaseGoodsSpuDetail().setGoodSpuSid(wmsGoods.getSid()); + baseGoodsSpuDetailService.saveOrUpdate(dto.getBaseGoodsSpuDetail()); + //商品sku + dto.getBaseGoodsSkus().forEach(s->{ + s.setGoodsSpuSid(wmsGoods.getSid()); + }); + baseGoodsSkuService.saveOrUpdate(dto.getBaseGoodsSkus()); + } else { + BaseGoodsSpu spu=baseMapper.selectOne(new QueryWrapper().eq("goodsCode",dto.getGoodsCode())); + if(spu!=null){ + return rb.setMsg("商品编码重复"); + } + BaseGoodsSpu wmsGoods = new BaseGoodsSpu(); + sid = wmsGoods.getSid(); + BeanUtil.copyProperties(dto, wmsGoods); + wmsGoods.setCreateTime(new DateTime()); + baseMapper.insert(wmsGoods); + //spu详情 + dto.getBaseGoodsSpuDetail().setGoodSpuSid(wmsGoods.getSid()); + baseGoodsSpuDetailService.saveOrUpdate(dto.getBaseGoodsSpuDetail()); + //商品sku + dto.getBaseGoodsSkus().forEach(s->{ + s.setGoodsSpuSid(wmsGoods.getSid()); + }); + baseGoodsSkuService.saveOrUpdate(dto.getBaseGoodsSkus()); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSpuVo vo = baseMapper.initialization(sid); + BaseGoodsSpuDetailVo vo1=baseGoodsSpuDetailService.getSpuDetailsBySpuSid(vo.getSid()).getData(); + vo.setBaseGoodsSpuDetail(vo1); + List vos=baseGoodsSkuService.getSkusBySpuSid(vo.getSid()).getData(); + for (BaseGoodsSkuVo baseGoodsSkuVo : vos) { + List ur=new ArrayList<>(); + BaseGoodsSkuExtendVo vo2=baseGoodsSkuExtendService.getExtendBySkuSid(baseGoodsSkuVo.getSid()).getData(); + if(StringUtils.isNotBlank(vo2.getPicUrl())){ + for (String url : vo2.getPicUrl().split(",")) { + url=fileUploadComponent.getUrlPrefix()+url; + UrlsVo vo3=new UrlsVo();vo3.setUrl(url); + ur.add(vo3); + } + } + vo2.setUrls(ur); + baseGoodsSkuVo.setBaseGoodsSkuExtend(vo2); + } + vo.setBaseGoodsSkus(vos); + return rb.success().setData(vo); + } + + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSpu wmsGoods = fetchBySid(sid); + if (null != wmsGoods) { + baseMapper.deleteById(wmsGoods.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid,String isEnable) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSpu wmsGoods = fetchBySid(sid); + if (null != wmsGoods) { + wmsGoods.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsGoods); + } + return rb.success().setMsg("成功"); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuVo.java new file mode 100644 index 0000000000..02b83912de --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuVo.java @@ -0,0 +1,51 @@ +package com.yxt.base.biz.base.basegoodsspu; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.base.biz.base.basegoodssku.BaseGoodsSkuVo; +import com.yxt.base.biz.base.basegoodsspudetail.BaseGoodsSpuDetailVo; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseGoodsSpuVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String goodsCode;//商品代码 + private String barCode;//条形码 + private String goodsName;//商品名称 + private String subTitle;//商品名称 + private String goodsPY;//拼音缩写 + private String goodsShortName;//商品简称 + private String goodsTypeSid;//商品分类sid + private String brandSid;//品牌sid + private String manufacturerSid;//厂家sid + private String goodsUnitSid;//商品单位sid + private String goodsUnitName;//商品单位名称 + private String taxRate;//税率 + private String shelfLife;//保质期天 + private String nationalStandardCode;//国标码 + private String sortNo;//排序 + private String externalCode;//外部编码 + private String factoryCode;//厂家货号 + private String isListed;//是否上架 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + private BaseGoodsSpuDetailVo baseGoodsSpuDetail; + private List baseGoodsSkus; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetail.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetail.java new file mode 100644 index 0000000000..f5387c7b79 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetail.java @@ -0,0 +1,20 @@ +package com.yxt.base.biz.base.basegoodsspudetail; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:36 + */ +@Data +public class BaseGoodsSpuDetail extends BaseEntity { + private String goodSpuSid;//商品基础信息Sid + private String goodsExplain;//商品详细说明 + private String goodsDescription;//商品描述 + @TableField(value = "generic_spec") + private String genericSpec;//通用规格参数及数据,json格式(规格参数id,规格参数值的键值对) + @TableField(value = "special_spec") + private String specialSpec;//特有规格参数及可选值信息,json格式(特有规格参数id,[可选参数值]) +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailDto.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailDto.java new file mode 100644 index 0000000000..da1abd53cb --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailDto.java @@ -0,0 +1,29 @@ +package com.yxt.base.biz.base.basegoodsspudetail; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class BaseGoodsSpuDetailDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String goodSpuSid;//商品基础信息Sid + private String goodsExplain;//商品详细说明 + private String goodsDescription;//商品描述 + @TableField(value = "generic_spec") + private String genericSpec;//通用规格参数及数据,json格式(规格参数id,规格参数值的键值对) + @TableField(value = "special_spec") + private String specialSpec;//特有规格参数及可选值信息,json格式(特有规格参数id,[可选参数值]) +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailMapper.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailMapper.java new file mode 100644 index 0000000000..6cda795809 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailMapper.java @@ -0,0 +1,20 @@ +package com.yxt.base.biz.base.basegoodsspudetail; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface BaseGoodsSpuDetailMapper extends BaseMapper { + + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + BaseGoodsSpuDetailVo getSpuDetailsBySpuSid (@Param("skuSid")String skuSid); +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailMapper.xml b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailMapper.xml new file mode 100644 index 0000000000..4343a808b3 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailMapper.xml @@ -0,0 +1,24 @@ + + + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailQuery.java new file mode 100644 index 0000000000..adaef1af8c --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailQuery.java @@ -0,0 +1,13 @@ +package com.yxt.base.biz.base.basegoodsspudetail; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseGoodsSpuDetailQuery implements Query { + private String name; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailService.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailService.java new file mode 100644 index 0000000000..12302e31d0 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailService.java @@ -0,0 +1,107 @@ +package com.yxt.base.biz.base.basegoodsspudetail; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.config.component.FileUploadComponent; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.base.biz.base.basebrandinfo.BaseBrandInfoService; +import com.yxt.base.biz.base.basegoodstype.BaseGoodsTypeService; +import com.yxt.base.biz.base.basemanufacturer.BaseManufacturerService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.text.SimpleDateFormat; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class BaseGoodsSpuDetailService extends MybatisBaseService { + @Autowired + private FileUploadComponent fileUploadComponent; + @Autowired + private BaseBrandInfoService baseBrandInfoService; + @Autowired + private BaseGoodsTypeService baseGoodsTypeService; + @Autowired + private BaseManufacturerService wmsManufacturerService; + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSpuDetailQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if(StringUtils.isNotBlank(query.getName())){ + qw.like("goodsName",query.getName()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return rb.success().setData(p); + } + + public ResultBean saveOrUpdate(BaseGoodsSpuDetailDto dto) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSpuDetail detail=baseMapper.selectOne(new QueryWrapper().eq("sid",dto.getSid())); + String sid = ""; + if (null!=detail) { + sid = dto.getSid(); + BaseGoodsSpuDetail baseGoodsSpuDetail = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, baseGoodsSpuDetail); + baseGoodsSpuDetail.setModifyTime(new Date()); + baseMapper.updateById(baseGoodsSpuDetail); + } else { + + BaseGoodsSpuDetail baseGoodsSpuDetail = new BaseGoodsSpuDetail(); + sid = baseGoodsSpuDetail.getSid(); + BeanUtil.copyProperties(dto, baseGoodsSpuDetail); + baseGoodsSpuDetail.setCreateTime(new DateTime()); + + baseMapper.insert(baseGoodsSpuDetail); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSpuDetailVo vo = new BaseGoodsSpuDetailVo(); + BaseGoodsSpuDetail wmsGoods = fetchBySid(sid); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + BeanUtil.copyProperties(wmsGoods, vo); + return rb.success().setData(vo); + } + public ResultBean getSpuDetailsBySpuSid(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSpuDetailVo vo = baseMapper.getSpuDetailsBySpuSid(sid); + return rb.success().setData(vo); + } + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSpuDetail wmsGoods = fetchBySid(sid); + if (null != wmsGoods) { + baseMapper.deleteById(wmsGoods.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid,String isEnable) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsSpuDetail wmsGoods = fetchBySid(sid); + if (null != wmsGoods) { + wmsGoods.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsGoods); + } + return rb.success().setMsg("成功"); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailVo.java new file mode 100644 index 0000000000..13d33b94c2 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspudetail/BaseGoodsSpuDetailVo.java @@ -0,0 +1,35 @@ +package com.yxt.base.biz.base.basegoodsspudetail; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseGoodsSpuDetailVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String goodSpuSid;//商品基础信息Sid + private String goodsExplain;//商品详细说明 + private String goodsDescription;//商品描述 + @TableField(value = "generic_spec") + private String genericSpec;//通用规格参数及数据,json格式(规格参数id,规格参数值的键值对) + @TableField(value = "special_spec") + private String specialSpec;//特有规格参数及可选值信息,json格式(特有规格参数id,[可选参数值]) + private String goodsName; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsType.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsType.java new file mode 100644 index 0000000000..5d389be9fb --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsType.java @@ -0,0 +1,22 @@ +package com.yxt.base.biz.base.basegoodstype; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:36 + */ +@Data +public class BaseGoodsType extends BaseEntity { + private String goodsTypeName;//商品类别名称 + private String goodsTypeCode;//类别编码 + private String percentageRate;//提成比例 + private String percentageAmount;//提成金额 + private String pSid;//父级sid + private String isParent;//是否为父节点,0为否,1为是,0标识为叶子节点 + private String isGoodsID;//是否一品一码 0 否 1是 + private String sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeDto.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeDto.java new file mode 100644 index 0000000000..2bdf4964c8 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeDto.java @@ -0,0 +1,33 @@ +package com.yxt.base.biz.base.basegoodstype; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class BaseGoodsTypeDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String goodsTypeName;//商品类别名称 + private String goodsTypeCode;//类别编码 + private String percentageRate;//提成比例 + private String percentageAmount;//提成金额 + private String pSid;//父级sid + private String isParent;//是否为父节点,0为否,1为是,0标识为叶子节点 + private String isGoodsID;//是否一品一码 0 否 1是 + private String sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + private String pName;//创建组织sid + private String sids;//父级sid +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeMapper.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeMapper.java new file mode 100644 index 0000000000..a71619789f --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeMapper.java @@ -0,0 +1,17 @@ +package com.yxt.base.biz.base.basegoodstype; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface BaseGoodsTypeMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeMapper.xml b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeMapper.xml new file mode 100644 index 0000000000..11ac8aa0a8 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeMapper.xml @@ -0,0 +1,15 @@ + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeQuery.java new file mode 100644 index 0000000000..3e3b90f26b --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeQuery.java @@ -0,0 +1,13 @@ +package com.yxt.base.biz.base.basegoodstype; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseGoodsTypeQuery implements Query { + private String name; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeService.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeService.java new file mode 100644 index 0000000000..3fb41b9b9c --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeService.java @@ -0,0 +1,120 @@ +package com.yxt.base.biz.base.basegoodstype; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.stereotype.Service; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class BaseGoodsTypeService extends MybatisBaseService { + + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsTypeQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if(StringUtils.isNotBlank(query.getName())){ + qw.like("goodsTypeName",query.getName()); + } + + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + for (BaseGoodsTypeVo record : records) { + if(StringUtils.isNotBlank(record.getPSid())){ + BaseGoodsType wmsGoodsType1 = fetchBySid(record.getPSid()); + record.setPName(wmsGoodsType1.getGoodsTypeName()); + record.setSids(record.getPSid()); + } + } + return rb.success().setData(p); + } public ResultBean> listAll() { + ResultBean rb = ResultBean.fireFail(); + List pagging = baseMapper.selectList(new QueryWrapper().eq("isEnable",1)); + return rb.success().setData(pagging); + } + + public ResultBean saveOrUpdate(BaseGoodsTypeDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + dto.setPSid(dto.getSids()); + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + BaseGoodsType wmsGoodsType = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsGoodsType, "id", "sid"); + wmsGoodsType.setModifyTime(new Date()); + wmsGoodsType.setIsParent("0"); + if(StringUtils.isBlank(wmsGoodsType.getPSid())){ + wmsGoodsType.setIsParent("1"); + } + baseMapper.updateById(wmsGoodsType); + } else { + BaseGoodsType wmsGoods = new BaseGoodsType(); + sid = wmsGoods.getSid(); + BeanUtil.copyProperties(dto, wmsGoods, "id", "sid"); + wmsGoods.setCreateTime(new DateTime()); + wmsGoods.setIsParent("0"); + if(StringUtils.isBlank(wmsGoods.getPSid())){ + wmsGoods.setIsParent("1"); + } + baseMapper.insert(wmsGoods); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsTypeVo vo = new BaseGoodsTypeVo(); + BaseGoodsType wmsGoodsType = fetchBySid(sid); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + if (null != wmsGoodsType) { + BeanUtil.copyProperties(wmsGoodsType, vo); +// if (StringUtils.isNotBlank(wmsGoods.getPicUrl())) { +// vo.setPicUrl(fileUploadComponent.getUrlPrefix() + wmsGoods.getPicUrl()); +// } +// vo.setCreateTime(sdf.format(lpkGoods.getCreateTime())); + if(StringUtils.isNotBlank(wmsGoodsType.getPSid())){ + BaseGoodsType wmsGoodsType1 = fetchBySid(wmsGoodsType.getPSid()); + vo.setPName(wmsGoodsType1.getGoodsTypeName()); + } + vo.setSids(wmsGoodsType.getPSid()); + } + return rb.success().setData(vo); + } + + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsType wmsGoodsType = fetchBySid(sid); + if (null != wmsGoodsType) { + baseMapper.deleteById(wmsGoodsType.getId()); + } + return rb.success(); + } + public ResultBean updateIsEnable(String sid,String isEnable) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsType wmsGoodsType = fetchBySid(sid); + if (null != wmsGoodsType) { + wmsGoodsType.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsGoodsType); + } + return rb.success().setMsg("成功"); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeVo.java new file mode 100644 index 0000000000..8088922080 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsTypeVo.java @@ -0,0 +1,38 @@ +package com.yxt.base.biz.base.basegoodstype; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseGoodsTypeVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String goodsTypeName;//商品类别名称 + private String goodsTypeCode;//类别编码 + private String percentageRate;//提成比例 + private String percentageAmount;//提成金额 + private String pSid;//父级sid + private String pName;//父级sid + private String isParent;//是否为父节点,0为否,1为是,0标识为叶子节点 + private String isGoodsID;//是否一品一码 0 否 1是 + private String sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + private String sids;//创建组织sid +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnit.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnit.java new file mode 100644 index 0000000000..8bf8220951 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnit.java @@ -0,0 +1,14 @@ +package com.yxt.base.biz.base.basegoodsunit; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:36 + */ +@Data +public class BaseGoodsUnit extends BaseEntity { + + private String unitName;//单位名称 +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitDto.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitDto.java new file mode 100644 index 0000000000..4b51897b50 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitDto.java @@ -0,0 +1,27 @@ +package com.yxt.base.biz.base.basegoodsunit; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class BaseGoodsUnitDto implements Dto { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String unitName;//单位名称 +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitMapper.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitMapper.java new file mode 100644 index 0000000000..52e3534f2b --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitMapper.java @@ -0,0 +1,17 @@ +package com.yxt.base.biz.base.basegoodsunit; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface BaseGoodsUnitMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitMapper.xml b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitMapper.xml new file mode 100644 index 0000000000..e2e9a98925 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitMapper.xml @@ -0,0 +1,15 @@ + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitQuery.java new file mode 100644 index 0000000000..ca2b062cae --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitQuery.java @@ -0,0 +1,13 @@ +package com.yxt.base.biz.base.basegoodsunit; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseGoodsUnitQuery implements Query { + private String name; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitService.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitService.java new file mode 100644 index 0000000000..5abc556c4a --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitService.java @@ -0,0 +1,107 @@ +package com.yxt.base.biz.base.basegoodsunit; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.stereotype.Service; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class BaseGoodsUnitService extends MybatisBaseService { + + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsUnitQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if(StringUtils.isNotBlank(query.getName())){ + qw.like("unitName",query.getName()); + } + + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + return rb.success().setData(p); + } public ResultBean> listAll() { + ResultBean rb = ResultBean.fireFail(); + List pagging = baseMapper.selectList(new QueryWrapper().eq("isEnable",1)); + return rb.success().setData(pagging); + } + + public ResultBean saveOrUpdate(BaseGoodsUnitDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + BaseGoodsUnit wmsGoodsType = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsGoodsType, "id", "sid"); + wmsGoodsType.setModifyTime(new Date()); + baseMapper.updateById(wmsGoodsType); + } else { + BaseGoodsUnit wmsGoods = new BaseGoodsUnit(); + sid = wmsGoods.getSid(); + BeanUtil.copyProperties(dto, wmsGoods, "id", "sid"); + wmsGoods.setCreateTime(new DateTime()); +// if (StringUtils.isNotBlank(dto.getPicUrl())) { +// String urlPrefix = fileUploadComponent.getUrlPrefix(); +// String path = dto.getPicUrl().substring(urlPrefix.length()); +// lpkGoods.setPicUrl(path); +// } + baseMapper.insert(wmsGoods); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsUnitVo vo = new BaseGoodsUnitVo(); + BaseGoodsUnit wmsGoodsType = fetchBySid(sid); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + BeanUtil.copyProperties(wmsGoodsType, vo); + if (null != wmsGoodsType) { +// BeanUtil.copyProperties(wmsGoodsType, vo); +// if (StringUtils.isNotBlank(wmsGoods.getPicUrl())) { +// vo.setPicUrl(fileUploadComponent.getUrlPrefix() + wmsGoods.getPicUrl()); +// } +// vo.setCreateTime(sdf.format(lpkGoods.getCreateTime())); +// BaseGoodsUnit wmsGoodsType1 = fetchBySid(wmsGoodsType.getPSid()); +// vo.setPName(wmsGoodsType1.getGoodsTypeName()); + } + return rb.success().setData(vo); + } + + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsUnit wmsGoodsType = fetchBySid(sid); + if (null != wmsGoodsType) { + baseMapper.deleteById(wmsGoodsType.getId()); + } + return rb.success(); + } + public ResultBean updateIsEnable(String sid,String isEnable) { + ResultBean rb = ResultBean.fireFail(); + BaseGoodsUnit wmsGoodsType = fetchBySid(sid); + if (null != wmsGoodsType) { + wmsGoodsType.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsGoodsType); + } + return rb.success().setMsg("成功"); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitVo.java new file mode 100644 index 0000000000..215b3f4bd2 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsunit/BaseGoodsUnitVo.java @@ -0,0 +1,27 @@ +package com.yxt.base.biz.base.basegoodsunit; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseGoodsUnitVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String unitName;//单位名称 +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturer.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturer.java new file mode 100644 index 0000000000..fc59156e75 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturer.java @@ -0,0 +1,20 @@ +package com.yxt.base.biz.base.basemanufacturer; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:36 + */ +@Data +public class BaseManufacturer extends BaseEntity { + private String manufacturerName;//厂家名称 + private String manufacturerCode;//厂家编码 + private String address;//地址 + private String telephone;//电话 + private String contacts;//联系人 + private String sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerDto.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerDto.java new file mode 100644 index 0000000000..fc953b371b --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerDto.java @@ -0,0 +1,35 @@ +package com.yxt.base.biz.base.basemanufacturer; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class BaseManufacturerDto implements Dto { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + + private String manufacturerName;//厂家名称 + private String manufacturerCode;//厂家编码 + private String address;//地址 + private String telephone;//电话 + private String contacts;//联系人 + private String sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerMapper.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerMapper.java new file mode 100644 index 0000000000..5870661389 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerMapper.java @@ -0,0 +1,21 @@ +package com.yxt.base.biz.base.basemanufacturer; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface BaseManufacturerMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + List getAllTypeByUseOrgSid(@Param("useOrgSid") String useOrgSid); +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerMapper.xml b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerMapper.xml new file mode 100644 index 0000000000..2f128ae125 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerMapper.xml @@ -0,0 +1,20 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerQuery.java new file mode 100644 index 0000000000..f54a61c11e --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerQuery.java @@ -0,0 +1,13 @@ +package com.yxt.base.biz.base.basemanufacturer; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseManufacturerQuery implements Query { + private String name; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerService.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerService.java new file mode 100644 index 0000000000..2d49dca555 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerService.java @@ -0,0 +1,111 @@ +package com.yxt.base.biz.base.basemanufacturer; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.stereotype.Service; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class BaseManufacturerService extends MybatisBaseService { + + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + BaseManufacturerQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if(StringUtils.isNotBlank(query.getName())){ + qw.like("goodsTypeName",query.getName()); + } + + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + return rb.success().setData(p); + } + public ResultBean> listAll() { + ResultBean rb = ResultBean.fireFail(); + List pagging = baseMapper.selectList(new QueryWrapper().eq("isEnable",1)); + return rb.success().setData(pagging); + } + + public ResultBean saveOrUpdate(BaseManufacturerDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + BaseManufacturer wmsManufacturer = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsManufacturer, "id", "sid"); + wmsManufacturer.setModifyTime(new Date()); + baseMapper.updateById(wmsManufacturer); + } else { + BaseManufacturer wmsManufacturer = new BaseManufacturer(); + sid = wmsManufacturer.getSid(); + BeanUtil.copyProperties(dto, wmsManufacturer, "id", "sid"); + wmsManufacturer.setCreateTime(new DateTime()); +// if (StringUtils.isNotBlank(dto.getPicUrl())) { +// String urlPrefix = fileUploadComponent.getUrlPrefix(); +// String path = dto.getPicUrl().substring(urlPrefix.length()); +// lpkGoods.setPicUrl(path); +// } + baseMapper.insert(wmsManufacturer); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseManufacturerVo vo = new BaseManufacturerVo(); + BaseManufacturer wmsManufacturer = fetchBySid(sid); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + if (null != wmsManufacturer) { + BeanUtil.copyProperties(wmsManufacturer, vo); +// if (StringUtils.isNotBlank(wmsGoods.getPicUrl())) { +// vo.setPicUrl(fileUploadComponent.getUrlPrefix() + wmsGoods.getPicUrl()); +// } +// vo.setCreateTime(sdf.format(lpkGoods.getCreateTime())); + } + return rb.success().setData(vo); + } + + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseManufacturer wmsManufacturer = fetchBySid(sid); + if (null != wmsManufacturer) { + baseMapper.deleteById(wmsManufacturer.getId()); + } + return rb.success(); + } + public ResultBean updateIsEnable(String sid,String isEnable) { + ResultBean rb = ResultBean.fireFail(); + BaseManufacturer wmsManufacturer = fetchBySid(sid); + if (null != wmsManufacturer) { + wmsManufacturer.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsManufacturer); + } + return rb.success().setMsg("成功"); + } + + public ResultBean> getAllTypeByUseOrgSid(String useOrgSid) { + ResultBean rb = ResultBean.fireFail(); + List list = baseMapper.getAllTypeByUseOrgSid(useOrgSid); + return rb.success().setData(list); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerVo.java new file mode 100644 index 0000000000..57c0f49743 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerVo.java @@ -0,0 +1,36 @@ +package com.yxt.base.biz.base.basemanufacturer; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class BaseManufacturerVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String createBySid; + private String updateBySid; + private String manufacturerName;//厂家名称 + private String manufacturerCode;//厂家编码 + private String address;//地址 + private String telephone;//电话 + private String contacts;//联系人 + private String sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroup.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroup.java new file mode 100644 index 0000000000..b52e16188d --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroup.java @@ -0,0 +1,15 @@ +package com.yxt.base.biz.base.basespecgroup; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/4/8 9:34 + */ +@Data +public class BaseSpecGroup extends BaseEntity { + private String categorySid;//商品分类sid + private String groupName;//组名 + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupDto.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupDto.java new file mode 100644 index 0000000000..b1620a8993 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupDto.java @@ -0,0 +1,22 @@ +package com.yxt.base.biz.base.basespecgroup; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/4/8 9:34 + */ +@Data +public class BaseSpecGroupDto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String categorySid;//商品分类sid + private String groupName;//组名 +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupMapper.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupMapper.java new file mode 100644 index 0000000000..78ed8df453 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupMapper.java @@ -0,0 +1,23 @@ +package com.yxt.base.biz.base.basespecgroup; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface BaseSpecGroupMapper extends BaseMapper { + + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + List getSkusBySpuSid(@Param("spuSid")String spuSid); + BaseSpecGroupVo getVoBySid(@Param("sid")String sid); + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupMapper.xml b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupMapper.xml new file mode 100644 index 0000000000..e0a273e781 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupQuery.java new file mode 100644 index 0000000000..6e5678e3a9 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupQuery.java @@ -0,0 +1,13 @@ +package com.yxt.base.biz.base.basespecgroup; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/4/8 9:34 + */ +@Data +public class BaseSpecGroupQuery implements Query { + private String name; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupService.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupService.java new file mode 100644 index 0000000000..e8067010c3 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupService.java @@ -0,0 +1,115 @@ +package com.yxt.base.biz.base.basespecgroup; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.config.component.FileUploadComponent; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class BaseSpecGroupService extends MybatisBaseService { + @Autowired + private FileUploadComponent fileUploadComponent; + + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + BaseSpecGroupQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getName())) { + qw.like("goodsName", query.getName()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return rb.success().setData(p); + } + @Transactional + public ResultBean saveOrUpdate(BaseSpecGroupDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + BaseSpecGroup wmsGoods = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsGoods, "id", "sid"); + wmsGoods.setModifyTime(new Date()); + baseMapper.updateById(wmsGoods); + } else { + BaseSpecGroup wmsGoods = new BaseSpecGroup(); + BeanUtil.copyProperties(dto, wmsGoods, "id", "sid"); + wmsGoods.setCreateTime(new DateTime()); + baseMapper.insert(wmsGoods); + } + return rb.success().setMsg("成功"); + } + @Transactional + public ResultBean saveOrUpdate(List dtos) { + ResultBean rb = ResultBean.fireFail(); + for (BaseSpecGroupDto dto : dtos) { + BaseSpecGroup sku=baseMapper.selectOne(new QueryWrapper().eq("sid",dto.getSid())); + String sid = ""; + if (null!=sku) { + sid = dto.getSid(); + BaseSpecGroup wmsGoods = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsGoods); + wmsGoods.setModifyTime(new Date()); + baseMapper.updateById(wmsGoods); + } else { + BaseSpecGroup wmsGoods = new BaseSpecGroup(); + BeanUtil.copyProperties(dto, wmsGoods); + wmsGoods.setCreateTime(new DateTime()); + baseMapper.insert(wmsGoods); + } + } + + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseSpecGroupVo vo = baseMapper.getVoBySid(sid); + return rb.success().setData(vo); + } + + public ResultBean> getSkusBySpuSid(String sid) { + ResultBean rb = ResultBean.fireFail(); + List vo = baseMapper.getSkusBySpuSid(sid); + return rb.success().setData(vo); + } + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseSpecGroup wmsGoods = fetchBySid(sid); + if (null != wmsGoods) { + baseMapper.deleteById(wmsGoods.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid, String isEnable) { + ResultBean rb = ResultBean.fireFail(); + BaseSpecGroup wmsGoods = fetchBySid(sid); + if (null != wmsGoods) { + wmsGoods.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsGoods); + } + return rb.success().setMsg("成功"); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupVo.java new file mode 100644 index 0000000000..be37a86392 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecgroup/BaseSpecGroupVo.java @@ -0,0 +1,23 @@ +package com.yxt.base.biz.base.basespecgroup; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/4/8 9:34 + */ +@Data +public class BaseSpecGroupVo { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String categorySid;//商品分类sid + private String categoryName;//商品分类名 + private String groupName;//组名 +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParam.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParam.java new file mode 100644 index 0000000000..c626ad540d --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParam.java @@ -0,0 +1,22 @@ +package com.yxt.base.biz.base.basespecparam; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/4/8 9:34 + */ +@Data +public class BaseSpecParam extends BaseEntity { + private String categorySid;//商品分类sid + private String groupSid;//参数组sid + private String paramName;//参数名 + private String numeric;//是否数字类型 1 true 2false + private String unit;//数字类型的单位 非数字行可为空 + private String generic;//是否sku通用属性1true 2 false + private String searching;//是否用于搜索过滤 1true 2 false + private String segments;//数值类型参数,如果需要搜索。则添加分段间隔值 + + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamDto.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamDto.java new file mode 100644 index 0000000000..e1b613080b --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamDto.java @@ -0,0 +1,30 @@ +package com.yxt.base.biz.base.basespecparam; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.base.biz.base.basegoodsskuextend.BaseGoodsSkuExtendDto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/4/8 9:34 + */ +@Data +public class BaseSpecParamDto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String categorySid;//商品分类sid + private String groupSid;//参数组sid + private String paramName;//参数名 + private String numeric;//是否数字类型 1 true 2false + private String unit;//数字类型的单位 非数字行可为空 + private String generic;//是否sku通用属性1true 2 false + private String searching;//是否用于搜索过滤 1true 2 false + private String segments;//数值类型参数,如果需要搜索。则添加分段间隔值 +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamMapper.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamMapper.java new file mode 100644 index 0000000000..697d77c01d --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamMapper.java @@ -0,0 +1,23 @@ +package com.yxt.base.biz.base.basespecparam; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface BaseSpecParamMapper extends BaseMapper { + + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + List getSkusBySpuSid(@Param("spuSid")String spuSid); + BaseSpecParamVo getVoBySid(@Param("sid")String sid); + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamMapper.xml b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamMapper.xml new file mode 100644 index 0000000000..5e588d5f4c --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamQuery.java new file mode 100644 index 0000000000..e126773c0b --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamQuery.java @@ -0,0 +1,13 @@ +package com.yxt.base.biz.base.basespecparam; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/4/8 9:34 + */ +@Data +public class BaseSpecParamQuery implements Query { + private String name; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamService.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamService.java new file mode 100644 index 0000000000..c311a14080 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamService.java @@ -0,0 +1,122 @@ +package com.yxt.base.biz.base.basespecparam; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.base.biz.base.basegoodsspu.BaseGoodsSpu; +import com.yxt.base.biz.base.basegoodsspu.BaseGoodsSpuService; +import com.yxt.base.biz.base.basegoodsspudetail.BaseGoodsSpuDetailService; +import com.yxt.base.biz.base.basegoodstype.BaseGoodsType; +import com.yxt.base.biz.base.basegoodstype.BaseGoodsTypeService; +import com.yxt.common.base.config.component.FileUploadComponent; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class BaseSpecParamService extends MybatisBaseService { + @Autowired + private FileUploadComponent fileUploadComponent; + + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + BaseSpecParamQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getName())) { + qw.like("goodsName", query.getName()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return rb.success().setData(p); + } + @Transactional + public ResultBean saveOrUpdate(BaseSpecParamDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + BaseSpecParam wmsGoods = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsGoods); + wmsGoods.setModifyTime(new Date()); + baseMapper.updateById(wmsGoods); + } else { + BaseSpecParam wmsGoods = new BaseSpecParam(); + BeanUtil.copyProperties(dto, wmsGoods, "id", "sid"); + wmsGoods.setCreateTime(new DateTime()); + baseMapper.insert(wmsGoods); + } + return rb.success().setMsg("成功"); + } + + + @Transactional + public ResultBean saveOrUpdate(List dtos) { + ResultBean rb = ResultBean.fireFail(); + for (BaseSpecParamDto dto : dtos) { + BaseSpecParam sku=baseMapper.selectOne(new QueryWrapper().eq("sid",dto.getSid())); + String sid = ""; + if (null!=sku) { + sid = dto.getSid(); + BaseSpecParam wmsGoods = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsGoods); + wmsGoods.setModifyTime(new Date()); + baseMapper.updateById(wmsGoods); + } else { + BaseSpecParam wmsGoods = new BaseSpecParam(); + BeanUtil.copyProperties(dto, wmsGoods); + wmsGoods.setCreateTime(new DateTime()); + baseMapper.insert(wmsGoods); + } + } + + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseSpecParamVo vo = baseMapper.getVoBySid(sid); + return rb.success().setData(vo); + } + + public ResultBean> getSkusBySpuSid(String sid) { + ResultBean rb = ResultBean.fireFail(); + List vo = baseMapper.getSkusBySpuSid(sid); + return rb.success().setData(vo); + } + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + BaseSpecParam wmsGoods = fetchBySid(sid); + if (null != wmsGoods) { + baseMapper.deleteById(wmsGoods.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid, String isEnable) { + ResultBean rb = ResultBean.fireFail(); + BaseSpecParam wmsGoods = fetchBySid(sid); + if (null != wmsGoods) { + wmsGoods.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsGoods); + } + return rb.success().setMsg("成功"); + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamVo.java new file mode 100644 index 0000000000..d66c83da86 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basespecparam/BaseSpecParamVo.java @@ -0,0 +1,30 @@ +package com.yxt.base.biz.base.basespecparam; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/4/8 9:34 + */ +@Data +public class BaseSpecParamVo { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String categorySid;//商品分类sid + private String groupSid;//参数组sid + private String paramName;//参数名 + private String numeric;//是否数字类型 1 true 2false + private String unit;//数字类型的单位 非数字行可为空 + private String generic;//是否sku通用属性1true 2 false + private String searching;//是否用于搜索过滤 1true 2 false + private String segments;//数值类型参数,如果需要搜索。则添加分段间隔值 + private String groupName;//参数组名 + private String categoryName;//分类名 +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBank.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBank.java new file mode 100644 index 0000000000..6bf2814012 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBank.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierBank; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBank.java
+ * Class: com.yxt.base.api.basesupplierbank.BaseSupplierBank
+ * Description: 供应商开户行信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商开户行信息", description = "供应商开户行信息") +@TableName("base_supplier_bank") +public class BaseSupplierBank extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("开户行") + private String bankName; // 开户行 + @ApiModelProperty("开户行帐号") + private String bankAccount; // 开户行帐号 + @ApiModelProperty("账户名称") + private String accountName; // 账户名称 + @ApiModelProperty("账户类型key") + private String dueBankKey; // 账户类型key + @ApiModelProperty("账户类型value") + private String dueBankValue; // 账户类型value + @ApiModelProperty("银行网点") + private String bankingOutlets; // 银行网点 + @ApiModelProperty("开户行地址") + private String bankAddress; // 开户行地址 + @ApiModelProperty("联行号") + private String paymentLines; // 联行号 + @ApiModelProperty("银行代码") + private String swiftCode; // 银行代码 + @ApiModelProperty("币种") + private String currency; // 币种 + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankDetailsVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankDetailsVo.java new file mode 100644 index 0000000000..1a2471bb43 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankDetailsVo.java @@ -0,0 +1,77 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierBank; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBankVo.java
+ * Class: com.yxt.base.api.basesupplierbank.BaseSupplierBankVo
+ * Description: 供应商开户行信息 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商开户行信息 视图数据详情", description = "供应商开户行信息 视图数据详情") +public class BaseSupplierBankDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("开户行") + private String bankName; // 开户行 + @ApiModelProperty("开户行帐号") + private String bankAccount; // 开户行帐号 + @ApiModelProperty("账户名称") + private String accountName; // 账户名称 + @ApiModelProperty("账户类型key") + private String dueBankKey; // 账户类型key + @ApiModelProperty("账户类型value") + private String dueBankValue; // 账户类型value + @ApiModelProperty("银行网点") + private String bankingOutlets; // 银行网点 + @ApiModelProperty("开户行地址") + private String bankAddress; // 开户行地址 + @ApiModelProperty("联行号") + private String paymentLines; // 联行号 + @ApiModelProperty("银行代码") + private String swiftCode; // 银行代码 + @ApiModelProperty("币种") + private String currency; // 币种 + +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankDto.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankDto.java new file mode 100644 index 0000000000..b97a6da67a --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankDto.java @@ -0,0 +1,77 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierBank; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBankDto.java
+ * Class: com.yxt.base.api.basesupplierbank.BaseSupplierBankDto
+ * Description: 供应商开户行信息 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商开户行信息 数据传输对象", description = "供应商开户行信息 数据传输对象") +public class BaseSupplierBankDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("开户行") + private String bankName; // 开户行 + @ApiModelProperty("开户行帐号") + private String bankAccount; // 开户行帐号 + @ApiModelProperty("账户名称") + private String accountName; // 账户名称 + @ApiModelProperty("账户类型key") + private String dueBankKey; // 账户类型key + @ApiModelProperty("账户类型value") + private String dueBankValue; // 账户类型value + @ApiModelProperty("银行网点") + private String bankingOutlets; // 银行网点 + @ApiModelProperty("开户行地址") + private String bankAddress; // 开户行地址 + @ApiModelProperty("联行号") + private String paymentLines; // 联行号 + @ApiModelProperty("银行代码") + private String swiftCode; // 银行代码 + @ApiModelProperty("币种") + private String currency; // 币种 + +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankMapper.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankMapper.java new file mode 100644 index 0000000000..47b5ebba89 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankMapper.java @@ -0,0 +1,67 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierBank; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBankMapper.java
+ * Class: com.yxt.base.biz.basesupplierbank.BaseSupplierBankMapper
+ * Description: 供应商开户行信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface BaseSupplierBankMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from base_supplier_bank") + List selectListVo(); + + @Delete("delete from base_supplier_bank where supplierSid = #{supplierSid}") + int deleteBySupplierSid(String supplierSid); + + @Select("select * from base_supplier_bank where supplierSid = #{supplierSid}") + List selectBySupplierSid(String supplierSid); +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankMapper.xml b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankMapper.xml new file mode 100644 index 0000000000..a298da1e02 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankQuery.java new file mode 100644 index 0000000000..c93acd4435 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankQuery.java @@ -0,0 +1,75 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierBank; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBankQuery.java
+ * Class: com.yxt.base.api.basesupplierbank.BaseSupplierBankQuery
+ * Description: 供应商开户行信息 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商开户行信息 查询条件", description = "供应商开户行信息 查询条件") +public class BaseSupplierBankQuery implements Query { + + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("开户行") + private String bankName; // 开户行 + @ApiModelProperty("开户行帐号") + private String bankAccount; // 开户行帐号 + @ApiModelProperty("账户名称") + private String accountName; // 账户名称 + @ApiModelProperty("账户类型key") + private String dueBankKey; // 账户类型key + @ApiModelProperty("账户类型value") + private String dueBankValue; // 账户类型value + @ApiModelProperty("银行网点") + private String bankingOutlets; // 银行网点 + @ApiModelProperty("开户行地址") + private String bankAddress; // 开户行地址 + @ApiModelProperty("联行号") + private String paymentLines; // 联行号 + @ApiModelProperty("银行代码") + private String swiftCode; // 银行代码 + @ApiModelProperty("币种") + private String currency; // 币种 + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankService.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankService.java new file mode 100644 index 0000000000..2096b36525 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankService.java @@ -0,0 +1,105 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierBank; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBankService.java
+ * Class: com.yxt.base.biz.basesupplierbank.BaseSupplierBankService
+ * Description: 供应商开户行信息 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class BaseSupplierBankService extends MybatisBaseService { + + public PagerVo listPageVo(PagerQuery pq) { + BaseSupplierBankQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(BaseSupplierBankDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(BaseSupplierBankDto dto){ + BaseSupplierBank entity = new BaseSupplierBank(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(BaseSupplierBankDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + BaseSupplierBank entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public BaseSupplierBankDetailsVo fetchDetailsVoBySid(String sid){ + BaseSupplierBank entity = fetchBySid(sid); + BaseSupplierBankDetailsVo vo = new BaseSupplierBankDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public int deleteBySupplierSid(String supplierSid) { + return baseMapper.deleteBySupplierSid(supplierSid); + } + + public List selectBySupplierSid(String supplierSid) { + return baseMapper.selectBySupplierSid(supplierSid); + } +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankVo.java new file mode 100644 index 0000000000..c69ab271c5 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierBank/BaseSupplierBankVo.java @@ -0,0 +1,77 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierBank; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBankVo.java
+ * Class: com.yxt.base.api.basesupplierbank.BaseSupplierBankVo
+ * Description: 供应商开户行信息 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商开户行信息 视图数据对象", description = "供应商开户行信息 视图数据对象") +public class BaseSupplierBankVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("开户行") + private String bankName; // 开户行 + @ApiModelProperty("开户行帐号") + private String bankAccount; // 开户行帐号 + @ApiModelProperty("账户名称") + private String accountName; // 账户名称 + @ApiModelProperty("账户类型key") + private String dueBankKey; // 账户类型key + @ApiModelProperty("账户类型value") + private String dueBankValue; // 账户类型value + @ApiModelProperty("银行网点") + private String bankingOutlets; // 银行网点 + @ApiModelProperty("开户行地址") + private String bankAddress; // 开户行地址 + @ApiModelProperty("联行号") + private String paymentLines; // 联行号 + @ApiModelProperty("银行代码") + private String swiftCode; // 银行代码 + @ApiModelProperty("币种") + private String currency; // 币种 + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFile.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFile.java new file mode 100644 index 0000000000..745b864264 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFile.java @@ -0,0 +1,66 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierfile; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFile.java
+ * Class: com.yxt.anrui.as.api.basesupplierfile.BaseSupplierFile
+ * Description: 供应商附件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商附件", description = "供应商附件") +@TableName("base_supplier_file") +public class BaseSupplierFile extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("文件名") + private String fileName; // 文件名 + @ApiModelProperty("文件类型") + private String fileType; // 文件类型 + @ApiModelProperty("关联业务对象sid") + private String linkSid; // 关联业务对象sid + @ApiModelProperty("附件类型") + private String attachType; // 附件类型 + @ApiModelProperty("文件大小") + private String fileSize; // 文件大小 + @ApiModelProperty("文件的路径") + private String filePath; // 文件的路径 + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileDetailsVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileDetailsVo.java new file mode 100644 index 0000000000..4f1a07f083 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileDetailsVo.java @@ -0,0 +1,66 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierfile; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFileVo.java
+ * Class: com.yxt.anrui.as.api.basesupplierfile.BaseSupplierFileVo
+ * Description: 供应商附件 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商附件 视图数据详情", description = "供应商附件 视图数据详情") +public class BaseSupplierFileDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("文件名") + private String fileName; // 文件名 + @ApiModelProperty("文件类型") + private String fileType; // 文件类型 + @ApiModelProperty("关联业务对象sid") + private String linkSid; // 关联业务对象sid + @ApiModelProperty("附件类型") + private String attachType; // 附件类型 + @ApiModelProperty("文件大小") + private String fileSize; // 文件大小 + @ApiModelProperty("文件的路径") + private String filePath; // 文件的路径 + +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileDto.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileDto.java new file mode 100644 index 0000000000..a7eb29297d --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileDto.java @@ -0,0 +1,66 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierfile; + + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFileDto.java
+ * Class: com.yxt.anrui.as.api.basesupplierfile.BaseSupplierFileDto
+ * Description: 供应商附件 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商附件 数据传输对象", description = "供应商附件 数据传输对象") +public class BaseSupplierFileDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("文件名") + private String fileName; // 文件名 + @ApiModelProperty("文件类型") + private String fileType; // 文件类型 + @ApiModelProperty("关联业务对象sid") + private String linkSid; // 关联业务对象sid + @ApiModelProperty("附件类型") + private String attachType; // 附件类型 + @ApiModelProperty("文件大小") + private String fileSize; // 文件大小 + @ApiModelProperty("文件的路径") + private String filePath; // 文件的路径 + +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileMapper.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileMapper.java new file mode 100644 index 0000000000..d9693d9feb --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileMapper.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierfile; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFileMapper.java
+ * Class: com.yxt.anrui.as.biz.basesupplierfile.BaseSupplierFileMapper
+ * Description: 供应商附件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface BaseSupplierFileMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from base_supplier_file") + List selectListVo(); +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileMapper.xml b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileMapper.xml new file mode 100644 index 0000000000..22bb53c176 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileQuery.java new file mode 100644 index 0000000000..adcfd4adaa --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileQuery.java @@ -0,0 +1,64 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierfile; + + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFileQuery.java
+ * Class: com.yxt.anrui.as.api.basesupplierfile.BaseSupplierFileQuery
+ * Description: 供应商附件 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商附件 查询条件", description = "供应商附件 查询条件") +public class BaseSupplierFileQuery implements Query { + + @ApiModelProperty("文件名") + private String fileName; // 文件名 + @ApiModelProperty("文件类型") + private String fileType; // 文件类型 + @ApiModelProperty("关联业务对象sid") + private String linkSid; // 关联业务对象sid + @ApiModelProperty("附件类型") + private String attachType; // 附件类型 + @ApiModelProperty("文件大小") + private String fileSize; // 文件大小 + @ApiModelProperty("文件的路径") + private String filePath; // 文件的路径 + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileService.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileService.java new file mode 100644 index 0000000000..777deb873b --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileService.java @@ -0,0 +1,94 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierfile; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFileService.java
+ * Class: com.yxt.anrui.as.biz.basesupplierfile.BaseSupplierFileService
+ * Description: 供应商附件 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class BaseSupplierFileService extends MybatisBaseService { + + public PagerVo listPageVo(PagerQuery pq) { + BaseSupplierFileQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(BaseSupplierFileDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(BaseSupplierFileDto dto){ + BaseSupplierFile entity = new BaseSupplierFile(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(BaseSupplierFileDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + BaseSupplierFile entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public BaseSupplierFileDetailsVo fetchDetailsVoBySid(String sid){ + BaseSupplierFile entity = fetchBySid(sid); + BaseSupplierFileDetailsVo vo = new BaseSupplierFileDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileVo.java new file mode 100644 index 0000000000..29a788aab3 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierfile/BaseSupplierFileVo.java @@ -0,0 +1,66 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierfile; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFileVo.java
+ * Class: com.yxt.anrui.as.api.basesupplierfile.BaseSupplierFileVo
+ * Description: 供应商附件 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商附件 视图数据对象", description = "供应商附件 视图数据对象") +public class BaseSupplierFileVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("文件名") + private String fileName; // 文件名 + @ApiModelProperty("文件类型") + private String fileType; // 文件类型 + @ApiModelProperty("关联业务对象sid") + private String linkSid; // 关联业务对象sid + @ApiModelProperty("附件类型") + private String attachType; // 附件类型 + @ApiModelProperty("文件大小") + private String fileSize; // 文件大小 + @ApiModelProperty("文件的路径") + private String filePath; // 文件的路径 + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfo.java new file mode 100644 index 0000000000..c89cb37e92 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfo.java @@ -0,0 +1,112 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierinfo; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfo.java
+ * Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfo
+ * Description: 供应商信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息", description = "供应商信息") +@TableName("base_supplier_info") +public class BaseSupplierInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("编码") + private String supplierCode; // 编码 + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("供应商名称拼音") + private String supplierPY; // 供应商名称拼音 + @ApiModelProperty("供应商类型sid") + private String supplierTypeSid; // 供应商类型sid + @ApiModelProperty("供应商类型") + private String supplierTypeName; // 供应商类型 + @ApiModelProperty("省sid") + private String provinceSid; // 省sid + @ApiModelProperty("province") + private String province; // + @ApiModelProperty("市sid") + private String citySid; // 市sid + @ApiModelProperty("city") + private String city; // + @ApiModelProperty("收货县区sid") + private String countySid; // 收货县区sid + @ApiModelProperty("county") + private String county; // + @ApiModelProperty("详细地址") + private String address; // 详细地址 + @ApiModelProperty("手机") + private String contactMobile; // 手机 + @ApiModelProperty("电话") + private String contactTelePhone; // 电话 + @ApiModelProperty("联系人") + private String contactName; // 联系人 + @ApiModelProperty("传真") + private String fax; // 传真 + @ApiModelProperty("邮编") + private String zipCode; // 邮编 + @ApiModelProperty("电子邮件") + private String email; // 电子邮件 + @ApiModelProperty("网址") + private String website; // 网址 + @ApiModelProperty("开票公司名称") + private String billingCompanyName; // 开票公司名称 + @ApiModelProperty("税号") + private String registNum; // 税号 + @ApiModelProperty("法人") + private String legalName; // 法人 + @ApiModelProperty("采购员") + private String purchaser; // 采购员 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("开票类型key") + private String billingTypeKey; // 开票类型key + @ApiModelProperty("开票类型value") + private String billingTypeValue; // 开票类型value + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoChoice.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoChoice.java new file mode 100644 index 0000000000..4409ec170b --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoChoice.java @@ -0,0 +1,54 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierinfo; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfoVo.java
+ * Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfoVo
+ * Description: 供应商信息 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息 视图数据对象", description = "供应商信息 视图数据对象") +public class BaseSupplierInfoChoice implements Vo { + + private String sid; + @ApiModelProperty("供应商名称") + private String supplierName; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoDetailsVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoDetailsVo.java new file mode 100644 index 0000000000..4bdb326393 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoDetailsVo.java @@ -0,0 +1,117 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierinfo; + + +import com.yxt.base.biz.base.basesupplierBank.BaseSupplierBankDetailsVo; +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfoVo.java
+ * Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfoVo
+ * Description: 供应商信息 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息 视图数据详情", description = "供应商信息 视图数据详情") +public class BaseSupplierInfoDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("编码") + private String supplierCode; // 编码 + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("供应商名称拼音") + private String supplierPY; // 供应商名称拼音 + @ApiModelProperty("供应商类型sid") + private String supplierTypeSid; // 供应商类型sid + @ApiModelProperty("供应商类型") + private String supplierTypeName; // 供应商类型 + @ApiModelProperty("省sid") + private String provinceSid; // 省sid + @ApiModelProperty("province") + private String province; // + @ApiModelProperty("市sid") + private String citySid; // 市sid + @ApiModelProperty("city") + private String city; // + @ApiModelProperty("收货县区sid") + private String countySid; // 收货县区sid + @ApiModelProperty("county") + private String county; // + @ApiModelProperty("详细地址") + private String address; // 详细地址 + @ApiModelProperty("手机") + private String contactMobile; // 手机 + @ApiModelProperty("电话") + private String contactTelePhone; // 电话 + @ApiModelProperty("联系人") + private String contactName; // 联系人 + @ApiModelProperty("传真") + private String fax; // 传真 + @ApiModelProperty("邮编") + private String zipCode; // 邮编 + @ApiModelProperty("电子邮件") + private String email; // 电子邮件 + @ApiModelProperty("网址") + private String website; // 网址 + @ApiModelProperty("开票公司名称") + private String billingCompanyName; // 开票公司名称 + @ApiModelProperty("税号") + private String registNum; // 税号 + @ApiModelProperty("法人") + private String legalName; // 法人 + @ApiModelProperty("采购员") + private String purchaser; // 采购员 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("开票类型key") + private String billingTypeKey; // 开票类型key + @ApiModelProperty("开票类型value") + private String billingTypeValue; // 开票类型value + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("供应商开户行") + private List baseSupplierBankList; +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoDto.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoDto.java new file mode 100644 index 0000000000..31b89cf81c --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoDto.java @@ -0,0 +1,117 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierinfo; + + +import com.yxt.base.biz.base.basesupplierBank.BaseSupplierBankDto; +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfoDto.java
+ * Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfoDto
+ * Description: 供应商信息 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息 数据传输对象", description = "供应商信息 数据传输对象") +public class BaseSupplierInfoDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("编码") + private String supplierCode; // 编码 + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("供应商名称拼音") + private String supplierPY; // 供应商名称拼音 + @ApiModelProperty("供应商类型sid") + private String supplierTypeSid; // 供应商类型sid + @ApiModelProperty("供应商类型") + private String supplierTypeName; // 供应商类型 + @ApiModelProperty("省sid") + private String provinceSid; // 省sid + @ApiModelProperty("province") + private String province; // + @ApiModelProperty("市sid") + private String citySid; // 市sid + @ApiModelProperty("city") + private String city; // + @ApiModelProperty("收货县区sid") + private String countySid; // 收货县区sid + @ApiModelProperty("county") + private String county; // + @ApiModelProperty("详细地址") + private String address; // 详细地址 + @ApiModelProperty("手机") + private String contactMobile; // 手机 + @ApiModelProperty("电话") + private String contactTelePhone; // 电话 + @ApiModelProperty("联系人") + private String contactName; // 联系人 + @ApiModelProperty("传真") + private String fax; // 传真 + @ApiModelProperty("邮编") + private String zipCode; // 邮编 + @ApiModelProperty("电子邮件") + private String email; // 电子邮件 + @ApiModelProperty("网址") + private String website; // 网址 + @ApiModelProperty("开票公司名称") + private String billingCompanyName; // 开票公司名称 + @ApiModelProperty("税号") + private String registNum; // 税号 + @ApiModelProperty("法人") + private String legalName; // 法人 + @ApiModelProperty("采购员") + private String purchaser; // 采购员 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("开票类型key") + private String billingTypeKey; // 开票类型key + @ApiModelProperty("开票类型value") + private String billingTypeValue; // 开票类型value + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("开户行信息") + private List baseSupplierBankList; +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoMapper.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoMapper.java new file mode 100644 index 0000000000..d2ab6ed1ff --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoMapper.java @@ -0,0 +1,67 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierinfo; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; + +import java.util.List; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierInfoMapper.java
+ * Class: com.yxt.anrui.as.biz.basesupplierinfo.BaseSupplierInfoMapper
+ * Description: 供应商信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface BaseSupplierInfoMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from base_supplier_info") + List selectListVo(); + + @Update("update base_supplier_info set isDelete = '1' where sid = #{sid}") + int updateBySidIsDelete(String sid); + + @Select("select * from base_supplier_info") + List choiceSupplierInfo(String createOrgSid); +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoMapper.xml b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoMapper.xml new file mode 100644 index 0000000000..22a048d4a4 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoQuery.java new file mode 100644 index 0000000000..cc3d76c98c --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoQuery.java @@ -0,0 +1,63 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierinfo; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfoQuery.java
+ * Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfoQuery
+ * Description: 供应商信息 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息 查询条件", description = "供应商信息 查询条件") +public class BaseSupplierInfoQuery implements Query { + + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("供应商类型") + private String supplierTypeName; + @ApiModelProperty("电话") + private String contactTelePhone; + @ApiModelProperty("联系人") + private String contactName; + + @ApiModelProperty("其他查询条件") + private String otherQuery; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoService.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoService.java new file mode 100644 index 0000000000..20dcce80a1 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoService.java @@ -0,0 +1,168 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierinfo; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.base.biz.base.basesupplierBank.BaseSupplierBank; +import com.yxt.base.biz.base.basesupplierBank.BaseSupplierBankDetailsVo; +import com.yxt.base.biz.base.basesupplierBank.BaseSupplierBankDto; +import com.yxt.base.biz.base.basesupplierBank.BaseSupplierBankService; +import com.yxt.base.feign.portal.sysorganization.SysOrganizationFeign; +import com.yxt.base.feign.portal.sysstafforg.SysStaffOrgFeign; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierInfoService.java
+ * Class: com.yxt.anrui.as.biz.basesupplierinfo.BaseSupplierInfoService
+ * Description: 供应商信息 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class BaseSupplierInfoService extends MybatisBaseService { + + @Autowired + private SysStaffOrgFeign sysStaffOrgFeign; + @Autowired + private SysOrganizationFeign sysOrganizationFeign; + @Autowired + private BaseSupplierBankService baseSupplierBankService; + + public PagerVo listPageVo(PagerQuery pq) { + BaseSupplierInfoQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper(); + if (StringUtils.isNotBlank(query.getSupplierName())){ + qw.like("supplierName",query.getSupplierName()); + } + if (StringUtils.isNotBlank(query.getSupplierTypeName())){ + qw.like("supplierTypeName",query.getSupplierTypeName()); + } + if (StringUtils.isNotBlank(query.getContactTelePhone())){ + qw.like("contactTelePhone",query.getContactTelePhone()); + } + if (StringUtils.isNotBlank(query.getContactName())){ + qw.like("contactName",query.getContactName()); + } + if (StringUtils.isNotBlank(query.getOtherQuery())){ + qw.and(wrapper -> wrapper.like("supplierName", query.getOtherQuery()).or().like("supplierPY", query.getOtherQuery()).or().like("contactTelePhone",query.getOtherQuery())); + } + qw.eq("isDelete",0); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public ResultBean saveOrUpdateDto(BaseSupplierInfoDto dto){ + ResultBean rb = ResultBean.fireFail(); + String dtoSid = dto.getSid(); + List baseSupplierBankDtoList = dto.getBaseSupplierBankList(); + if (baseSupplierBankDtoList == null || baseSupplierBankDtoList.size() == 0){ + return rb.setMsg("开户行信息不能为空"); + } + if (StringUtils.isBlank(dtoSid)) { + String sid = this.insertByDto(dto); + for (BaseSupplierBankDto baseSupplierBankDto : baseSupplierBankDtoList) { + baseSupplierBankDto.setSupplierSid(sid); + baseSupplierBankService.saveOrUpdateDto(baseSupplierBankDto); + } + return rb.success(); + } + this.updateByDto(dto); + for (BaseSupplierBankDto baseSupplierBankDto : baseSupplierBankDtoList) { + String bankSid = baseSupplierBankDto.getSid(); + if(StringUtils.isNotBlank(bankSid)){ + BaseSupplierBank baseSupplierBank = baseSupplierBankService.fetchBySid(bankSid); + BeanUtil.copyProperties(baseSupplierBankDto,baseSupplierBank,"sid"); + baseSupplierBank.setSupplierSid(dtoSid); + baseSupplierBankService.updateById(baseSupplierBank); + }else{ + BaseSupplierBank baseSupplierBank = new BaseSupplierBank(); + BeanUtil.copyProperties(baseSupplierBankDto,baseSupplierBank,"sid"); + baseSupplierBank.setSupplierSid(dtoSid); + baseSupplierBankService.insert(baseSupplierBank); + } + } + return rb.success(); + } + + public String insertByDto(BaseSupplierInfoDto dto){ + BaseSupplierInfo entity = new BaseSupplierInfo(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + return entity.getSid(); + } + + public void updateByDto(BaseSupplierInfoDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + BaseSupplierInfo entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public BaseSupplierInfoDetailsVo fetchDetailsVoBySid(String sid){ + BaseSupplierInfo entity = fetchBySid(sid); + BaseSupplierInfoDetailsVo vo = new BaseSupplierInfoDetailsVo(); + BeanUtil.copyProperties(entity, vo); + List baseSupplierBankDetailsVos = baseSupplierBankService.selectBySupplierSid(sid); + vo.setBaseSupplierBankList(baseSupplierBankDetailsVos); + return vo; + } + + public void delAll(String[] sids) { + for (String sid : sids) { + //删除厂商基础信息 + int count = baseMapper.updateBySidIsDelete(sid); + //删除厂商开户行信息 + int i = baseSupplierBankService.deleteBySupplierSid(sid); + } + } + + public List choiceSupplierInfo(String createOrgSid) { + List baseSupplierInfoChoiceList = baseMapper.choiceSupplierInfo(createOrgSid); + return baseSupplierInfoChoiceList; + } +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoVo.java new file mode 100644 index 0000000000..07ff3115c1 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesupplierinfo/BaseSupplierInfoVo.java @@ -0,0 +1,66 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesupplierinfo; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfoVo.java
+ * Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfoVo
+ * Description: 供应商信息 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息 视图数据对象", description = "供应商信息 视图数据对象") +public class BaseSupplierInfoVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("供应商类型") + private String supplierTypeName; + @ApiModelProperty("详细地址") + private String address; + @ApiModelProperty("电话") + private String contactTelePhone; + @ApiModelProperty("联系人") + private String contactName; + @ApiModelProperty("手机") + private String contactMobile; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierType.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierType.java new file mode 100644 index 0000000000..8985347f22 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierType.java @@ -0,0 +1,62 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesuppliertype; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierType.java
+ * Class: com.yxt.anrui.as.api.basesuppliertype.BaseSupplierType
+ * Description: 供应商类型.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商类型", description = "供应商类型") +@TableName("base_supplier_type") +public class BaseSupplierType extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("供应商类型名称") + private String supplierTypeName; // 供应商类型名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeDetailsVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeDetailsVo.java new file mode 100644 index 0000000000..4ca2f47d27 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeDetailsVo.java @@ -0,0 +1,62 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesuppliertype; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierTypeVo.java
+ * Class: com.yxt.anrui.as.api.basesuppliertype.BaseSupplierTypeVo
+ * Description: 供应商类型 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商类型 视图数据详情", description = "供应商类型 视图数据详情") +public class BaseSupplierTypeDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("供应商类型名称") + private String supplierTypeName; // 供应商类型名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeDto.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeDto.java new file mode 100644 index 0000000000..208aa16992 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeDto.java @@ -0,0 +1,62 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesuppliertype; + + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierTypeDto.java
+ * Class: com.yxt.anrui.as.api.basesuppliertype.BaseSupplierTypeDto
+ * Description: 供应商类型 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商类型 数据传输对象", description = "供应商类型 数据传输对象") +public class BaseSupplierTypeDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("供应商类型名称") + private String supplierTypeName; // 供应商类型名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeMapper.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeMapper.java new file mode 100644 index 0000000000..5365445fed --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeMapper.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesuppliertype; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierTypeMapper.java
+ * Class: com.yxt.anrui.as.biz.basesuppliertype.BaseSupplierTypeMapper
+ * Description: 供应商类型.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface BaseSupplierTypeMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from base_supplier_type") + List selectListVo(); +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeMapper.xml b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeMapper.xml new file mode 100644 index 0000000000..cff8b8109e --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeQuery.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeQuery.java new file mode 100644 index 0000000000..76b9469d58 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeQuery.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesuppliertype; + + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierTypeQuery.java
+ * Class: com.yxt.anrui.as.api.basesuppliertype.BaseSupplierTypeQuery
+ * Description: 供应商类型 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商类型 查询条件", description = "供应商类型 查询条件") +public class BaseSupplierTypeQuery implements Query { + + @ApiModelProperty("供应商类型名称") + private String supplierTypeName; // 供应商类型名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeService.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeService.java new file mode 100644 index 0000000000..8c5a38e400 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeService.java @@ -0,0 +1,94 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesuppliertype; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierTypeService.java
+ * Class: com.yxt.anrui.as.biz.basesuppliertype.BaseSupplierTypeService
+ * Description: 供应商类型 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class BaseSupplierTypeService extends MybatisBaseService { + + public PagerVo listPageVo(PagerQuery pq) { + BaseSupplierTypeQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(BaseSupplierTypeDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(BaseSupplierTypeDto dto){ + BaseSupplierType entity = new BaseSupplierType(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(BaseSupplierTypeDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + BaseSupplierType entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public BaseSupplierTypeDetailsVo fetchDetailsVoBySid(String sid){ + BaseSupplierType entity = fetchBySid(sid); + BaseSupplierTypeDetailsVo vo = new BaseSupplierTypeDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeVo.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeVo.java new file mode 100644 index 0000000000..6fbfe9a1bc --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/base/basesuppliertype/BaseSupplierTypeVo.java @@ -0,0 +1,62 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.base.biz.base.basesuppliertype; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierTypeVo.java
+ * Class: com.yxt.anrui.as.api.basesuppliertype.BaseSupplierTypeVo
+ * Description: 供应商类型 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商类型 视图数据对象", description = "供应商类型 视图数据对象") +public class BaseSupplierTypeVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("供应商类型名称") + private String supplierTypeName; // 供应商类型名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/biz/package-info.java b/yxt-base-biz/src/main/java/com/yxt/base/biz/package-info.java new file mode 100644 index 0000000000..a73f81a49b --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/biz/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通 仓库管理 项目后台逻辑和接口 + */ +package com.yxt.base.biz; \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/config/package-info.java b/yxt-base-biz/src/main/java/com/yxt/base/config/package-info.java new file mode 100644 index 0000000000..c1182e4a7a --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/config/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口-接口声明 + */ +package com.yxt.base.config; \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/feign/package-info.java b/yxt-base-biz/src/main/java/com/yxt/base/feign/package-info.java new file mode 100644 index 0000000000..207e2fb6ae --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/feign/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口-接口声明 + */ +package com.yxt.base.feign; \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/feign/portal/sysorganization/SysOrganizationFeign.java b/yxt-base-biz/src/main/java/com/yxt/base/feign/portal/sysorganization/SysOrganizationFeign.java new file mode 100644 index 0000000000..6e7cb3de66 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/feign/portal/sysorganization/SysOrganizationFeign.java @@ -0,0 +1,35 @@ +package com.yxt.base.feign.portal.sysorganization; + +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.ResponseBody; + +/** + * Project: anrui_portal(门户建设)
+ * File: SysOrganizationFeign.java
+ * Class: com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign
+ * Description: 组织机构表.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2021-08-03 00:24:28
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "组织机构表") +@FeignClient( + contextId = "anrui-portal-SysOrganization", + name = "anrui-portal", + path = "v1/sysorganization") +public interface SysOrganizationFeign { + + @ApiOperation("获取一条记录 根据sid") + @ResponseBody + @GetMapping("/fetchBySid/{sid}") + public ResultBean fetchBySid(@PathVariable("sid") String sid); +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/feign/portal/sysorganization/SysOrganizationVo.java b/yxt-base-biz/src/main/java/com/yxt/base/feign/portal/sysorganization/SysOrganizationVo.java new file mode 100644 index 0000000000..d7d42a133b --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/feign/portal/sysorganization/SysOrganizationVo.java @@ -0,0 +1,88 @@ +package com.yxt.base.feign.portal.sysorganization; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * Project: anrui_portal(门户建设)
+ * File: SysOrganizationVo.java
+ * Class: com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo
+ * Description: 组织机构表 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2021-08-03 00:24:28
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@ApiModel(value = "组织机构表 视图数据对象", description = "组织机构表 视图数据对象") +@Data +public class SysOrganizationVo implements Vo { + @ApiModelProperty("部门/组织名称") + private String name; + + @ApiModelProperty("父(部门/组织) sid") + private String psid; + + @ApiModelProperty("联系电话") + private String linkPhone; + + @ApiModelProperty("联系人") + private String linkPerson; + + @ApiModelProperty("部门sid全路径") + private String orgSidPath; + + @ApiModelProperty("排序") + private Integer sort; + + @ApiModelProperty("地址") + private String addrs; + + @ApiModelProperty("地理位置经纬度") + private String jwd; + + @ApiModelProperty("二维码") + private String qrText; + + @ApiModelProperty("限制本部门成员查看通讯录:限制开启后,本部门成员只能看到限定范围内的通讯录不能看到所有通讯录,仅可见自己") + private Integer limitOrgMember; + + @ApiModelProperty("部门编码") + private String orgCode; + @ApiModelProperty("sid") + private String sid; + @ApiModelProperty("子集") + private List children = new ArrayList<>(); + @ApiModelProperty("主管人员名称") + private String zgNames; + @ApiModelProperty("分管人员名称") + private String fgNames; + @ApiModelProperty("主管人员sid") + private String zgStaffSid; + @ApiModelProperty("分管人员sid") + private String fgStaffSid; + @ApiModelProperty("组织简称") + private String orgAbbre; + @ApiModelProperty("是否是部门(0否,1是)") + private Integer isDept; + @ApiModelProperty("组织属性key") + private String orgAttributeKey; + @ApiModelProperty("组织属性value") + private String orgAttributeValue; + @ApiModelProperty("管理层级key") + private String orgLevelKey; + @ApiModelProperty("管理层级value") + private String orgLevelValue; + @ApiModelProperty("其他编码") + private String otherCode; + @ApiModelProperty("主管用户sid") + private String managerSid; +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/feign/portal/sysstafforg/SysStaffOrgFeign.java b/yxt-base-biz/src/main/java/com/yxt/base/feign/portal/sysstafforg/SysStaffOrgFeign.java new file mode 100644 index 0000000000..3eb8dbb0f7 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/feign/portal/sysstafforg/SysStaffOrgFeign.java @@ -0,0 +1,25 @@ +package com.yxt.base.feign.portal.sysstafforg; + +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; + +/** + * @description: 人员与机构 + * @author: dimengzhe + * @date: 2024/3/6 + **/ +@FeignClient( + contextId = "anrui-portal-SysStaffOrg", + name = "anrui-portal", + path = "v1/sysstafforg") +public interface SysStaffOrgFeign { + + @GetMapping("/getOrgSidByPath") + @ResponseBody + @ApiOperation("根据用户组织全路径获取用户的分公司sid") + ResultBean getOrgSidByPath(@RequestParam("orgPath") String orgPath); +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/feign/wms/wmsinventory/WmsGoodsInventoryVo.java b/yxt-base-biz/src/main/java/com/yxt/base/feign/wms/wmsinventory/WmsGoodsInventoryVo.java new file mode 100644 index 0000000000..9e24ad5a56 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/feign/wms/wmsinventory/WmsGoodsInventoryVo.java @@ -0,0 +1,19 @@ +package com.yxt.base.feign.wms.wmsinventory; + +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/3/25 16:54 + */ +@Data +public class WmsGoodsInventoryVo implements Vo { + + private String goodsSkuOwnSpec;//型号 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseRackName; //货位 + private String count;//库存数量 +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/feign/wms/wmsinventory/WmsInventoryFeign.java b/yxt-base-biz/src/main/java/com/yxt/base/feign/wms/wmsinventory/WmsInventoryFeign.java new file mode 100644 index 0000000000..9ae8f99f46 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/feign/wms/wmsinventory/WmsInventoryFeign.java @@ -0,0 +1,20 @@ +package com.yxt.base.feign.wms.wmsinventory; + +import com.yxt.base.feign.portal.sysorganization.SysOrganizationVo; +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.*; + +@Api(tags = "库存") +@FeignClient( + contextId = "yxt-wms-WmsInventory", + name = "yxt-wms", + path = "apiadmin/inventory/wmsinventory") +public interface WmsInventoryFeign { + + @ApiOperation("根据商品sid查询库存信息") + @PostMapping("/selectInvenBySkuSid") + public ResultBean selectInvenBySkuSid(@RequestParam("skuSid") String skuSid); +} \ No newline at end of file diff --git a/yxt-base-biz/src/main/java/com/yxt/base/utils/DoubleUtils.java b/yxt-base-biz/src/main/java/com/yxt/base/utils/DoubleUtils.java new file mode 100644 index 0000000000..2d2e032198 --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/utils/DoubleUtils.java @@ -0,0 +1,93 @@ +package com.yxt.base.utils; + +import java.math.BigDecimal; + +/** + * @author wangpengfei + * @date 2024/1/24 8:53 + */ +public class DoubleUtils { + + /** + * 对double数据进行取精度. + * @param value double数据. + * @param scale 精度位数(保留的小数位数). + * @param roundingMode 精度取值方式. + * @return 精度计算后的数据. + */ + public static double round(double value, int scale, + int roundingMode) { + BigDecimal bd = BigDecimal.valueOf(value); + bd = bd.setScale(scale, roundingMode); + double d = bd.doubleValue(); + bd = null; + return d; + } + + + /** + * double 相加 + * @param d1 + * @param d2 + * @return + */ + public static double sum(double d1,double d2){ + BigDecimal bd1 = BigDecimal.valueOf(d1); + BigDecimal bd2 = BigDecimal.valueOf(d2); + return bd1.add(bd2).doubleValue(); + } + + + /** + * double 相减 + * @param d1 + * @param d2 + * @return + */ + public static double sub(double d1,double d2){ + BigDecimal bd1 = BigDecimal.valueOf(d1); + BigDecimal bd2 = BigDecimal.valueOf(d2); + return bd1.subtract(bd2).doubleValue(); + } + + /** + * double 乘法 + * @param d1 + * @param d2 + * @return + */ + public static double mul(double d1, double d2){ + BigDecimal bd1 = BigDecimal.valueOf(d1); + BigDecimal bd2 = BigDecimal.valueOf(d2); + return bd1.multiply(bd2).doubleValue(); + } + + + /** + * double 除法 + * @param d1 + * @param d2 + * @param scale 四舍五入 小数点位数 + * @return + */ + public static double div(double d1,double d2,int scale){ + BigDecimal bd1 = BigDecimal.valueOf(d1); + BigDecimal bd2 = BigDecimal.valueOf(d2); + return bd1.divide + (bd2,scale,BigDecimal.ROUND_HALF_UP).doubleValue(); + } + /** + * 去除多余.0 + * @param num + * @return + */ + public static String removeZeros(String num) { + if (num.indexOf(".") > 0) { + // 去掉多余的0 + num = num.replaceAll("0+?$", ""); + // 如果最后一位是. 则去掉 + num = num.replaceAll("[.]$", ""); + } + return num; + } +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/utils/PinYinUtils.java b/yxt-base-biz/src/main/java/com/yxt/base/utils/PinYinUtils.java new file mode 100644 index 0000000000..860c2c065c --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/utils/PinYinUtils.java @@ -0,0 +1,277 @@ +package com.yxt.base.utils; + +import net.sourceforge.pinyin4j.PinyinHelper; +import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; +import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; +import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; +import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType; +import org.apache.commons.lang3.StringUtils; + +import java.util.*; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + * @Description + * @Author liuguohui + * @Date 2021/9/16 + */ +public class PinYinUtils { + + private static HanyuPinyinOutputFormat format = null; + + static { + format = new HanyuPinyinOutputFormat(); + //拼音小写 + format.setCaseType(HanyuPinyinCaseType.LOWERCASE); + //无音标方式;WITH_TONE_NUMBER:1-4数字表示英标;WITH_TONE_MARK:直接用音标符(必须WITH_U_UNICODE否则异常 + format.setToneType(HanyuPinyinToneType.WITHOUT_TONE); + //用v表示ü + format.setVCharType(HanyuPinyinVCharType.WITH_V); + } + + // 多音字 + private static final Map DYZMAP = setDYZMap(); + + private static Map setDYZMap(){ + Map map = new HashMap<>(); + map.put("仇","QIU"); + map.put("柏", "BO"); + map.put("牟", "MU"); + map.put("颉", "XIE"); + map.put("解", "XIE"); + map.put("尉", "YU"); + map.put("奇", "JI"); + map.put("单", "SHAN"); + map.put("谌", "SHEN"); + map.put("乐", "YUE"); + map.put("召", "SHAO"); + map.put("朴", "PIAO"); + map.put("区", "OU"); + map.put("查", "ZHA"); + map.put("曾", "ZENG"); + map.put("缪", "MIAO"); + map.put("晟", "CHENG"); + map.put("员", "YUN"); + map.put("贠", "YUN"); + map.put("黑", "HE"); + map.put("重", "CHONG"); + map.put("秘", "BI"); + map.put("冼", "XIAN"); + map.put("折", "SHE"); + map.put("翟", "ZHAI"); + map.put("盖", "GE"); + map.put("万俟", "MOQI"); + map.put("尉迟", "YUCHI"); + return map; + } + + + + /** + * 返回字符串的拼音 + * @param str + * @return + */ + public static String[] getCharPinYinString(String str) { + if (str == null || str.length() < 1) { + return null; + } + List result = new ArrayList(); + //对字符串中的记录逐个分析 + for (int i = 0; i < str.length(); i++) { + result = getCharPinYinString(str.charAt(i), result); + } + return result.toArray(new String[result.size()]); + } + + /** + * 将字符c的拼音拼接到list中的记录中 + * @param c + * @param list + * @return + */ + private static List getCharPinYinString(char c, List list) { + String[] strs = getCharPinYinString(c); + List result = new ArrayList(); + // strs去重(多音字) + strs = disdinctStr(strs); + + //如果解析出的拼音为空,判断字符C是否为英文字母,如果是英文字母则添加值拼音结果中 + if (strs == null) { + if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) { + c = c <= 91 ? (char)(c + 32) : c; + if (list == null || list.size() == 0) { + result.add(c + ""); + } else { + for (String s : list) { + result.add(s + c); + } + } + return result; + } + return list; + } + //将字符C的拼音首和已存在的拼音首组合成新的记录 + for (String str : strs) { + if (list == null || list.size() == 0) { + result.add(str); + } else { + for (String s : list) { + result.add(s + str); + } + } + } + return result; + } + + /** + * 返回汉字的拼音 + * @param c + * @return + */ + public static String[] getCharPinYinString(char c) { + try { + //返回字符C的拼音 + return PinyinHelper.toHanyuPinyinStringArray(c, format); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 返回字符串的拼音的首字母 + * @param str + * @return + */ + public static String[] getCharPinYinChar(String str) { + if (str == null || str.length() < 1) { + return null; + } + List result = new ArrayList(); + //对字符串中的记录逐个分析 + for (int i = 0; i < str.length(); i++) { + result = getCharPinYinChar(str.charAt(i), result); + } + return result.toArray(new String[result.size()]); + } + + /** + * 将字符c的拼音首字母拼接到list中的记录中 + * @param c + * @param list + * @return + */ + private static List getCharPinYinChar(char c, List list) { + char[] chars = getCharPinYinChar(c); + List result = new ArrayList(); + //如果解析出的拼音为空,判断字符C是否为英文字母,如果是英文字母则添加值拼音结果中 + if (chars == null) { + if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) { + c = c < 91 ? (char)(c + 32) : c; + if (list == null || list.size() == 0) { + result.add(c + ""); + } else { + for (String s : list) { + result.add(s + c); + } + } + return result; + } + return list; + } + //将字符C的拼音首字母和已存在的拼音首字母组合成新的记录 + for (char ch : chars) { + if (list == null || list.size() == 0) { + result.add(ch + ""); + } else { + for (String s : list) { + result.add(s + ch); + } + } + } + return result; + } + + /** + * 返回汉字拼音首字母 + * @param c + * @return + */ + public static char[] getCharPinYinChar(char c) { + //字符C的拼音 + String[] strs = getCharPinYinString(c); + if (strs != null) { + //截取拼音的首字母 + char[] chars = new char[strs.length]; + for(int i = 0; i arrStream = Arrays.stream(str); + List arrList = arrStream.distinct().collect(Collectors.toList()); + str = new String[arrList.size()]; + arrList.toArray(str); + return str; + } + + /** + * 判断传入的字符串是否为中文,将中文的转换为拼音 + * @param name + * @return + */ + public static String getPinYinName(String name){ + char[] nameArray = name.toCharArray(); + String newName = ""; + for (int i = 0; i < nameArray.length; i++) { + if (Character.toString(nameArray[i]).matches("^[\u4e00-\u9fa5]+$")) { // 如果字符是中文,则将中文转为汉语拼音 + String[] pinYinString = PinYinUtils.getCharPinYinString(nameArray[i]); + // strs去重(多音字) + pinYinString = disdinctStr(pinYinString); + String pinYinStr = StringUtils.join(pinYinString); + newName = newName + pinYinStr; + }else { + newName = newName + Character.toString(nameArray[i]); + } + } + return newName; + } + + /** + * 返回字符串的拼音的首字母(包括多音字) + * @param str + * @return + */ + public static String getCharDuoPinYinChar(String str) { + if (str == null || str.length() < 1) { + return null; + } + char firstChar = str.toCharArray()[0]; + if(Character.toString(firstChar).matches("^[\u4e00-\u9fa5]+$")){ // 为中文 + char[] charPinYinChar = getCharPinYinChar(firstChar); + String result = ""; + if (DYZMAP.containsKey(Character.toString(firstChar))) { + result = DYZMAP.get(Character.toString(firstChar)).toString().substring(0, 1); + }else { + result = StringUtils.join(charPinYinChar[0]); + } + return result.toUpperCase(); + }else if(Character.toString(firstChar).matches("^[a-zA-Z]")){ // 为英文字母 + return Character.toString(firstChar).toUpperCase(); + }else { // 特殊符号 + return "#"; + } + } + +} diff --git a/yxt-base-biz/src/main/java/com/yxt/base/utils/StyleUtils.java b/yxt-base-biz/src/main/java/com/yxt/base/utils/StyleUtils.java new file mode 100644 index 0000000000..02d7d7a5ac --- /dev/null +++ b/yxt-base-biz/src/main/java/com/yxt/base/utils/StyleUtils.java @@ -0,0 +1,89 @@ +package com.yxt.base.utils; + +import com.alibaba.excel.write.metadata.style.WriteCellStyle; +import com.alibaba.excel.write.metadata.style.WriteFont; +import org.apache.poi.ss.usermodel.BorderStyle; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.apache.poi.ss.usermodel.VerticalAlignment; + +/** + * @author wangpengfei + * @date 2023/12/16 22:14 + */ +public class StyleUtils { /** + * 标题样式 + * @return + */ +public static WriteCellStyle getHeadStyle(){ + // 头的策略 + WriteCellStyle headWriteCellStyle = new WriteCellStyle(); + // 背景颜色 +// headWriteCellStyle.setFillForegroundColor(IndexedColors.LIGHT_TURQUOISE1.getIndex()); +// headWriteCellStyle.setFillPatternType(FillPatternType.SOLID_FOREGROUND); + + // 字体 + WriteFont headWriteFont = new WriteFont(); + headWriteFont.setFontName("宋体");//设置字体名字 + headWriteFont.setFontHeightInPoints((short)14);//设置字体大小 + headWriteFont.setBold(true);//字体加粗 + headWriteCellStyle.setWriteFont(headWriteFont); //在样式用应用设置的字体; + + // 样式 + headWriteCellStyle.setBorderBottom(BorderStyle.THIN);//设置底边框; + headWriteCellStyle.setBottomBorderColor((short) 0);//设置底边框颜色; + headWriteCellStyle.setBorderLeft(BorderStyle.THIN); //设置左边框; + headWriteCellStyle.setLeftBorderColor((short) 0);//设置左边框颜色; + headWriteCellStyle.setBorderRight(BorderStyle.THIN);//设置右边框; + headWriteCellStyle.setRightBorderColor((short) 0);//设置右边框颜色; + headWriteCellStyle.setBorderTop(BorderStyle.THIN);//设置顶边框; + headWriteCellStyle.setTopBorderColor((short) 0); //设置顶边框颜色; + + headWriteCellStyle.setWrapped(true); //设置自动换行; + + headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);//设置水平对齐的样式为居中对齐; + headWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); //设置垂直对齐的样式为居中对齐; + headWriteCellStyle.setShrinkToFit(true);//设置文本收缩至合适 + + return headWriteCellStyle; +} + + + /** + * 内容样式 + * @return + */ + public static WriteCellStyle getContentStyle(){ + // 内容的策略 + WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); + + // 背景绿色 + // 这里需要指定 FillPatternType 为FillPatternType.SOLID_FOREGROUND 不然无法显示背景颜色.头默认了 FillPatternType所以可以不指定 +// contentWriteCellStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex()); +// contentWriteCellStyle.setFillPatternType(FillPatternType.SOLID_FOREGROUND); + + // 设置字体 + WriteFont contentWriteFont = new WriteFont(); + contentWriteFont.setFontHeightInPoints((short) 12);//设置字体大小 + contentWriteFont.setFontName("宋体"); //设置字体名字 + contentWriteCellStyle.setWriteFont(contentWriteFont);//在样式用应用设置的字体; + + //设置样式; + contentWriteCellStyle.setBorderBottom(BorderStyle.THIN);//设置底边框; + contentWriteCellStyle.setBottomBorderColor((short) 0);//设置底边框颜色; + contentWriteCellStyle.setBorderLeft(BorderStyle.THIN); //设置左边框; + contentWriteCellStyle.setLeftBorderColor((short) 0);//设置左边框颜色; + contentWriteCellStyle.setBorderRight(BorderStyle.THIN);//设置右边框; + contentWriteCellStyle.setRightBorderColor((short) 0);//设置右边框颜色; + contentWriteCellStyle.setBorderTop(BorderStyle.THIN);//设置顶边框; + contentWriteCellStyle.setTopBorderColor((short) 0); ///设置顶边框颜色; + + contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);// 水平居中 + contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);// 垂直居中 + contentWriteCellStyle.setWrapped(true); //设置自动换行; + +// contentWriteCellStyle.setShrinkToFit(true);//设置文本收缩至合适 + + return contentWriteCellStyle; + } + +} diff --git a/yxt-base-biz/src/main/resources/application-dev.yml b/yxt-base-biz/src/main/resources/application-dev.yml new file mode 100644 index 0000000000..03df6e8b96 --- /dev/null +++ b/yxt-base-biz/src/main/resources/application-dev.yml @@ -0,0 +1,30 @@ +spring: + datasource: + hikari: + max-lifetime: 500000 + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://39.104.100.138:3306/yxt_base?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true + username: root + password: yxt_mysql_138 + cloud: + nacos: + discovery: + server-addr: 39.104.100.138:8848 + register-enabled: false + redis: + database: 3 # Redis数据库索引(默认为0) + host: 39.104.100.138 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: D:\\anrui\\upload\\ + url: + prefix: http://192.168.1.106:8111/upload/ \ No newline at end of file diff --git a/yxt-base-biz/src/main/resources/application-pro.yml b/yxt-base-biz/src/main/resources/application-pro.yml new file mode 100644 index 0000000000..ad9fd69fe9 --- /dev/null +++ b/yxt-base-biz/src/main/resources/application-pro.yml @@ -0,0 +1,27 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://120.46.172.184:3306/yxt_base?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: root + password: '@anrui18033887500' + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + redis: + database: 3 # Redis数据库索引(默认为0) + host: 127.0.0.1 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: D:\anrui\upload\ + url: + prefix: http://120.46.172.184/api/upload/ \ No newline at end of file diff --git a/yxt-base-biz/src/main/resources/application-test.yml b/yxt-base-biz/src/main/resources/application-test.yml new file mode 100644 index 0000000000..0e2ee3ab73 --- /dev/null +++ b/yxt-base-biz/src/main/resources/application-test.yml @@ -0,0 +1,31 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://172.18.0.4:3306/yxt_base?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: root + password: yxt_mysql_138 + hikari: + minimum-idle: 3 + max-lifetime: 30000 + maximum-pool-size: 10 + cloud: + nacos: + discovery: + server-addr: 172.18.0.5:8848 + redis: + database: 3 # Redis数据库索引(默认为0) + host: 172.18.0.7 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: /home/lzh/docker_data/nginx/html/anrui-system-ui/upload/ + url: + prefix: http://anrui.yyundong.com/upload/ \ No newline at end of file diff --git a/yxt-base-biz/src/main/resources/application.yml b/yxt-base-biz/src/main/resources/application.yml new file mode 100644 index 0000000000..09bdb5c18c --- /dev/null +++ b/yxt-base-biz/src/main/resources/application.yml @@ -0,0 +1,43 @@ +spring: + application: + name: yxt-base + profiles: + active: dev + messages: + # 国际化资源文件路径 + basename: i18n/messages + servlet: + #上传文件 + multipart: + max-file-size: 50MB + max-request-size: 100MB + devtools: + restart: + # 热部署开关 + enabled: true + +server: + port: 7305 + max-http-header-size: 102400 + undertow: + max-http-post-size: -1 + +#mybatis +mybatis-plus: + # 配置mapper的扫描,找到所有的mapper.xml映射文件 + mapper-locations: classpath*:**Mapper.xml + global-config: + refresh: true + db-config: + #定义生成ID的类型 + id-type: Auto + db-type: mysql + configuration: + map-underscore-to-camel-case: false + cache-enabled: true + call-setters-on-nulls: true + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + + + + diff --git a/yxt-base-biz/src/main/resources/logback-spring.xml b/yxt-base-biz/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000..21286ac4f6 --- /dev/null +++ b/yxt-base-biz/src/main/resources/logback-spring.xml @@ -0,0 +1,50 @@ + + + + + + + + + + %yellow(%date{yyyy-MM-dd HH:mm:ss}) |%highlight(%-5level) |%green(%logger:%line) |%blue(%msg%n) + + + + + + + + + + + + + + + ${log.base}.log + + ${log.base}.%d{yyyyMMdd}.%i.log.zip + + + + 1MB + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} + -%msg%n + + + + + + + + + + \ No newline at end of file diff --git a/yxt-base-biz/src/test/java/com/yxt/base/YxtBaseApplicationTest.java b/yxt-base-biz/src/test/java/com/yxt/base/YxtBaseApplicationTest.java new file mode 100644 index 0000000000..72c202fe4c --- /dev/null +++ b/yxt-base-biz/src/test/java/com/yxt/base/YxtBaseApplicationTest.java @@ -0,0 +1,24 @@ +package com.yxt.base; + +import cn.hutool.core.util.IdUtil; +import org.junit.Test; + +import java.util.UUID; + +public class YxtBaseApplicationTest { + + @Test + public void test() { + System.out.println(IdUtil.nanoId()); + System.out.println(IdUtil.getSnowflakeNextId()); + + UUID uuid = UUID.randomUUID(); + String uniqueID = uuid.toString().replaceAll("-", "").substring(0, 16).replaceAll("\\D", ""); + System.out.println(uniqueID); + } +} + +//do3KW8XIUSyu4vg_zTXdm +// 1727231267909320704 +//uw0AotdmQTlIxKlA2V8_O +// 1727231437887668224