├── .gitignore ├── LICENSE ├── README.en.md ├── README.es.md ├── README.md ├── db ├── init-data.sql ├── init-db.sql ├── update.sql └── 数据库设计文档.docx ├── pom.xml ├── psi-common ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ ├── bytechainx │ │ │ └── psi │ │ │ │ └── common │ │ │ │ ├── BizException.java │ │ │ │ ├── CommonConfig.java │ │ │ │ ├── CommonConstant.java │ │ │ │ ├── EnumConstant.java │ │ │ │ ├── Modules.java │ │ │ │ ├── Permissions.java │ │ │ │ ├── ProductVersions.java │ │ │ │ ├── TransactionService.java │ │ │ │ ├── annotation │ │ │ │ └── Permission.java │ │ │ │ ├── api │ │ │ │ └── TraderCenterApi.java │ │ │ │ ├── dto │ │ │ │ ├── BarCode.java │ │ │ │ ├── ConditionFilter.java │ │ │ │ ├── SmsCodeDto.java │ │ │ │ └── UserSession.java │ │ │ │ ├── kit │ │ │ │ ├── BarCodeKit.java │ │ │ │ ├── CipherkeyUtil.java │ │ │ │ ├── DESUtil.java │ │ │ │ ├── DateUtil.java │ │ │ │ ├── FileKit.java │ │ │ │ ├── ImageKit.java │ │ │ │ ├── NumberToCN.java │ │ │ │ ├── OrderCodeBuilder.java │ │ │ │ ├── PackageUtil.java │ │ │ │ ├── PinYinUtil.java │ │ │ │ ├── RandomUtil.java │ │ │ │ ├── SharedMethodLib.java │ │ │ │ ├── SmsKit.java │ │ │ │ ├── StrUtil.java │ │ │ │ ├── TokenUtil.java │ │ │ │ ├── XmlProtocolSupport.java │ │ │ │ ├── ZipUtils.java │ │ │ │ ├── ZxingUtil.java │ │ │ │ └── excel │ │ │ │ │ ├── ColumnConvert.java │ │ │ │ │ ├── ColumnValidate.java │ │ │ │ │ ├── PoiException.java │ │ │ │ │ ├── RowFilter.java │ │ │ │ │ ├── TypeKit.java │ │ │ │ │ ├── XlsDetailWriter.java │ │ │ │ │ ├── XlsKit.java │ │ │ │ │ ├── XlsReadRule.java │ │ │ │ │ ├── XlsReader.java │ │ │ │ │ ├── XlsRender.java │ │ │ │ │ ├── XlsWriter.java │ │ │ │ │ └── interceptor │ │ │ │ │ ├── PostListProcessor.java │ │ │ │ │ ├── PostXlsProcessor.java │ │ │ │ │ ├── PreListProcessor.java │ │ │ │ │ ├── PreXlsProcessor.java │ │ │ │ │ └── XlsUploadInterceptor.java │ │ │ │ ├── model │ │ │ │ ├── CustomerCategory.java │ │ │ │ ├── CustomerInfo.java │ │ │ │ ├── CustomerPriceLevel.java │ │ │ │ ├── GoodsAttribute.java │ │ │ │ ├── GoodsAttributeRef.java │ │ │ │ ├── GoodsCategory.java │ │ │ │ ├── GoodsImageRef.java │ │ │ │ ├── GoodsInfo.java │ │ │ │ ├── GoodsPrice.java │ │ │ │ ├── GoodsPrintTag.java │ │ │ │ ├── GoodsSpec.java │ │ │ │ ├── GoodsSpecOptions.java │ │ │ │ ├── GoodsSpecRef.java │ │ │ │ ├── GoodsStockConfig.java │ │ │ │ ├── GoodsUnit.java │ │ │ │ ├── InventoryChecking.java │ │ │ │ ├── InventoryCheckingGoods.java │ │ │ │ ├── InventoryStock.java │ │ │ │ ├── InventoryStockLog.java │ │ │ │ ├── MsgNotice.java │ │ │ │ ├── MsgNoticeSend.java │ │ │ │ ├── PurchaseOrder.java │ │ │ │ ├── PurchaseOrderCost.java │ │ │ │ ├── PurchaseOrderFee.java │ │ │ │ ├── PurchaseOrderFund.java │ │ │ │ ├── PurchaseOrderGoods.java │ │ │ │ ├── PurchaseOrderLog.java │ │ │ │ ├── PurchaseRejectOrder.java │ │ │ │ ├── PurchaseRejectOrderCost.java │ │ │ │ ├── PurchaseRejectOrderFee.java │ │ │ │ ├── PurchaseRejectOrderFund.java │ │ │ │ ├── PurchaseRejectOrderGoods.java │ │ │ │ ├── PurchaseRejectOrderLog.java │ │ │ │ ├── SaleOrder.java │ │ │ │ ├── SaleOrderCost.java │ │ │ │ ├── SaleOrderFee.java │ │ │ │ ├── SaleOrderFund.java │ │ │ │ ├── SaleOrderGoods.java │ │ │ │ ├── SaleOrderLog.java │ │ │ │ ├── SaleRejectOrder.java │ │ │ │ ├── SaleRejectOrderCost.java │ │ │ │ ├── SaleRejectOrderFee.java │ │ │ │ ├── SaleRejectOrderFund.java │ │ │ │ ├── SaleRejectOrderGoods.java │ │ │ │ ├── SaleRejectOrderLog.java │ │ │ │ ├── SupplierCategory.java │ │ │ │ ├── SupplierInfo.java │ │ │ │ ├── SystemOper.java │ │ │ │ ├── TenantAdmin.java │ │ │ │ ├── TenantConfig.java │ │ │ │ ├── TenantExportLog.java │ │ │ │ ├── TenantOperLog.java │ │ │ │ ├── TenantOrg.java │ │ │ │ ├── TenantPayOrder.java │ │ │ │ ├── TenantPayOrderLog.java │ │ │ │ ├── TenantPrintTemplate.java │ │ │ │ ├── TenantRole.java │ │ │ │ ├── TenantRoleOperRef.java │ │ │ │ ├── TenantSmsLog.java │ │ │ │ ├── TraderBalanceAccount.java │ │ │ │ ├── TraderBookAccount.java │ │ │ │ ├── TraderBookAccountLogs.java │ │ │ │ ├── TraderCustomerReceivable.java │ │ │ │ ├── TraderFundOrder.java │ │ │ │ ├── TraderFundType.java │ │ │ │ ├── TraderIncomeExpenses.java │ │ │ │ ├── TraderIncomeExpensesFund.java │ │ │ │ ├── TraderPayOrder.java │ │ │ │ ├── TraderPayOrderFund.java │ │ │ │ ├── TraderPayOrderRef.java │ │ │ │ ├── TraderReceiptOrder.java │ │ │ │ ├── TraderReceiptOrderFund.java │ │ │ │ ├── TraderReceiptOrderRef.java │ │ │ │ ├── TraderSupplierPayable.java │ │ │ │ ├── TraderTransferOrder.java │ │ │ │ ├── _Generator.java │ │ │ │ ├── _MappingKit.java │ │ │ │ └── base │ │ │ │ │ ├── BaseCustomerCategory.java │ │ │ │ │ ├── BaseCustomerInfo.java │ │ │ │ │ ├── BaseCustomerPriceLevel.java │ │ │ │ │ ├── BaseGoodsAttribute.java │ │ │ │ │ ├── BaseGoodsAttributeRef.java │ │ │ │ │ ├── BaseGoodsCategory.java │ │ │ │ │ ├── BaseGoodsImageRef.java │ │ │ │ │ ├── BaseGoodsInfo.java │ │ │ │ │ ├── BaseGoodsPrice.java │ │ │ │ │ ├── BaseGoodsPrintTag.java │ │ │ │ │ ├── BaseGoodsSpec.java │ │ │ │ │ ├── BaseGoodsSpecOptions.java │ │ │ │ │ ├── BaseGoodsSpecRef.java │ │ │ │ │ ├── BaseGoodsStockConfig.java │ │ │ │ │ ├── BaseGoodsUnit.java │ │ │ │ │ ├── BaseInventoryChecking.java │ │ │ │ │ ├── BaseInventoryCheckingGoods.java │ │ │ │ │ ├── BaseInventoryStock.java │ │ │ │ │ ├── BaseInventoryStockLog.java │ │ │ │ │ ├── BaseMsgNotice.java │ │ │ │ │ ├── BaseMsgNoticeSend.java │ │ │ │ │ ├── BasePurchaseOrder.java │ │ │ │ │ ├── BasePurchaseOrderCost.java │ │ │ │ │ ├── BasePurchaseOrderFee.java │ │ │ │ │ ├── BasePurchaseOrderFund.java │ │ │ │ │ ├── BasePurchaseOrderGoods.java │ │ │ │ │ ├── BasePurchaseOrderLog.java │ │ │ │ │ ├── BasePurchaseRejectOrder.java │ │ │ │ │ ├── BasePurchaseRejectOrderCost.java │ │ │ │ │ ├── BasePurchaseRejectOrderFee.java │ │ │ │ │ ├── BasePurchaseRejectOrderFund.java │ │ │ │ │ ├── BasePurchaseRejectOrderGoods.java │ │ │ │ │ ├── BasePurchaseRejectOrderLog.java │ │ │ │ │ ├── BaseSaleOrder.java │ │ │ │ │ ├── BaseSaleOrderCost.java │ │ │ │ │ ├── BaseSaleOrderFee.java │ │ │ │ │ ├── BaseSaleOrderFund.java │ │ │ │ │ ├── BaseSaleOrderGoods.java │ │ │ │ │ ├── BaseSaleOrderLog.java │ │ │ │ │ ├── BaseSaleRejectOrder.java │ │ │ │ │ ├── BaseSaleRejectOrderCost.java │ │ │ │ │ ├── BaseSaleRejectOrderFee.java │ │ │ │ │ ├── BaseSaleRejectOrderFund.java │ │ │ │ │ ├── BaseSaleRejectOrderGoods.java │ │ │ │ │ ├── BaseSaleRejectOrderLog.java │ │ │ │ │ ├── BaseSupplierCategory.java │ │ │ │ │ ├── BaseSupplierInfo.java │ │ │ │ │ ├── BaseSystemOper.java │ │ │ │ │ ├── BaseTenantAdmin.java │ │ │ │ │ ├── BaseTenantConfig.java │ │ │ │ │ ├── BaseTenantExportLog.java │ │ │ │ │ ├── BaseTenantOperLog.java │ │ │ │ │ ├── BaseTenantOrg.java │ │ │ │ │ ├── BaseTenantPayOrder.java │ │ │ │ │ ├── BaseTenantPayOrderLog.java │ │ │ │ │ ├── BaseTenantPrintTemplate.java │ │ │ │ │ ├── BaseTenantRole.java │ │ │ │ │ ├── BaseTenantRoleOperRef.java │ │ │ │ │ ├── BaseTenantSmsLog.java │ │ │ │ │ ├── BaseTraderBalanceAccount.java │ │ │ │ │ ├── BaseTraderBookAccount.java │ │ │ │ │ ├── BaseTraderBookAccountLogs.java │ │ │ │ │ ├── BaseTraderCustomerReceivable.java │ │ │ │ │ ├── BaseTraderFundOrder.java │ │ │ │ │ ├── BaseTraderFundType.java │ │ │ │ │ ├── BaseTraderIncomeExpenses.java │ │ │ │ │ ├── BaseTraderIncomeExpensesFund.java │ │ │ │ │ ├── BaseTraderPayOrder.java │ │ │ │ │ ├── BaseTraderPayOrderFund.java │ │ │ │ │ ├── BaseTraderPayOrderRef.java │ │ │ │ │ ├── BaseTraderReceiptOrder.java │ │ │ │ │ ├── BaseTraderReceiptOrderFund.java │ │ │ │ │ ├── BaseTraderReceiptOrderRef.java │ │ │ │ │ ├── BaseTraderSupplierPayable.java │ │ │ │ │ └── BaseTraderTransferOrder.java │ │ │ │ ├── plugin │ │ │ │ ├── QuartzPlugin.java │ │ │ │ ├── RedisSessionManager.java │ │ │ │ ├── RedisSessionManagerFactory.java │ │ │ │ ├── Reflect.java │ │ │ │ ├── ReflectException.java │ │ │ │ └── ResourceKit.java │ │ │ │ └── service │ │ │ │ ├── base │ │ │ │ └── CommonService.java │ │ │ │ ├── export │ │ │ │ └── ExportLogService.java │ │ │ │ ├── goods │ │ │ │ ├── GoodsAttributeService.java │ │ │ │ ├── GoodsCategoryService.java │ │ │ │ ├── GoodsInfoService.java │ │ │ │ ├── GoodsPriceService.java │ │ │ │ ├── GoodsPrintTagService.java │ │ │ │ ├── GoodsSpecService.java │ │ │ │ └── GoodsUnitService.java │ │ │ │ ├── msg │ │ │ │ └── MsgNoticeService.java │ │ │ │ └── setting │ │ │ │ ├── ConfigPrintService.java │ │ │ │ ├── ConfigSystemService.java │ │ │ │ ├── SystemOperLogService.java │ │ │ │ ├── SystemResetService.java │ │ │ │ ├── TenantAdminService.java │ │ │ │ ├── TenantInfoService.java │ │ │ │ ├── TenantMerchantPayService.java │ │ │ │ ├── TenantPayOrderService.java │ │ │ │ └── TenantRoleService.java │ │ │ └── silkie │ │ │ ├── PidConstant.java │ │ │ ├── epc │ │ │ ├── BaseParam.java │ │ │ ├── Epc.java │ │ │ ├── EpcErrCode.java │ │ │ ├── EpcEvent.java │ │ │ ├── MillsCounter.java │ │ │ ├── ModeLock.java │ │ │ ├── PerfTrace.java │ │ │ └── impl │ │ │ │ ├── BaseEpc.java │ │ │ │ ├── BaseEpcEvent.java │ │ │ │ ├── Collision.java │ │ │ │ ├── EpcEventParam.java │ │ │ │ ├── EpcFactory.java │ │ │ │ ├── SimpleEpc.java │ │ │ │ └── ThreadPoolEpc.java │ │ │ ├── field │ │ │ └── CommonProtocol.java │ │ │ └── util │ │ │ ├── DoubleUtil.java │ │ │ └── ZipUtils.java │ └── resources │ │ ├── commonConfig │ │ ├── app-config-dev.txt │ │ └── printTpl │ │ │ ├── goods_tag.tpl │ │ │ ├── inventory_checking.tpl │ │ │ ├── purchase_order.tpl │ │ │ ├── purchase_reject_order.tpl │ │ │ ├── sale_order.tpl │ │ │ ├── sale_reject_order.tpl │ │ │ ├── trader_pay_order.tpl │ │ │ └── trader_receipt_order.tpl │ │ └── log4j.properties │ └── test │ └── java │ └── com │ └── bytechainx │ └── psi │ └── common │ ├── SystemOperGenerator.java │ └── system-oper.sql ├── psi-fund ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── bytechainx │ └── psi │ └── fund │ └── service │ ├── AccountFundTypeService.java │ ├── AccountInfoService.java │ ├── AccountTransferService.java │ ├── BookCustomerBillService.java │ ├── BookPayOrderService.java │ ├── BookReceiptOrderService.java │ ├── BookSupplierBillService.java │ ├── FlowExpensesService.java │ ├── FlowIncomeService.java │ ├── StatFundOrderService.java │ ├── StatProfitService.java │ └── base │ └── BaseService.java ├── psi-purchase ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── bytechainx │ └── psi │ └── purchase │ └── service │ ├── PurchaseOrderService.java │ ├── PurchaseRejectOrderService.java │ ├── StatPurchaseGoodsService.java │ ├── StatPurchaseService.java │ ├── StatStockService.java │ ├── StockCheckingService.java │ ├── StockInfoService.java │ ├── StockWarningService.java │ ├── SupplierCategoryService.java │ ├── SupplierInfoService.java │ └── base │ └── BaseService.java ├── psi-sale ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── bytechainx │ └── psi │ └── sale │ └── service │ ├── CustomerCategoryService.java │ ├── CustomerInfoService.java │ ├── CustomerPriceLevelService.java │ ├── SaleOrderService.java │ ├── SaleRejectOrderService.java │ ├── StatHotSaleService.java │ ├── StatSaleService.java │ ├── StatStoreSaleService.java │ └── base │ └── BaseService.java ├── psi-web ├── App.sh ├── package.xml ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── bytechainx │ │ └── psi │ │ └── web │ │ ├── App.java │ │ ├── config │ │ └── AppConfig.java │ │ ├── epc │ │ ├── TraderEventProducer.java │ │ ├── base │ │ │ └── BaseTraderEvent.java │ │ └── event │ │ │ ├── fund │ │ │ ├── AccountInfoEvent.java │ │ │ ├── AccountTransferEvent.java │ │ │ ├── BookPayOrderEvent.java │ │ │ ├── BookReceiptOrderEvent.java │ │ │ ├── FlowExpensesEvent.java │ │ │ └── FlowIncomeEvent.java │ │ │ ├── inventory │ │ │ ├── PurchaseOrderEvent.java │ │ │ ├── PurchaseRejectOrderEvent.java │ │ │ ├── StockCheckingEvent.java │ │ │ └── SupplierInfoEvent.java │ │ │ └── sale │ │ │ ├── CustomerInfoEvent.java │ │ │ ├── SaleOrderEvent.java │ │ │ └── SaleRejectOrderEvent.java │ │ ├── job │ │ ├── OrderCodeBuilderJob.java │ │ └── base │ │ │ └── BaseJob.java │ │ └── web │ │ ├── controller │ │ ├── DashboardController.java │ │ ├── ExportLogController.java │ │ ├── UploadController.java │ │ ├── account │ │ │ ├── AccountController.java │ │ │ └── LoginController.java │ │ ├── base │ │ │ └── BaseController.java │ │ ├── fund │ │ │ ├── AccountFundTypeController.java │ │ │ ├── AccountInfoController.java │ │ │ ├── AccountTransferController.java │ │ │ ├── BookCustomerBillController.java │ │ │ ├── BookPayOrderController.java │ │ │ ├── BookReceiptOrderController.java │ │ │ ├── BookSupplierBillController.java │ │ │ ├── FlowExpensesController.java │ │ │ ├── FlowIncomeController.java │ │ │ ├── StatFundOrderController.java │ │ │ └── StatProfitController.java │ │ ├── goods │ │ │ ├── GoodsAttributeController.java │ │ │ ├── GoodsCategoryController.java │ │ │ ├── GoodsInfoController.java │ │ │ ├── GoodsPrintTagController.java │ │ │ ├── GoodsSpecController.java │ │ │ └── GoodsUnitController.java │ │ ├── inventory │ │ │ ├── PurchaseOrderController.java │ │ │ ├── PurchaseRejectOrderController.java │ │ │ ├── StatPurchaseController.java │ │ │ ├── StatPurchaseGoodsController.java │ │ │ ├── StatStockController.java │ │ │ ├── StockCheckingController.java │ │ │ ├── StockInfoController.java │ │ │ ├── SupplierCategoryController.java │ │ │ └── SupplierInfoController.java │ │ ├── msg │ │ │ └── MsgNoticeController.java │ │ ├── sale │ │ │ ├── CustomerCategoryController.java │ │ │ ├── CustomerInfoController.java │ │ │ ├── CustomerPriceLevelController.java │ │ │ ├── SaleOrderController.java │ │ │ ├── SaleRejectOrderController.java │ │ │ ├── StatHotSaleController.java │ │ │ ├── StatSaleController.java │ │ │ └── StatStoreSaleController.java │ │ └── setting │ │ │ ├── ConfigPrintController.java │ │ │ ├── ConfigSystemController.java │ │ │ ├── SystemOperLogController.java │ │ │ ├── TenantAdminController.java │ │ │ ├── TenantInfoController.java │ │ │ └── TenantRoleController.java │ │ └── interceptor │ │ ├── OperLogInterceptor.java │ │ ├── PermissionInterceptor.java │ │ └── ViewContextInterceptor.java │ └── webapp │ └── WEB-INF │ └── views │ ├── account │ ├── activeIndex.html │ ├── edit.html │ └── editPwd.html │ ├── common │ ├── _commonMethod.html │ ├── _noLogin.html │ ├── _nopermission.html │ └── _paginate.html │ ├── dashboard │ ├── home.html │ ├── index.html │ ├── loadGoodsStatByDay.html │ ├── loadSaleStatByDay.html │ └── service.html │ ├── export │ └── log │ │ ├── index.html │ │ └── list.html │ ├── fund │ ├── account │ │ ├── fundType │ │ │ ├── _form.html │ │ │ ├── add.html │ │ │ ├── edit.html │ │ │ ├── index.html │ │ │ ├── list.html │ │ │ └── optionList.html │ │ ├── info │ │ │ ├── _form.html │ │ │ ├── add.html │ │ │ ├── edit.html │ │ │ ├── index.html │ │ │ ├── list.html │ │ │ └── optionList.html │ │ └── transfer │ │ │ ├── _form.html │ │ │ ├── add.html │ │ │ ├── edit.html │ │ │ ├── index.html │ │ │ ├── list.html │ │ │ └── show.html │ ├── book │ │ ├── customerBill │ │ │ ├── editOpenBalance.html │ │ │ ├── index.html │ │ │ ├── list.html │ │ │ ├── show.html │ │ │ └── showList.html │ │ ├── payOrder │ │ │ ├── _form.html │ │ │ ├── add.html │ │ │ ├── audit.html │ │ │ ├── draftIndex.html │ │ │ ├── draftList.html │ │ │ ├── edit.html │ │ │ ├── editDraft.html │ │ │ ├── index.html │ │ │ ├── list.html │ │ │ ├── purchaseOrderList.html │ │ │ ├── show.html │ │ │ └── showPrint.html │ │ ├── receiptOrder │ │ │ ├── _form.html │ │ │ ├── add.html │ │ │ ├── audit.html │ │ │ ├── draftIndex.html │ │ │ ├── draftList.html │ │ │ ├── edit.html │ │ │ ├── editDraft.html │ │ │ ├── index.html │ │ │ ├── list.html │ │ │ ├── saleOrderList.html │ │ │ ├── show.html │ │ │ └── showPrint.html │ │ └── supplierBill │ │ │ ├── editOpenBalance.html │ │ │ ├── index.html │ │ │ ├── list.html │ │ │ ├── show.html │ │ │ └── showList.html │ ├── flow │ │ ├── expenses │ │ │ ├── _form.html │ │ │ ├── add.html │ │ │ ├── audit.html │ │ │ ├── draftIndex.html │ │ │ ├── draftList.html │ │ │ ├── edit.html │ │ │ ├── editDraft.html │ │ │ ├── index.html │ │ │ ├── list.html │ │ │ └── show.html │ │ └── income │ │ │ ├── _form.html │ │ │ ├── add.html │ │ │ ├── audit.html │ │ │ ├── draftIndex.html │ │ │ ├── draftList.html │ │ │ ├── edit.html │ │ │ ├── editDraft.html │ │ │ ├── index.html │ │ │ ├── list.html │ │ │ └── show.html │ └── stat │ │ ├── fundOrder │ │ ├── index.html │ │ └── list.html │ │ └── profit │ │ ├── index.html │ │ └── list.html │ ├── goods │ └── goods │ │ ├── attribute │ │ ├── _form.html │ │ ├── add.html │ │ ├── edit.html │ │ ├── index.html │ │ ├── list.html │ │ └── optionList.html │ │ ├── category │ │ ├── _form.html │ │ ├── add.html │ │ ├── edit.html │ │ ├── index.html │ │ ├── list.html │ │ └── optionList.html │ │ ├── printTag │ │ ├── _form.html │ │ ├── index.html │ │ └── list.html │ │ ├── spec │ │ ├── _form.html │ │ ├── add.html │ │ ├── edit.html │ │ ├── index.html │ │ ├── list.html │ │ └── optionList.html │ │ └── unit │ │ ├── _form.html │ │ ├── add.html │ │ ├── edit.html │ │ ├── index.html │ │ ├── list.html │ │ └── optionList.html │ ├── index.html │ ├── inventory │ ├── purchase │ │ ├── order │ │ │ ├── _form.html │ │ │ ├── add.html │ │ │ ├── audit.html │ │ │ ├── draftIndex.html │ │ │ ├── draftList.html │ │ │ ├── edit.html │ │ │ ├── editDraft.html │ │ │ ├── index.html │ │ │ ├── list.html │ │ │ ├── show.html │ │ │ ├── showOrderLog.html │ │ │ ├── showPayLog.html │ │ │ └── showPrint.html │ │ └── rejectOrder │ │ │ ├── _form.html │ │ │ ├── add.html │ │ │ ├── audit.html │ │ │ ├── draftIndex.html │ │ │ ├── draftList.html │ │ │ ├── edit.html │ │ │ ├── editDraft.html │ │ │ ├── index.html │ │ │ ├── list.html │ │ │ ├── show.html │ │ │ ├── showOrderLog.html │ │ │ ├── showPayLog.html │ │ │ └── showPrint.html │ ├── stat │ │ └── purchase │ │ │ ├── index.html │ │ │ ├── list.html │ │ │ ├── show.html │ │ │ ├── showGoods.html │ │ │ ├── showGoodsList.html │ │ │ └── showList.html │ ├── stock │ │ └── checking │ │ │ ├── _form.html │ │ │ ├── add.html │ │ │ ├── audit.html │ │ │ ├── draftIndex.html │ │ │ ├── draftList.html │ │ │ ├── edit.html │ │ │ ├── editDraft.html │ │ │ ├── index.html │ │ │ ├── list.html │ │ │ ├── show.html │ │ │ └── showPrint.html │ └── supplier │ │ └── category │ │ ├── _form.html │ │ ├── add.html │ │ ├── edit.html │ │ ├── index.html │ │ ├── list.html │ │ └── optionList.html │ ├── msg │ └── notice │ │ ├── index.html │ │ ├── list.html │ │ └── show.html │ ├── sale │ └── customer │ │ ├── category │ │ ├── _form.html │ │ ├── add.html │ │ ├── edit.html │ │ ├── index.html │ │ ├── list.html │ │ └── optionList.html │ │ ├── info │ │ ├── _form.html │ │ ├── add.html │ │ ├── edit.html │ │ ├── index.html │ │ ├── list.html │ │ └── show.html │ │ └── priceLevel │ │ ├── _form.html │ │ ├── add.html │ │ ├── edit.html │ │ ├── index.html │ │ └── list.html │ └── setting │ └── tenant │ └── info │ ├── edit.html │ ├── index.html │ └── list.html └── readme-pic ├── contact.png ├── demo-home.png ├── demo-print.png ├── demo-salecadd.png ├── demo-saleorder.png ├── demo-setting.png ├── demo-shouyin.png ├── logo.png ├── paychannel.png ├── weixin.jpg └── weixinpay.jpg /.gitignore: -------------------------------------------------------------------------------- 1 | .metadata 2 | bin/ 3 | tmp/ 4 | *.tmp 5 | *.bak 6 | *.swp 7 | *~.nib 8 | local.properties 9 | .settings 10 | .loadpath 11 | .recommenders 12 | .classpath 13 | .project 14 | .class 15 | 16 | # External tool builders 17 | .externalToolBuilders/ 18 | 19 | # Locally stored "Eclipse launch configurations" 20 | *.launch 21 | 22 | # PyDev specific (Python IDE for Eclipse) 23 | *.pydevproject 24 | 25 | # CDT-specific (C/C++ Development Tooling) 26 | .cproject 27 | 28 | # CDT- autotools 29 | .autotools 30 | 31 | # Java annotation processor (APT) 32 | .factorypath 33 | 34 | # PDT-specific (PHP Development Tools) 35 | .buildpath 36 | 37 | # sbteclipse plugin 38 | .target 39 | 40 | # Tern plugin 41 | .tern-project 42 | 43 | # TeXlipse plugin 44 | .texlipse 45 | 46 | # STS (Spring Tool Suite) 47 | .springBeans 48 | 49 | # Code Recommenders 50 | .recommenders/ 51 | 52 | # Annotation Processing 53 | .apt_generated/ 54 | .apt_generated_test/ 55 | 56 | # Scala IDE specific (Scala & Java development for Eclipse) 57 | .cache-main 58 | .scala_dependencies 59 | .worksheet 60 | 61 | # Uncomment this line if you wish to ignore the project description file. 62 | # Typically, this file would be tracked if it contains build/dependency configurations: 63 | #.project 64 | -------------------------------------------------------------------------------- /db/init-data.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guandianyun/psi/0f6913f39c4f4098f571653ed5b5851636430fae/db/init-data.sql -------------------------------------------------------------------------------- /db/update.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guandianyun/psi/0f6913f39c4f4098f571653ed5b5851636430fae/db/update.sql -------------------------------------------------------------------------------- /db/数据库设计文档.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guandianyun/psi/0f6913f39c4f4098f571653ed5b5851636430fae/db/数据库设计文档.docx -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/BizException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.common; 5 | 6 | /** 7 | * 业务异常 8 | * 9 | * @author defier 10 | * 11 | */ 12 | public class BizException extends RuntimeException { 13 | 14 | private static final long serialVersionUID = 1L; 15 | 16 | public BizException(String message) { 17 | super(message); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/Modules.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.common; 5 | 6 | /** 7 | * 系统应用模块 8 | * @author defier 9 | * 10 | */ 11 | public enum Modules { 12 | 13 | core("核心模块"), 14 | ; 15 | 16 | private String name; 17 | 18 | private Modules(String name) { 19 | this.name = name; 20 | } 21 | 22 | public String getName() { 23 | return name; 24 | } 25 | 26 | public static Modules getEnum(String value) { 27 | for (Modules c : Modules.values()) { 28 | if (value.equalsIgnoreCase(c.name())) { 29 | return c; 30 | } 31 | } 32 | return null; 33 | } 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/ProductVersions.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.common; 5 | 6 | /** 7 | * 产品版本 8 | * @author defier 9 | * 10 | */ 11 | public enum ProductVersions { 12 | 13 | common("通用专业"), 14 | food("食品酒饮"), 15 | fashion("服装鞋帽"), 16 | material("五金建材"), 17 | electrical("家电数码"), 18 | book("文体图书"), 19 | daylife("日化用品"), 20 | mombaby("母婴用品"), 21 | automobile("汽修汽配"), 22 | supermarket("商超便利"), 23 | medical("医疗器械") 24 | ; 25 | 26 | private String name; 27 | 28 | private ProductVersions(String name) { 29 | this.name = name; 30 | } 31 | 32 | public String getName() { 33 | return name; 34 | } 35 | 36 | public static ProductVersions getEnum(String value) { 37 | for (ProductVersions c : ProductVersions.values()) { 38 | if (value.equalsIgnoreCase(c.name())) { 39 | return c; 40 | } 41 | } 42 | return null; 43 | } 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/annotation/Permission.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | import com.bytechainx.psi.common.Permissions; 10 | 11 | /** 12 | * 权限点注解,标注在action上面 13 | * @author defier.lai 14 | * @version 1.0 15 | */ 16 | @Target({ElementType.METHOD}) 17 | @Retention(RetentionPolicy.RUNTIME) 18 | @Documented 19 | public @interface Permission { 20 | /** 21 | * 操作代码 22 | * @return 23 | */ 24 | public abstract Permissions[] value(); 25 | } -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/dto/BarCode.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.common.dto; 5 | 6 | import java.util.Date; 7 | 8 | import com.bytechainx.psi.common.kit.DateUtil; 9 | 10 | /** 11 | * 商品条码,GS1码 12 | * @author defier 13 | * 14 | */ 15 | public class BarCode { 16 | 17 | private String code; // 条码 18 | private Date productionDate; // 生产日期(11) 19 | private Date expirationDate; // 失效日期(17) 20 | private String batchNumber; // 生产批号(10) 21 | 22 | public String getCode() { 23 | return code; 24 | } 25 | public void setCode(String code) { 26 | this.code = code; 27 | } 28 | public Date getProductionDate() { 29 | return productionDate; 30 | } 31 | public void setProductionDate(Date productionDate) { 32 | this.productionDate = productionDate; 33 | } 34 | public Date getExpirationDate() { 35 | return expirationDate; 36 | } 37 | public void setExpirationDate(Date expirationDate) { 38 | this.expirationDate = expirationDate; 39 | } 40 | public String getBatchNumber() { 41 | return batchNumber; 42 | } 43 | public void setBatchNumber(String batchNumber) { 44 | this.batchNumber = batchNumber; 45 | } 46 | 47 | public String toString() { 48 | return getCode()+"."+getBatchNumber()+"."+DateUtil.getDayStr(getExpirationDate())+"."+DateUtil.getDayStr(getProductionDate()); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/dto/ConditionFilter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.common.dto; 5 | 6 | /** 7 | * 条件查询对象 8 | * @author defier 9 | * 10 | */ 11 | public class ConditionFilter { 12 | 13 | private Operator operator; // 运算符 14 | private Object value; // 条件值 15 | 16 | public Operator getOperator() { 17 | return operator; 18 | } 19 | 20 | public void setOperator(Operator operator) { 21 | this.operator = operator; 22 | } 23 | 24 | public Object getValue() { 25 | return value; 26 | } 27 | 28 | public void setValue(Object value) { 29 | this.value = value; 30 | } 31 | 32 | public enum Operator { 33 | eq, // =,相等 34 | more, // 多个条件 35 | neq, // != 不相等 36 | like, // like %% 模糊查询 37 | in, // in (xxx) 38 | notIn, // not in (xxx) 39 | gt, // 大于 40 | lt // 小于 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/dto/SmsCodeDto.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.common.dto; 5 | 6 | import java.io.Serializable; 7 | import java.util.Date; 8 | 9 | /** 10 | * 短信验证码dto 11 | * @author defier 12 | * 13 | */ 14 | public class SmsCodeDto implements Serializable { 15 | 16 | private static final long serialVersionUID = 1L; 17 | 18 | private String code; // 验证码 19 | private Date sendTime; // 生成验证码的时间 20 | private String mobile; // 接收的手机号 21 | 22 | public SmsCodeDto(String code,Date sendTime,String mobile){ 23 | this.code = code; 24 | this.sendTime = sendTime; 25 | this.mobile = mobile; 26 | } 27 | 28 | public String getCode() { 29 | return code; 30 | } 31 | 32 | public void setCode(String code) { 33 | this.code = code; 34 | } 35 | 36 | public Date getSendTime() { 37 | return sendTime; 38 | } 39 | 40 | public void setSendTime(Date sendTime) { 41 | this.sendTime = sendTime; 42 | } 43 | 44 | public String getMobile() { 45 | return mobile; 46 | } 47 | 48 | public void setMobile(String mobile) { 49 | this.mobile = mobile; 50 | } 51 | 52 | 53 | } 54 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/kit/SharedMethodLib.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 本项目采用《咖啡授权协议》,保护知识产权,就是在保护我们自己身处的行业。 3 | * 4 | * Copyright (c) 2011-2021, jfinal.com 5 | */ 6 | 7 | package com.bytechainx.psi.common.kit; 8 | 9 | import java.util.concurrent.ThreadLocalRandom; 10 | 11 | /** 12 | * 用于 enjoy 模板引擎的 Shared Method 库 13 | */ 14 | public class SharedMethodLib { 15 | 16 | boolean devMode; 17 | Integer ver; 18 | 19 | public SharedMethodLib setDevMode(boolean devMode) { 20 | this.devMode = devMode; 21 | return this; 22 | } 23 | 24 | /** 25 | * 设置 js、css 的版本号,用于部署环境 26 | */ 27 | public SharedMethodLib setVer(int ver) { 28 | this.ver = ver; 29 | return this; 30 | } 31 | 32 | /** 33 | * 生成 js、css 的版本号,开发环境生成动态值用于消除浏览器缓存,从而实时看到效果 34 | * 部署环境直接输出 setVer(...) 配置的值,便于浏览器缓存 35 | * 36 | * 使用例子在 _admin_layout.html 中: 37 | * 38 | * 39 | */ 40 | public Integer ver() { 41 | return devMode ? ThreadLocalRandom.current().nextInt() : ver; 42 | } 43 | } 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/kit/TokenUtil.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.kit; 2 | 3 | import java.util.UUID; 4 | 5 | public class TokenUtil { 6 | 7 | private static final String DEFAULT_TOKEN_PREFIX = "quant:"; 8 | 9 | /** 10 | * APP 创建token 11 | * @param userInfoId 12 | * @return 13 | */ 14 | public static String getToken(Integer userInfoId) { 15 | return DEFAULT_TOKEN_PREFIX + userInfoId + ":token:" + UUID.randomUUID().toString(); 16 | } 17 | 18 | /** 19 | * token 搜索 20 | * @param userInfoId 21 | * @return 22 | */ 23 | public static String getLikeToken(Integer userInfoId) { 24 | return DEFAULT_TOKEN_PREFIX + userInfoId + ":token:*"; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/kit/excel/ColumnConvert.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.common.kit.excel; 5 | 6 | /** 7 | * @author defier 8 | * 9 | */ 10 | import org.apache.poi.ss.formula.functions.T; 11 | 12 | import com.jfinal.plugin.activerecord.Model; 13 | 14 | /** 15 | * 单元格值转换器 16 | */ 17 | public interface ColumnConvert { 18 | T convert(Object val, Model model); 19 | } -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/kit/excel/ColumnValidate.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.kit.excel; 2 | 3 | public interface ColumnValidate { 4 | boolean validate(Object obj); 5 | } 6 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/kit/excel/PoiException.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.kit.excel; 2 | 3 | public class PoiException extends RuntimeException { 4 | 5 | private static final long serialVersionUID = 1L; 6 | 7 | public PoiException(String message) { 8 | super(message); 9 | } 10 | 11 | public PoiException(Throwable cause) { 12 | super(cause); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/kit/excel/RowFilter.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.kit.excel; 2 | 3 | import java.util.List; 4 | 5 | public interface RowFilter { 6 | boolean doFilter(int rowNum, List list); 7 | } 8 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/kit/excel/interceptor/PostListProcessor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.common.kit.excel.interceptor; 5 | 6 | /** 7 | * @author defier 8 | * 9 | */ 10 | import java.util.List; 11 | 12 | import com.jfinal.plugin.activerecord.Model; 13 | 14 | public interface PostListProcessor { 15 | void process(List> list) ; 16 | } 17 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/kit/excel/interceptor/PostXlsProcessor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.common.kit.excel.interceptor; 5 | 6 | import com.jfinal.plugin.activerecord.Model; 7 | 8 | /** 9 | * excel解析后置处理器 ,在整个excel对象保存完毕之后调用 10 | */ 11 | public interface PostXlsProcessor { 12 | void process(Model m); 13 | } 14 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/kit/excel/interceptor/PreListProcessor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.common.kit.excel.interceptor; 5 | 6 | import java.util.List; 7 | 8 | import com.jfinal.plugin.activerecord.Model; 9 | 10 | /** 11 | * @author defier 12 | * 13 | */ 14 | public interface PreListProcessor { 15 | void process(List> list); 16 | } 17 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/kit/excel/interceptor/PreXlsProcessor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.common.kit.excel.interceptor; 5 | 6 | import com.jfinal.plugin.activerecord.Model; 7 | 8 | /** 9 | * excel解析前置处理器,在每一个元素 保存之前调用 10 | */ 11 | public interface PreXlsProcessor { 12 | void process(Model m); 13 | } 14 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/CustomerCategory.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseCustomerCategory; 4 | 5 | /** 6 | * 客户分类 7 | */ 8 | @SuppressWarnings("serial") 9 | public class CustomerCategory extends BaseCustomerCategory { 10 | 11 | public static final CustomerCategory dao = new CustomerCategory().dao(); 12 | 13 | public CustomerCategory findById(Integer id) { 14 | return CustomerCategory.dao.findFirst("select * from customer_category where id = ? limit 1", id); 15 | } 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/CustomerPriceLevel.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import java.util.List; 4 | 5 | import com.bytechainx.psi.common.EnumConstant.DataStatusEnum; 6 | import com.bytechainx.psi.common.model.base.BaseCustomerPriceLevel; 7 | 8 | /** 9 | * 客户价格等级 10 | */ 11 | @SuppressWarnings("serial") 12 | public class CustomerPriceLevel extends BaseCustomerPriceLevel { 13 | 14 | public static final CustomerPriceLevel dao = new CustomerPriceLevel().dao(); 15 | 16 | public CustomerPriceLevel findById(Integer id) { 17 | return CustomerPriceLevel.dao.findFirst("select * from customer_price_level where id = ? limit 1", id); 18 | } 19 | 20 | public List findAll() { 21 | return CustomerPriceLevel.dao.find("select * from customer_price_level where data_status = ?", DataStatusEnum.enable.getValue()); 22 | } 23 | 24 | 25 | public CustomerPriceLevel findRetailPriceLevel() { 26 | return CustomerPriceLevel.dao.findFirst("select * from customer_price_level where name = ? limit 1", "零售价"); 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/GoodsAttribute.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.commons.lang.StringUtils; 6 | 7 | import com.bytechainx.psi.common.EnumConstant.DataStatusEnum; 8 | import com.bytechainx.psi.common.EnumConstant.GoodsAttrTypeEnum; 9 | import com.bytechainx.psi.common.model.base.BaseGoodsAttribute; 10 | 11 | /** 12 | * 商品属性 13 | */ 14 | @SuppressWarnings("serial") 15 | public class GoodsAttribute extends BaseGoodsAttribute { 16 | 17 | public static final GoodsAttribute dao = new GoodsAttribute().dao(); 18 | 19 | public GoodsAttribute findById(Integer id) { 20 | return GoodsAttribute.dao.findFirst("select * from goods_attribute where id = ? and data_status != ? limit 1", id, DataStatusEnum.delete.getValue()); 21 | } 22 | 23 | public List findAll() { 24 | return GoodsAttribute.dao.find("select * from goods_attribute "); 25 | } 26 | 27 | public String[] getAttrValueList() { 28 | return StringUtils.split(getAttrValues(), ","); 29 | } 30 | 31 | public String getAttrTypeName() { 32 | return GoodsAttrTypeEnum.getEnum(getAttrType()).getName(); 33 | } 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/GoodsAttributeRef.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseGoodsAttributeRef; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class GoodsAttributeRef extends BaseGoodsAttributeRef { 10 | 11 | public static final GoodsAttributeRef dao = new GoodsAttributeRef().dao(); 12 | 13 | } 14 | 15 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/GoodsImageRef.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseGoodsImageRef; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class GoodsImageRef extends BaseGoodsImageRef { 10 | public static final GoodsImageRef dao = new GoodsImageRef().dao(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/GoodsSpecOptions.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseGoodsSpecOptions; 4 | 5 | /** 6 | * 商品规格选项 7 | */ 8 | @SuppressWarnings("serial") 9 | public class GoodsSpecOptions extends BaseGoodsSpecOptions { 10 | public static final GoodsSpecOptions dao = new GoodsSpecOptions().dao(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/GoodsSpecRef.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.apache.commons.lang.StringUtils; 7 | 8 | import com.bytechainx.psi.common.CommonConstant; 9 | import com.bytechainx.psi.common.model.base.BaseGoodsSpecRef; 10 | 11 | /** 12 | * 商品规格关联 13 | */ 14 | @SuppressWarnings("serial") 15 | public class GoodsSpecRef extends BaseGoodsSpecRef { 16 | 17 | public static final GoodsSpecRef dao = new GoodsSpecRef().dao(); 18 | 19 | public GoodsSpec getGoodsSpec() { 20 | return GoodsSpec.dao.findFirstByCache(CommonConstant.CACHE_NAME_ONE_MINUTE_STORE, "goods.spec.id."+getGoodsSpecId(), "select * from goods_spec where id = ?", getGoodsSpecId()); 21 | } 22 | /** 23 | * 是否包含选项值 24 | * @param optionId 25 | * @return 26 | */ 27 | public boolean isHasSpecOption(Integer optionId) { 28 | String ids = getSpecValue(); 29 | ids = ids.startsWith(",") ? ids : ","+ids; 30 | ids = ids.endsWith(",") ? ids : ids+","; 31 | return ids.contains(","+optionId+","); 32 | } 33 | 34 | public List getSpecValueList() { 35 | String[] options = StringUtils.split(getSpecValue(), ","); 36 | if(options == null || options.length <= 0) { 37 | return null; 38 | } 39 | List goodsSpecOptions = new ArrayList<>(); 40 | for (String option : options) { 41 | GoodsSpecOptions specOption = GoodsSpecOptions.dao.findById(Integer.parseInt(option)); 42 | goodsSpecOptions.add(specOption); 43 | } 44 | return goodsSpecOptions; 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/GoodsStockConfig.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseGoodsStockConfig; 4 | 5 | /** 6 | * 商品库存预警设置 7 | */ 8 | @SuppressWarnings("serial") 9 | public class GoodsStockConfig extends BaseGoodsStockConfig { 10 | 11 | public static final GoodsStockConfig dao = new GoodsStockConfig().dao(); 12 | 13 | public GoodsStockConfig findBySpec(Integer goodsInfoId, Integer spec1Id, Integer specOption1I, Integer spec2Id, Integer specOption2Id, Integer spec3Id, Integer specOption3Id, Integer unitId) { 14 | return GoodsStockConfig.dao.findFirst("select * from goods_stock_config where goods_info_id = ? and spec_1_id = ? and spec_option_1_id = ? and spec_2_id = ? and spec_option_2_id = ? and spec_3_id = ? and spec_option_3_id = ? and unit_id = ? limit 1", goodsInfoId, spec1Id, specOption1I, spec2Id, specOption2Id, spec3Id, specOption3Id, unitId); 15 | } 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/GoodsUnit.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import java.util.List; 4 | 5 | import com.bytechainx.psi.common.EnumConstant.DataStatusEnum; 6 | import com.bytechainx.psi.common.model.base.BaseGoodsUnit; 7 | 8 | /** 9 | * 商品规格 10 | */ 11 | @SuppressWarnings("serial") 12 | public class GoodsUnit extends BaseGoodsUnit { 13 | 14 | public static final GoodsUnit dao = new GoodsUnit().dao(); 15 | 16 | public GoodsUnit findById(Integer id) { 17 | return GoodsUnit.dao.findFirst("select * from goods_unit where id = ? and data_status != ? limit 1", id, DataStatusEnum.delete.getValue()); 18 | } 19 | 20 | public List findAll() { 21 | return GoodsUnit.dao.find("select * from goods_unit where data_status = ?", DataStatusEnum.enable.getValue()); 22 | } 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/MsgNotice.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.EnumConstant.MsgTypeEnum; 4 | import com.bytechainx.psi.common.model.base.BaseMsgNotice; 5 | 6 | /** 7 | * 通知消息 8 | */ 9 | @SuppressWarnings("serial") 10 | public class MsgNotice extends BaseMsgNotice { 11 | 12 | public static final MsgNotice dao = new MsgNotice().dao(); 13 | 14 | public String getMsgTypeName() { 15 | return MsgTypeEnum.getEnum(getMsgType()).getName(); 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/MsgNoticeSend.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseMsgNoticeSend; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class MsgNoticeSend extends BaseMsgNoticeSend { 10 | 11 | public static final MsgNoticeSend dao = new MsgNoticeSend().dao(); 12 | 13 | 14 | public MsgNotice getMsgNotice() { 15 | return MsgNotice.dao.findById(getMsgNoticeId()); 16 | } 17 | 18 | public MsgNoticeSend findBy(Integer id) { 19 | return MsgNoticeSend.dao.findFirst("select * from msg_notice_send where id = ?", id); 20 | } 21 | 22 | } 23 | 24 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/PurchaseOrderCost.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.CommonConstant; 4 | import com.bytechainx.psi.common.model.base.BasePurchaseOrderCost; 5 | 6 | /** 7 | * 进货单成本支出 8 | */ 9 | @SuppressWarnings("serial") 10 | public class PurchaseOrderCost extends BasePurchaseOrderCost { 11 | 12 | public static final PurchaseOrderCost dao = new PurchaseOrderCost().dao(); 13 | 14 | /** 15 | * 项目开支类型 16 | * @return 17 | */ 18 | public TraderFundType getFundType() { 19 | return TraderFundType.dao.findFirstByCache(CommonConstant.CACHE_NAME_ONE_MINUTE_STORE, "trader.fund.type.id."+getTraderFundType(), "select * from trader_fund_type where id = ?", getTraderFundType()); 20 | } 21 | 22 | } 23 | 24 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/PurchaseOrderFee.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.CommonConstant; 4 | import com.bytechainx.psi.common.model.base.BasePurchaseOrderFee; 5 | 6 | /** 7 | * 进货单其他费用 8 | */ 9 | @SuppressWarnings("serial") 10 | public class PurchaseOrderFee extends BasePurchaseOrderFee { 11 | 12 | public static final PurchaseOrderFee dao = new PurchaseOrderFee().dao(); 13 | 14 | /** 15 | * 项目开支类型 16 | * @return 17 | */ 18 | public TraderFundType getFundType() { 19 | return TraderFundType.dao.findFirstByCache(CommonConstant.CACHE_NAME_ONE_MINUTE_STORE, "trader.fund.type.id."+getTraderFundType(), "select * from trader_fund_type where id = ?", getTraderFundType()); 20 | } 21 | 22 | public PurchaseOrderFee findByFundType(Integer orderId, Integer fundType) { 23 | return PurchaseOrderFee.dao.findFirst("select * from purchase_order_fee where purchase_order_id = ? and trader_fund_type = ?", orderId, fundType); 24 | } 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/PurchaseOrderFund.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.EnumConstant.FundTypeEnum; 4 | import com.bytechainx.psi.common.model.base.BasePurchaseOrderFund; 5 | 6 | /** 7 | * 进货单资金明细 8 | */ 9 | @SuppressWarnings("serial") 10 | public class PurchaseOrderFund extends BasePurchaseOrderFund { 11 | 12 | public static final PurchaseOrderFund dao = new PurchaseOrderFund().dao(); 13 | 14 | public TraderBalanceAccount getBalanceAccount() { 15 | if(getPayType() != FundTypeEnum.cash.getValue()) { 16 | return null; 17 | } 18 | return TraderBalanceAccount.dao.findById(getBalanceAccountId()); 19 | } 20 | 21 | public String getAccountName() { 22 | if(getPayType() == FundTypeEnum.cash.getValue()) { 23 | return getBalanceAccount().getName(); 24 | } else if(getPayType() == FundTypeEnum.balance.getValue()) { 25 | return "供应商账户"; 26 | } else if(getPayType() == FundTypeEnum.checking.getValue()) { 27 | return FundTypeEnum.checking.getName(); 28 | } 29 | return null; 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/PurchaseOrderLog.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BasePurchaseOrderLog; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class PurchaseOrderLog extends BasePurchaseOrderLog { 10 | public static final PurchaseOrderLog dao = new PurchaseOrderLog().dao(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/PurchaseRejectOrderCost.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BasePurchaseRejectOrderCost; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class PurchaseRejectOrderCost extends BasePurchaseRejectOrderCost { 10 | public static final PurchaseRejectOrderCost dao = new PurchaseRejectOrderCost().dao(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/PurchaseRejectOrderFee.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.CommonConstant; 4 | import com.bytechainx.psi.common.model.base.BasePurchaseRejectOrderFee; 5 | 6 | /** 7 | * 进货退货单 8 | */ 9 | @SuppressWarnings("serial") 10 | public class PurchaseRejectOrderFee extends BasePurchaseRejectOrderFee { 11 | 12 | public static final PurchaseRejectOrderFee dao = new PurchaseRejectOrderFee().dao(); 13 | 14 | /** 15 | * 项目开支类型 16 | * @return 17 | */ 18 | public TraderFundType getFundType() { 19 | return TraderFundType.dao.findFirstByCache(CommonConstant.CACHE_NAME_ONE_MINUTE_STORE, "trader.fund.type.id."+getTraderFundType(), "select * from trader_fund_type where id = ?", getTraderFundType()); 20 | } 21 | 22 | public PurchaseRejectOrderFee findByFundType(Integer orderId, Integer fundType) { 23 | return PurchaseRejectOrderFee.dao.findFirst("select * from purchase_reject_order_fee where purchase_reject_order_id = ? and trader_fund_type = ?", orderId, fundType); 24 | } 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/PurchaseRejectOrderFund.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.EnumConstant.FundTypeEnum; 4 | import com.bytechainx.psi.common.model.base.BasePurchaseRejectOrderFund; 5 | 6 | /** 7 | * 进货退货单资金明细 8 | */ 9 | @SuppressWarnings("serial") 10 | public class PurchaseRejectOrderFund extends BasePurchaseRejectOrderFund { 11 | 12 | public static final PurchaseRejectOrderFund dao = new PurchaseRejectOrderFund().dao(); 13 | 14 | public TraderBalanceAccount getBalanceAccount() { 15 | if(getPayType() != FundTypeEnum.cash.getValue()) { 16 | return null; 17 | } 18 | return TraderBalanceAccount.dao.findById(getBalanceAccountId()); 19 | } 20 | 21 | public String getAccountName() { 22 | if(getPayType() == FundTypeEnum.cash.getValue()) { 23 | return getBalanceAccount().getName(); 24 | } else if(getPayType() == FundTypeEnum.balance.getValue()) { 25 | return "供应商账户"; 26 | } else if(getPayType() == FundTypeEnum.checking.getValue()) { 27 | return FundTypeEnum.checking.getName(); 28 | } 29 | return null; 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/PurchaseRejectOrderLog.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BasePurchaseRejectOrderLog; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class PurchaseRejectOrderLog extends BasePurchaseRejectOrderLog { 10 | public static final PurchaseRejectOrderLog dao = new PurchaseRejectOrderLog().dao(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/SaleOrderCost.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.CommonConstant; 4 | import com.bytechainx.psi.common.model.base.BaseSaleOrderCost; 5 | 6 | /** 7 | * 销售单成本支出 8 | */ 9 | @SuppressWarnings("serial") 10 | public class SaleOrderCost extends BaseSaleOrderCost { 11 | 12 | public static final SaleOrderCost dao = new SaleOrderCost().dao(); 13 | 14 | 15 | /** 16 | * 项目开支类型 17 | * @return 18 | */ 19 | public TraderFundType getFundType() { 20 | return TraderFundType.dao.findFirstByCache(CommonConstant.CACHE_NAME_ONE_MINUTE_STORE, "trader.fund.type.id."+getTraderFundType(), "select * from trader_fund_type where id = ?", getTraderFundType()); 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/SaleOrderFee.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.CommonConstant; 4 | import com.bytechainx.psi.common.model.base.BaseSaleOrderFee; 5 | 6 | /** 7 | * 销售单其他费用,需要客户支付 8 | */ 9 | @SuppressWarnings("serial") 10 | public class SaleOrderFee extends BaseSaleOrderFee { 11 | public static final SaleOrderFee dao = new SaleOrderFee().dao(); 12 | 13 | /** 14 | * 项目开支类型 15 | * @return 16 | */ 17 | public TraderFundType getFundType() { 18 | return TraderFundType.dao.findFirstByCache(CommonConstant.CACHE_NAME_ONE_MINUTE_STORE, "trader.fund.type.id."+getTraderFundType(), "select * from trader_fund_type where id = ?", getTraderFundType()); 19 | } 20 | 21 | public SaleOrderFee findByFundType(Integer orderId, Integer fundType) { 22 | return SaleOrderFee.dao.findFirst("select * from sale_order_fee where sale_order_id = ? and trader_fund_type = ?", orderId, fundType); 23 | } 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/SaleOrderFund.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.CommonConstant; 4 | import com.bytechainx.psi.common.EnumConstant.FundTypeEnum; 5 | import com.bytechainx.psi.common.model.base.BaseSaleOrderFund; 6 | 7 | /** 8 | * 销售单资金明细 9 | */ 10 | @SuppressWarnings("serial") 11 | public class SaleOrderFund extends BaseSaleOrderFund { 12 | 13 | public static final SaleOrderFund dao = new SaleOrderFund().dao(); 14 | 15 | public TraderBalanceAccount getBalanceAccount() { 16 | if(getReceiptType() != FundTypeEnum.cash.getValue()) { 17 | return null; 18 | } 19 | return TraderBalanceAccount.dao.findById(getBalanceAccountId()); 20 | } 21 | 22 | public String getAccountName() { 23 | if(getReceiptType() == FundTypeEnum.cash.getValue()) { 24 | return getBalanceAccount().getName(); 25 | } else if(getReceiptType() == FundTypeEnum.balance.getValue()) { 26 | return "客户账户"; 27 | } else if(getReceiptType() == FundTypeEnum.checking.getValue()) { 28 | return FundTypeEnum.checking.getName(); 29 | } 30 | return null; 31 | } 32 | 33 | public SaleOrder getSaleOrder() { 34 | return SaleOrder.dao.findFirstByCache(CommonConstant.CACHE_NAME_ONE_MINUTE_STORE, "sale.order.id."+getSaleOrderId(), "select * from sale_order where id = ?", getSaleOrderId()); 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/SaleOrderLog.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseSaleOrderLog; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class SaleOrderLog extends BaseSaleOrderLog { 10 | public static final SaleOrderLog dao = new SaleOrderLog().dao(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/SaleRejectOrderCost.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseSaleRejectOrderCost; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class SaleRejectOrderCost extends BaseSaleRejectOrderCost { 10 | public static final SaleRejectOrderCost dao = new SaleRejectOrderCost().dao(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/SaleRejectOrderFee.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.CommonConstant; 4 | import com.bytechainx.psi.common.model.base.BaseSaleRejectOrderFee; 5 | 6 | /** 7 | * Generated by JFinal. 8 | */ 9 | @SuppressWarnings("serial") 10 | public class SaleRejectOrderFee extends BaseSaleRejectOrderFee { 11 | 12 | public static final SaleRejectOrderFee dao = new SaleRejectOrderFee().dao(); 13 | 14 | /** 15 | * 项目开支类型 16 | * @return 17 | */ 18 | public TraderFundType getFundType() { 19 | return TraderFundType.dao.findFirstByCache(CommonConstant.CACHE_NAME_ONE_MINUTE_STORE, "trader.fund.type.id."+getTraderFundType(), "select * from trader_fund_type where id = ?", getTraderFundType()); 20 | } 21 | 22 | public SaleRejectOrderFee findByFundType(Integer orderId, Integer fundType) { 23 | return SaleRejectOrderFee.dao.findFirst("select * from sale_reject_order_fee where sale_reject_order_id = ? and trader_fund_type = ?", orderId, fundType); 24 | } 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/SaleRejectOrderFund.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.EnumConstant.FundTypeEnum; 4 | import com.bytechainx.psi.common.model.base.BaseSaleRejectOrderFund; 5 | 6 | /** 7 | * 销售退货单资金明细 8 | */ 9 | @SuppressWarnings("serial") 10 | public class SaleRejectOrderFund extends BaseSaleRejectOrderFund { 11 | 12 | public static final SaleRejectOrderFund dao = new SaleRejectOrderFund().dao(); 13 | 14 | public TraderBalanceAccount getBalanceAccount() { 15 | if(getReceiptType() != FundTypeEnum.cash.getValue()) { 16 | return null; 17 | } 18 | return TraderBalanceAccount.dao.findById(getBalanceAccountId()); 19 | } 20 | 21 | public String getAccountName() { 22 | if(getReceiptType() == FundTypeEnum.cash.getValue()) { 23 | return getBalanceAccount().getName(); 24 | } else if(getReceiptType() == FundTypeEnum.balance.getValue()) { 25 | return "客户账户"; 26 | } else if(getReceiptType() == FundTypeEnum.checking.getValue()) { 27 | return FundTypeEnum.checking.getName(); 28 | } 29 | return null; 30 | } 31 | 32 | } 33 | 34 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/SaleRejectOrderLog.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseSaleRejectOrderLog; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class SaleRejectOrderLog extends BaseSaleRejectOrderLog { 10 | public static final SaleRejectOrderLog dao = new SaleRejectOrderLog().dao(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/SupplierCategory.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseSupplierCategory; 4 | 5 | /** 6 | * 供应商分类 7 | */ 8 | @SuppressWarnings("serial") 9 | public class SupplierCategory extends BaseSupplierCategory { 10 | 11 | public static final SupplierCategory dao = new SupplierCategory().dao(); 12 | 13 | public SupplierCategory findById(Integer id) { 14 | return SupplierCategory.dao.findFirst("select * from supplier_category where id = ? limit 1", id); 15 | } 16 | 17 | 18 | } 19 | 20 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TenantExportLog.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.EnumConstant.ExportStatusEnum; 4 | import com.bytechainx.psi.common.model.base.BaseTenantExportLog; 5 | 6 | /** 7 | * 导出记录 8 | */ 9 | @SuppressWarnings("serial") 10 | public class TenantExportLog extends BaseTenantExportLog { 11 | 12 | public static final TenantExportLog dao = new TenantExportLog().dao(); 13 | 14 | public String getExportStatusName() { 15 | return ExportStatusEnum.getEnum(getExportStatus()).getName(); 16 | } 17 | 18 | } 19 | 20 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TenantOperLog.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.EnumConstant.OperLogTypeEnum; 4 | import com.bytechainx.psi.common.EnumConstant.PlatformTypeEnum; 5 | import com.bytechainx.psi.common.model.base.BaseTenantOperLog; 6 | 7 | /** 8 | * 操作日志 9 | */ 10 | @SuppressWarnings("serial") 11 | public class TenantOperLog extends BaseTenantOperLog { 12 | 13 | public static final TenantOperLog dao = new TenantOperLog().dao(); 14 | 15 | 16 | public String getLogTypeName() { 17 | return OperLogTypeEnum.getEnum(getLogType()).getName(); 18 | } 19 | 20 | public String getPlatformTypeName() { 21 | return PlatformTypeEnum.getEnum(getPlatformType()).getName(); 22 | } 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TenantOrg.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.CommonConstant; 4 | import com.bytechainx.psi.common.EnumConstant.IndustryEnum; 5 | import com.bytechainx.psi.common.EnumConstant.SaleModeEnum; 6 | import com.bytechainx.psi.common.EnumConstant.TenantConfigEnum; 7 | import com.bytechainx.psi.common.model.base.BaseTenantOrg; 8 | 9 | /** 10 | * 租户信息 11 | */ 12 | @SuppressWarnings("serial") 13 | public class TenantOrg extends BaseTenantOrg { 14 | 15 | public static final TenantOrg dao = new TenantOrg().dao(); 16 | 17 | public TenantOrg findCacheById() { 18 | return findFirstByCache(CommonConstant.CACHE_NAME_ONE_MINUTE_STORE, "tenant.org.id.1", "select * from tenant_org limit 1"); 19 | } 20 | 21 | public String getModeName() { 22 | return SaleModeEnum.getEnum(getMode()).getName(); 23 | } 24 | 25 | public String getIndustryName() { 26 | if(getIndustry() == null) { 27 | return null; 28 | } 29 | IndustryEnum industry = IndustryEnum.getEnum(getIndustry()); 30 | if(industry == null) { 31 | return null; 32 | } 33 | return industry.getName(); 34 | } 35 | 36 | public TenantConfig getConfig(TenantConfigEnum configEnum) { 37 | return TenantConfig.dao.findByKeyCache(configEnum); 38 | } 39 | 40 | public TenantOrg findTop() { 41 | return TenantOrg.dao.findFirst("select * from tenant_org limit 1"); 42 | } 43 | 44 | } 45 | 46 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TenantPayOrder.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.EnumConstant.OnlinePayStatusEnum; 4 | import com.bytechainx.psi.common.model.base.BaseTenantPayOrder; 5 | 6 | /** 7 | * 租户支付单 8 | */ 9 | @SuppressWarnings("serial") 10 | public class TenantPayOrder extends BaseTenantPayOrder { 11 | 12 | public static final TenantPayOrder dao = new TenantPayOrder().dao(); 13 | 14 | /** 15 | * 保存日志 16 | */ 17 | public void saveLog() { 18 | TenantPayOrderLog log = new TenantPayOrderLog(); 19 | log._setOrPut(_getAttrs()); 20 | if(log.getPayStatus() == OnlinePayStatusEnum.wait.getValue() || log.getPayStatus() == OnlinePayStatusEnum.nopay.getValue()) { 21 | log.setErrorMsg("支付超时"); 22 | log.setPayStatus(OnlinePayStatusEnum.reject.getValue()); 23 | } 24 | log.save(); 25 | 26 | delete(); 27 | } 28 | 29 | public TenantPayOrder findByCode(String orderCode) { 30 | return TenantPayOrder.dao.findFirst("select * from tenant_pay_order where order_code = ?", orderCode); 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TenantPayOrderLog.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseTenantPayOrderLog; 4 | 5 | /** 6 | * 支付日志 7 | */ 8 | @SuppressWarnings("serial") 9 | public class TenantPayOrderLog extends BaseTenantPayOrderLog { 10 | 11 | public static final TenantPayOrderLog dao = new TenantPayOrderLog().dao(); 12 | 13 | 14 | public TenantPayOrderLog findByCode(String orderCode) { 15 | return TenantPayOrderLog.dao.findFirst("select * from tenant_pay_order_log where order_code = ?", orderCode); 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TenantRole.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseTenantRole; 4 | import com.jfinal.plugin.activerecord.Db; 5 | 6 | /** 7 | * 角色 8 | */ 9 | @SuppressWarnings("serial") 10 | public class TenantRole extends BaseTenantRole { 11 | 12 | public static final TenantRole dao = new TenantRole().dao(); 13 | 14 | 15 | public TenantRole findById(Integer id) { 16 | return TenantRole.dao.findFirst("select * from tenant_role where id = ? limit 1", id); 17 | } 18 | 19 | /** 20 | * 计算角色所有的员工数量 21 | * @return 22 | */ 23 | public int getCountAdmin() { 24 | return Db.queryInt("select count(*) from tenant_admin where role_id = ?", getId()); 25 | } 26 | 27 | public boolean hasOper(String operCode) { 28 | if(getSuperFlag()){ 29 | return true; 30 | } 31 | TenantRoleOperRef operRef = TenantRoleOperRef.dao.findFirst("select * from tenant_role_oper_ref where role_id = ? and oper_code = ?", getId(), operCode); 32 | return operRef != null ? true : false; 33 | } 34 | 35 | private String[] operCodes; // 权限操作code,用于值传递 36 | 37 | public String[] getOperCodes() { 38 | return operCodes; 39 | } 40 | 41 | public void setOperCodes(String[] operCodes) { 42 | this.operCodes = operCodes; 43 | } 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TenantRoleOperRef.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseTenantRoleOperRef; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class TenantRoleOperRef extends BaseTenantRoleOperRef { 10 | public static final TenantRoleOperRef dao = new TenantRoleOperRef().dao(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TenantSmsLog.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseTenantSmsLog; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class TenantSmsLog extends BaseTenantSmsLog { 10 | public static final TenantSmsLog dao = new TenantSmsLog().dao(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TraderBalanceAccount.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.Date; 5 | 6 | import com.bytechainx.psi.common.model.base.BaseTraderBalanceAccount; 7 | import com.jfinal.plugin.activerecord.Db; 8 | 9 | /** 10 | * 结算帐户 11 | */ 12 | @SuppressWarnings("serial") 13 | public class TraderBalanceAccount extends BaseTraderBalanceAccount { 14 | 15 | public static final TraderBalanceAccount dao = new TraderBalanceAccount().dao(); 16 | 17 | public TraderBalanceAccount findById(Integer id) { 18 | return TraderBalanceAccount.dao.findFirst("select * from trader_balance_account where id = ? limit 1", id); 19 | } 20 | 21 | public void updateBalance() { 22 | BigDecimal balance = Db.queryBigDecimal("select sum(balance) as sumBalance from trader_balance_store_ref where trader_balance_account_id = ?", getId()); 23 | setBalance(balance); 24 | setUpdatedAt(new Date()); 25 | update(); 26 | } 27 | 28 | public TraderBalanceAccount findCashAccount() { 29 | return TraderBalanceAccount.dao.findFirst("select * from trader_balance_account where name = '现金' limit 1"); 30 | } 31 | 32 | public TraderBalanceAccount findOnlinePayAccount() { 33 | return TraderBalanceAccount.dao.findFirst("select * from trader_balance_account where name = '在线支付' limit 1"); 34 | } 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TraderBookAccount.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import java.math.BigDecimal; 4 | 5 | import com.bytechainx.psi.common.model.base.BaseTraderBookAccount; 6 | 7 | /** 8 | * 往来账户 9 | */ 10 | @SuppressWarnings("serial") 11 | public class TraderBookAccount extends BaseTraderBookAccount { 12 | 13 | public static final TraderBookAccount dao = new TraderBookAccount().dao(); 14 | 15 | 16 | /** 17 | * 客户欠款,支出-收入 18 | * @return 19 | */ 20 | public BigDecimal getCustomerDebtAmount() { 21 | return getOutAmount().subtract(getInAmount()); 22 | } 23 | /** 24 | * 客户可用支付余额,用于余额支付,总收入-平账支出 25 | * @return 26 | */ 27 | public BigDecimal getCustomerAvailableAmount() { 28 | return getInAmount().subtract(getPayAmount()); 29 | } 30 | 31 | /** 32 | * 欠供应商款,收入-支出 33 | * @return 34 | */ 35 | public BigDecimal getSupplierDebtAmount() { 36 | return getInAmount().subtract(getOutAmount()); 37 | } 38 | 39 | /** 40 | * 供应商可用支付余额,用于余额支付,总支出-平账支出 41 | * @return 42 | */ 43 | public BigDecimal getSupplierAvailableAmount() { 44 | return getOutAmount().subtract(getPayAmount()); 45 | } 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TraderBookAccountLogs.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseTraderBookAccountLogs; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class TraderBookAccountLogs extends BaseTraderBookAccountLogs { 10 | public static final TraderBookAccountLogs dao = new TraderBookAccountLogs().dao(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TraderFundType.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.apache.commons.lang.StringUtils; 7 | 8 | import com.bytechainx.psi.common.CommonConstant; 9 | import com.bytechainx.psi.common.EnumConstant.TenantConfigEnum; 10 | import com.bytechainx.psi.common.model.base.BaseTraderFundType; 11 | 12 | /** 13 | * 收支项目类型 14 | */ 15 | @SuppressWarnings("serial") 16 | public class TraderFundType extends BaseTraderFundType { 17 | 18 | public static final TraderFundType dao = new TraderFundType().dao(); 19 | 20 | public TraderFundType findById(Integer id) { 21 | return TraderFundType.dao.findFirst("select * from trader_fund_type where id = ? limit 1", id); 22 | } 23 | 24 | /** 25 | * 单据成本支出和其他费用配置 26 | * @return 27 | */ 28 | public List findFundTypeConfig(TenantConfigEnum tenantConfig) { 29 | TenantConfig config = TenantConfig.dao.findByKeyCache(tenantConfig); 30 | String[] fundTypeIds = StringUtils.split(config.getAttrValue(), ","); 31 | if(fundTypeIds == null || fundTypeIds.length <= 0) { 32 | return null; 33 | } 34 | List fundTypeList = new ArrayList<>(); 35 | for(String id : fundTypeIds) { 36 | TraderFundType fundType = TraderFundType.dao.findFirstByCache(CommonConstant.CACHE_NAME_ONE_MINUTE_STORE, "trader.fund.type.id."+id, "select * from trader_fund_type where id = ?", Integer.parseInt(id)); 37 | if(fundType == null) { 38 | continue; 39 | } 40 | fundTypeList.add(fundType); 41 | } 42 | return fundTypeList; 43 | } 44 | 45 | 46 | } 47 | 48 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TraderIncomeExpensesFund.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseTraderIncomeExpensesFund; 4 | 5 | /** 6 | * 日常收支明细 7 | */ 8 | @SuppressWarnings("serial") 9 | public class TraderIncomeExpensesFund extends BaseTraderIncomeExpensesFund { 10 | 11 | public static final TraderIncomeExpensesFund dao = new TraderIncomeExpensesFund().dao(); 12 | 13 | public TraderBalanceAccount getBalanceAccount() { 14 | return TraderBalanceAccount.dao.findById(getTraderBalanceAccountId()); 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TraderPayOrderFund.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseTraderPayOrderFund; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class TraderPayOrderFund extends BaseTraderPayOrderFund { 10 | 11 | public static final TraderPayOrderFund dao = new TraderPayOrderFund().dao(); 12 | 13 | public TraderBalanceAccount getBalanceAccount() { 14 | return TraderBalanceAccount.dao.findById(getTraderBalanceAccountId()); 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TraderPayOrderRef.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseTraderPayOrderRef; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class TraderPayOrderRef extends BaseTraderPayOrderRef { 10 | public static final TraderPayOrderRef dao = new TraderPayOrderRef().dao(); 11 | 12 | public TraderReceiptOrder getTraderPayOrder() { 13 | return TraderReceiptOrder.dao.findById(getTraderPayOrderId()); 14 | } 15 | 16 | public PurchaseOrder getPurchaseOrder() { 17 | return PurchaseOrder.dao.findById(getPurchaseOrderId()); 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TraderReceiptOrderFund.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseTraderReceiptOrderFund; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class TraderReceiptOrderFund extends BaseTraderReceiptOrderFund { 10 | 11 | public static final TraderReceiptOrderFund dao = new TraderReceiptOrderFund().dao(); 12 | 13 | public TraderBalanceAccount getBalanceAccount() { 14 | return TraderBalanceAccount.dao.findById(getTraderBalanceAccountId()); 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TraderReceiptOrderRef.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.model.base.BaseTraderReceiptOrderRef; 4 | 5 | /** 6 | * Generated by JFinal. 7 | */ 8 | @SuppressWarnings("serial") 9 | public class TraderReceiptOrderRef extends BaseTraderReceiptOrderRef { 10 | 11 | public static final TraderReceiptOrderRef dao = new TraderReceiptOrderRef().dao(); 12 | 13 | public SaleOrder getSaleOrder() { 14 | return SaleOrder.dao.findById(getSaleOrderId()); 15 | } 16 | 17 | public TraderReceiptOrder getTraderReceiptOrder() { 18 | return TraderReceiptOrder.dao.findById(getTraderReceiptOrderId()); 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/TraderSupplierPayable.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model; 2 | 3 | import com.bytechainx.psi.common.EnumConstant.CheckingRefOrderTypeEnum; 4 | import com.bytechainx.psi.common.model.base.BaseTraderSupplierPayable; 5 | import com.jfinal.plugin.activerecord.Db; 6 | import com.jfinal.plugin.activerecord.Record; 7 | 8 | /** 9 | * 供应商应付对账 10 | */ 11 | @SuppressWarnings("serial") 12 | public class TraderSupplierPayable extends BaseTraderSupplierPayable { 13 | 14 | public static final TraderSupplierPayable dao = new TraderSupplierPayable().dao(); 15 | 16 | public SupplierInfo getSupplierInfo() { 17 | return SupplierInfo.dao.findById(getSupplierInfoId()); 18 | } 19 | 20 | public TraderBookAccount getTraderBookAccount() { 21 | return TraderBookAccount.dao.findById(getTraderBookAccountId()); 22 | } 23 | 24 | public TraderSupplierPayable findByOrderId(CheckingRefOrderTypeEnum checkingRefOrderType, Integer orderId) { 25 | return TraderSupplierPayable.dao.findFirst("select * from trader_supplier_payable where ref_order_type = ? and ref_order_id = ? limit 1", checkingRefOrderType.getValue(), orderId); 26 | } 27 | 28 | public String getRefOrderTypeName() { 29 | return CheckingRefOrderTypeEnum.getEnum(getRefOrderType()).getName(); 30 | } 31 | 32 | /** 33 | * 关联单 34 | * @return 35 | */ 36 | public Record getRefOrder() { 37 | CheckingRefOrderTypeEnum refOrderType = CheckingRefOrderTypeEnum.getEnum(getRefOrderType()); 38 | return Db.findFirst("select * from "+refOrderType.name()+" where id = "+getRefOrderId()); 39 | } 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseCustomerCategory.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseCustomerCategory> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setName(java.lang.String name) { 27 | set("name", name); 28 | } 29 | 30 | public java.lang.String getName() { 31 | return getStr("name"); 32 | } 33 | 34 | public void setRemark(java.lang.String remark) { 35 | set("remark", remark); 36 | } 37 | 38 | public java.lang.String getRemark() { 39 | return getStr("remark"); 40 | } 41 | 42 | public void setCreatedAt(java.util.Date createdAt) { 43 | set("created_at", createdAt); 44 | } 45 | 46 | public java.util.Date getCreatedAt() { 47 | return getDate("created_at"); 48 | } 49 | 50 | public void setUpdatedAt(java.util.Date updatedAt) { 51 | set("updated_at", updatedAt); 52 | } 53 | 54 | public java.util.Date getUpdatedAt() { 55 | return getDate("updated_at"); 56 | } 57 | 58 | } 59 | 60 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseGoodsAttributeRef.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseGoodsAttributeRef> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setGoodsInfoId(java.lang.Integer goodsInfoId) { 27 | set("goods_info_id", goodsInfoId); 28 | } 29 | 30 | public java.lang.Integer getGoodsInfoId() { 31 | return getInt("goods_info_id"); 32 | } 33 | 34 | public void setGoodsAttributeId(java.lang.Integer goodsAttributeId) { 35 | set("goods_attribute_id", goodsAttributeId); 36 | } 37 | 38 | public java.lang.Integer getGoodsAttributeId() { 39 | return getInt("goods_attribute_id"); 40 | } 41 | 42 | public void setAttrValue(java.lang.String attrValue) { 43 | set("attr_value", attrValue); 44 | } 45 | 46 | public java.lang.String getAttrValue() { 47 | return getStr("attr_value"); 48 | } 49 | 50 | public void setPosition(java.lang.Integer position) { 51 | set("position", position); 52 | } 53 | 54 | public java.lang.Integer getPosition() { 55 | return getInt("position"); 56 | } 57 | 58 | } 59 | 60 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseGoodsCategory.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseGoodsCategory> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setParentId(java.lang.Integer parentId) { 27 | set("parent_id", parentId); 28 | } 29 | 30 | public java.lang.Integer getParentId() { 31 | return getInt("parent_id"); 32 | } 33 | 34 | public void setName(java.lang.String name) { 35 | set("name", name); 36 | } 37 | 38 | public java.lang.String getName() { 39 | return getStr("name"); 40 | } 41 | 42 | public void setRemark(java.lang.String remark) { 43 | set("remark", remark); 44 | } 45 | 46 | public java.lang.String getRemark() { 47 | return getStr("remark"); 48 | } 49 | 50 | public void setCreatedAt(java.util.Date createdAt) { 51 | set("created_at", createdAt); 52 | } 53 | 54 | public java.util.Date getCreatedAt() { 55 | return getDate("created_at"); 56 | } 57 | 58 | public void setUpdatedAt(java.util.Date updatedAt) { 59 | set("updated_at", updatedAt); 60 | } 61 | 62 | public java.util.Date getUpdatedAt() { 63 | return getDate("updated_at"); 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseGoodsSpec.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseGoodsSpec> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setName(java.lang.String name) { 27 | set("name", name); 28 | } 29 | 30 | public java.lang.String getName() { 31 | return getStr("name"); 32 | } 33 | 34 | public void setDataStatus(java.lang.Integer dataStatus) { 35 | set("data_status", dataStatus); 36 | } 37 | 38 | public java.lang.Integer getDataStatus() { 39 | return getInt("data_status"); 40 | } 41 | 42 | public void setCreatedAt(java.util.Date createdAt) { 43 | set("created_at", createdAt); 44 | } 45 | 46 | public java.util.Date getCreatedAt() { 47 | return getDate("created_at"); 48 | } 49 | 50 | public void setUpdatedAt(java.util.Date updatedAt) { 51 | set("updated_at", updatedAt); 52 | } 53 | 54 | public java.util.Date getUpdatedAt() { 55 | return getDate("updated_at"); 56 | } 57 | 58 | } 59 | 60 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseGoodsSpecOptions.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseGoodsSpecOptions> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setGoodsSpecId(java.lang.Integer goodsSpecId) { 27 | set("goods_spec_id", goodsSpecId); 28 | } 29 | 30 | public java.lang.Integer getGoodsSpecId() { 31 | return getInt("goods_spec_id"); 32 | } 33 | 34 | public void setOptionValue(java.lang.String optionValue) { 35 | set("option_value", optionValue); 36 | } 37 | 38 | public java.lang.String getOptionValue() { 39 | return getStr("option_value"); 40 | } 41 | 42 | public void setDataStatus(java.lang.Integer dataStatus) { 43 | set("data_status", dataStatus); 44 | } 45 | 46 | public java.lang.Integer getDataStatus() { 47 | return getInt("data_status"); 48 | } 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseGoodsSpecRef.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseGoodsSpecRef> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setGoodsInfoId(java.lang.Integer goodsInfoId) { 27 | set("goods_info_id", goodsInfoId); 28 | } 29 | 30 | public java.lang.Integer getGoodsInfoId() { 31 | return getInt("goods_info_id"); 32 | } 33 | 34 | public void setGoodsSpecId(java.lang.Integer goodsSpecId) { 35 | set("goods_spec_id", goodsSpecId); 36 | } 37 | 38 | public java.lang.Integer getGoodsSpecId() { 39 | return getInt("goods_spec_id"); 40 | } 41 | 42 | public void setSpecValue(java.lang.String specValue) { 43 | set("spec_value", specValue); 44 | } 45 | 46 | public java.lang.String getSpecValue() { 47 | return getStr("spec_value"); 48 | } 49 | 50 | public void setPosition(java.lang.Integer position) { 51 | set("position", position); 52 | } 53 | 54 | public java.lang.Integer getPosition() { 55 | return getInt("position"); 56 | } 57 | 58 | } 59 | 60 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseGoodsUnit.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseGoodsUnit> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setName(java.lang.String name) { 27 | set("name", name); 28 | } 29 | 30 | public java.lang.String getName() { 31 | return getStr("name"); 32 | } 33 | 34 | public void setDataStatus(java.lang.Integer dataStatus) { 35 | set("data_status", dataStatus); 36 | } 37 | 38 | public java.lang.Integer getDataStatus() { 39 | return getInt("data_status"); 40 | } 41 | 42 | public void setCreatedAt(java.util.Date createdAt) { 43 | set("created_at", createdAt); 44 | } 45 | 46 | public java.util.Date getCreatedAt() { 47 | return getDate("created_at"); 48 | } 49 | 50 | public void setUpdatedAt(java.util.Date updatedAt) { 51 | set("updated_at", updatedAt); 52 | } 53 | 54 | public java.util.Date getUpdatedAt() { 55 | return getDate("updated_at"); 56 | } 57 | 58 | } 59 | 60 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BasePurchaseOrderFee.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BasePurchaseOrderFee> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setPurchaseOrderId(java.lang.Integer purchaseOrderId) { 27 | set("purchase_order_id", purchaseOrderId); 28 | } 29 | 30 | public java.lang.Integer getPurchaseOrderId() { 31 | return getInt("purchase_order_id"); 32 | } 33 | 34 | public void setTraderFundType(java.lang.Integer traderFundType) { 35 | set("trader_fund_type", traderFundType); 36 | } 37 | 38 | public java.lang.Integer getTraderFundType() { 39 | return getInt("trader_fund_type"); 40 | } 41 | 42 | public void setAmount(java.math.BigDecimal amount) { 43 | set("amount", amount); 44 | } 45 | 46 | public java.math.BigDecimal getAmount() { 47 | return getBigDecimal("amount"); 48 | } 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BasePurchaseRejectOrderFee.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BasePurchaseRejectOrderFee> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setPurchaseRejectOrderId(java.lang.Integer purchaseRejectOrderId) { 27 | set("purchase_reject_order_id", purchaseRejectOrderId); 28 | } 29 | 30 | public java.lang.Integer getPurchaseRejectOrderId() { 31 | return getInt("purchase_reject_order_id"); 32 | } 33 | 34 | public void setTraderFundType(java.lang.Integer traderFundType) { 35 | set("trader_fund_type", traderFundType); 36 | } 37 | 38 | public java.lang.Integer getTraderFundType() { 39 | return getInt("trader_fund_type"); 40 | } 41 | 42 | public void setAmount(java.math.BigDecimal amount) { 43 | set("amount", amount); 44 | } 45 | 46 | public java.math.BigDecimal getAmount() { 47 | return getBigDecimal("amount"); 48 | } 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseSaleOrderFee.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseSaleOrderFee> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setSaleOrderId(java.lang.Integer saleOrderId) { 27 | set("sale_order_id", saleOrderId); 28 | } 29 | 30 | public java.lang.Integer getSaleOrderId() { 31 | return getInt("sale_order_id"); 32 | } 33 | 34 | public void setTraderFundType(java.lang.Integer traderFundType) { 35 | set("trader_fund_type", traderFundType); 36 | } 37 | 38 | public java.lang.Integer getTraderFundType() { 39 | return getInt("trader_fund_type"); 40 | } 41 | 42 | public void setAmount(java.math.BigDecimal amount) { 43 | set("amount", amount); 44 | } 45 | 46 | public java.math.BigDecimal getAmount() { 47 | return getBigDecimal("amount"); 48 | } 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseSaleOrderLog.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseSaleOrderLog> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setSaleOrderId(java.lang.Integer saleOrderId) { 27 | set("sale_order_id", saleOrderId); 28 | } 29 | 30 | public java.lang.Integer getSaleOrderId() { 31 | return getInt("sale_order_id"); 32 | } 33 | 34 | public void setOperTime(java.util.Date operTime) { 35 | set("oper_time", operTime); 36 | } 37 | 38 | public java.util.Date getOperTime() { 39 | return getDate("oper_time"); 40 | } 41 | 42 | public void setOperDesc(java.lang.String operDesc) { 43 | set("oper_desc", operDesc); 44 | } 45 | 46 | public java.lang.String getOperDesc() { 47 | return getStr("oper_desc"); 48 | } 49 | 50 | public void setOperAdminName(java.lang.String operAdminName) { 51 | set("oper_admin_name", operAdminName); 52 | } 53 | 54 | public java.lang.String getOperAdminName() { 55 | return getStr("oper_admin_name"); 56 | } 57 | 58 | public void setOperAdminId(java.lang.Integer operAdminId) { 59 | set("oper_admin_id", operAdminId); 60 | } 61 | 62 | public java.lang.Integer getOperAdminId() { 63 | return getInt("oper_admin_id"); 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseSaleRejectOrderFee.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseSaleRejectOrderFee> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setSaleRejectOrderId(java.lang.Integer saleRejectOrderId) { 27 | set("sale_reject_order_id", saleRejectOrderId); 28 | } 29 | 30 | public java.lang.Integer getSaleRejectOrderId() { 31 | return getInt("sale_reject_order_id"); 32 | } 33 | 34 | public void setTraderFundType(java.lang.Integer traderFundType) { 35 | set("trader_fund_type", traderFundType); 36 | } 37 | 38 | public java.lang.Integer getTraderFundType() { 39 | return getInt("trader_fund_type"); 40 | } 41 | 42 | public void setAmount(java.math.BigDecimal amount) { 43 | set("amount", amount); 44 | } 45 | 46 | public java.math.BigDecimal getAmount() { 47 | return getBigDecimal("amount"); 48 | } 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseSupplierCategory.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseSupplierCategory> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setName(java.lang.String name) { 27 | set("name", name); 28 | } 29 | 30 | public java.lang.String getName() { 31 | return getStr("name"); 32 | } 33 | 34 | public void setRemark(java.lang.String remark) { 35 | set("remark", remark); 36 | } 37 | 38 | public java.lang.String getRemark() { 39 | return getStr("remark"); 40 | } 41 | 42 | public void setCreatedAt(java.util.Date createdAt) { 43 | set("created_at", createdAt); 44 | } 45 | 46 | public java.util.Date getCreatedAt() { 47 | return getDate("created_at"); 48 | } 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseSystemOper.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseSystemOper> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setOperType(java.lang.Integer operType) { 27 | set("oper_type", operType); 28 | } 29 | 30 | public java.lang.Integer getOperType() { 31 | return getInt("oper_type"); 32 | } 33 | 34 | public void setOperName(java.lang.String operName) { 35 | set("oper_name", operName); 36 | } 37 | 38 | public java.lang.String getOperName() { 39 | return getStr("oper_name"); 40 | } 41 | 42 | public void setOperCode(java.lang.String operCode) { 43 | set("oper_code", operCode); 44 | } 45 | 46 | public java.lang.String getOperCode() { 47 | return getStr("oper_code"); 48 | } 49 | 50 | public void setModuleCode(java.lang.String moduleCode) { 51 | set("module_code", moduleCode); 52 | } 53 | 54 | public java.lang.String getModuleCode() { 55 | return getStr("module_code"); 56 | } 57 | 58 | public void setParentId(java.lang.Integer parentId) { 59 | set("parent_id", parentId); 60 | } 61 | 62 | public java.lang.Integer getParentId() { 63 | return getInt("parent_id"); 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseTenantConfig.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseTenantConfig> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setAttrKey(java.lang.String attrKey) { 27 | set("attr_key", attrKey); 28 | } 29 | 30 | public java.lang.String getAttrKey() { 31 | return getStr("attr_key"); 32 | } 33 | 34 | public void setAttrValue(java.lang.String attrValue) { 35 | set("attr_value", attrValue); 36 | } 37 | 38 | public java.lang.String getAttrValue() { 39 | return getStr("attr_value"); 40 | } 41 | 42 | public void setCreatedAt(java.util.Date createdAt) { 43 | set("created_at", createdAt); 44 | } 45 | 46 | public java.util.Date getCreatedAt() { 47 | return getDate("created_at"); 48 | } 49 | 50 | public void setUpdatedAt(java.util.Date updatedAt) { 51 | set("updated_at", updatedAt); 52 | } 53 | 54 | public java.util.Date getUpdatedAt() { 55 | return getDate("updated_at"); 56 | } 57 | 58 | } 59 | 60 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseTenantRoleOperRef.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseTenantRoleOperRef> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setRoleId(java.lang.Integer roleId) { 27 | set("role_id", roleId); 28 | } 29 | 30 | public java.lang.Integer getRoleId() { 31 | return getInt("role_id"); 32 | } 33 | 34 | public void setOperCode(java.lang.String operCode) { 35 | set("oper_code", operCode); 36 | } 37 | 38 | public java.lang.String getOperCode() { 39 | return getStr("oper_code"); 40 | } 41 | 42 | } 43 | 44 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseTraderPayOrderRef.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseTraderPayOrderRef> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setTraderPayOrderId(java.lang.Integer traderPayOrderId) { 27 | set("trader_pay_order_id", traderPayOrderId); 28 | } 29 | 30 | public java.lang.Integer getTraderPayOrderId() { 31 | return getInt("trader_pay_order_id"); 32 | } 33 | 34 | public void setPurchaseOrderId(java.lang.Integer purchaseOrderId) { 35 | set("purchase_order_id", purchaseOrderId); 36 | } 37 | 38 | public java.lang.Integer getPurchaseOrderId() { 39 | return getInt("purchase_order_id"); 40 | } 41 | 42 | public void setAmount(java.math.BigDecimal amount) { 43 | set("amount", amount); 44 | } 45 | 46 | public java.math.BigDecimal getAmount() { 47 | return getBigDecimal("amount"); 48 | } 49 | 50 | public void setDiscountAmount(java.math.BigDecimal discountAmount) { 51 | set("discount_amount", discountAmount); 52 | } 53 | 54 | public java.math.BigDecimal getDiscountAmount() { 55 | return getBigDecimal("discount_amount"); 56 | } 57 | 58 | } 59 | 60 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/model/base/BaseTraderReceiptOrderRef.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseTraderReceiptOrderRef> extends Model implements IBean { 11 | 12 | /** 13 | * 主键 14 | */ 15 | public void setId(java.lang.Integer id) { 16 | set("id", id); 17 | } 18 | 19 | /** 20 | * 主键 21 | */ 22 | public java.lang.Integer getId() { 23 | return getInt("id"); 24 | } 25 | 26 | public void setTraderReceiptOrderId(java.lang.Integer traderReceiptOrderId) { 27 | set("trader_receipt_order_id", traderReceiptOrderId); 28 | } 29 | 30 | public java.lang.Integer getTraderReceiptOrderId() { 31 | return getInt("trader_receipt_order_id"); 32 | } 33 | 34 | public void setSaleOrderId(java.lang.Integer saleOrderId) { 35 | set("sale_order_id", saleOrderId); 36 | } 37 | 38 | public java.lang.Integer getSaleOrderId() { 39 | return getInt("sale_order_id"); 40 | } 41 | 42 | public void setAmount(java.math.BigDecimal amount) { 43 | set("amount", amount); 44 | } 45 | 46 | public java.math.BigDecimal getAmount() { 47 | return getBigDecimal("amount"); 48 | } 49 | 50 | public void setDiscountAmount(java.math.BigDecimal discountAmount) { 51 | set("discount_amount", discountAmount); 52 | } 53 | 54 | public java.math.BigDecimal getDiscountAmount() { 55 | return getBigDecimal("discount_amount"); 56 | } 57 | 58 | } 59 | 60 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/plugin/RedisSessionManagerFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.common.plugin; 5 | 6 | import java.net.URI; 7 | 8 | import io.undertow.server.session.SessionCookieConfig; 9 | import io.undertow.server.session.SessionManager; 10 | import io.undertow.servlet.api.Deployment; 11 | import io.undertow.servlet.api.SessionManagerFactory; 12 | 13 | /** 14 | * @author defier 15 | * 16 | */ 17 | public class RedisSessionManagerFactory implements SessionManagerFactory { 18 | 19 | private URI redisUri; 20 | 21 | public RedisSessionManagerFactory(URI redisUri) { 22 | this.redisUri = redisUri; 23 | } 24 | 25 | @Override 26 | public SessionManager createSessionManager(Deployment arg0) { 27 | SessionCookieConfig sessionConfig = new SessionCookieConfig(); 28 | sessionConfig.setCookieName(SessionCookieConfig.DEFAULT_SESSION_ID); 29 | return new RedisSessionManager(redisUri, sessionConfig); 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/plugin/ReflectException.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.plugin; 2 | 3 | import java.lang.reflect.InvocationTargetException; 4 | 5 | /** 6 | * A unchecked wrapper for any of Java's checked reflection exceptions: 7 | *

8 | * These exceptions are 9 | *

    10 | *
  • {@link ClassNotFoundException}
  • 11 | *
  • {@link IllegalAccessException}
  • 12 | *
  • {@link IllegalArgumentException}
  • 13 | *
  • {@link InstantiationException}
  • 14 | *
  • {@link InvocationTargetException}
  • 15 | *
  • {@link NoSuchMethodException}
  • 16 | *
  • {@link NoSuchFieldException}
  • 17 | *
  • {@link SecurityException}
  • 18 | *
19 | * 20 | * @author Lukas Eder 21 | */ 22 | public class ReflectException extends RuntimeException { 23 | 24 | /** 25 | * Generated UID 26 | */ 27 | private static final long serialVersionUID = -6213149635297151442L; 28 | 29 | public ReflectException(String message) { 30 | super(message); 31 | } 32 | 33 | public ReflectException(String message, Throwable cause) { 34 | super(message, cause); 35 | } 36 | 37 | public ReflectException() { 38 | super(); 39 | } 40 | 41 | public ReflectException(Throwable cause) { 42 | super(cause); 43 | } 44 | } -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/plugin/ResourceKit.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.plugin; 2 | 3 | import java.io.InputStreamReader; 4 | import java.net.URL; 5 | import java.util.Map; 6 | import java.util.Properties; 7 | 8 | import com.google.common.base.Throwables; 9 | import com.google.common.collect.Maps; 10 | import com.google.common.io.Resources; 11 | 12 | public class ResourceKit { 13 | 14 | public static Map readProperties(String resourceName) { 15 | Properties properties = new Properties(); 16 | URL resource = Resources.getResource(resourceName); 17 | try { 18 | properties.load(new InputStreamReader(resource.openStream(), "UTF-8")); 19 | } catch (Exception e) { 20 | throw Throwables.propagate(e); 21 | } 22 | return Maps.fromProperties(properties); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/service/export/ExportLogService.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.common.service.export; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | import com.bytechainx.psi.common.model.TenantExportLog; 10 | import com.bytechainx.psi.common.service.base.CommonService; 11 | import com.jfinal.plugin.activerecord.Page; 12 | 13 | /** 14 | * 导出记录 15 | * @author defier 16 | * 17 | */ 18 | public class ExportLogService extends CommonService { 19 | 20 | public Page paginate(Integer handlerId, int pageNumber, int pageSize) { 21 | StringBuffer where = new StringBuffer(); 22 | List params = new ArrayList(); 23 | where.append("where 1 =1 "); 24 | if(handlerId != null && handlerId > 0) { 25 | where.append(" and handler_id = ?"); 26 | params.add(handlerId); 27 | } 28 | return TenantExportLog.dao.paginate(pageNumber, pageSize, "select * ", "from tenant_export_log "+where.toString()+" order by id desc", params.toArray()); 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/service/msg/MsgNoticeService.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.common.service.msg; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | import com.bytechainx.psi.common.model.MsgNoticeSend; 10 | import com.bytechainx.psi.common.service.base.CommonService; 11 | import com.jfinal.plugin.activerecord.Page; 12 | 13 | /** 14 | * 消息通知 15 | * @author defier 16 | * 17 | */ 18 | public class MsgNoticeService extends CommonService { 19 | 20 | public Page paginate(Integer receiverId, Boolean readFlag, int pageNumber, int pageSize) { 21 | StringBuffer where = new StringBuffer(); 22 | List params = new ArrayList(); 23 | where.append("where 1 = 1 "); 24 | if(receiverId != null && receiverId > 0) { 25 | where.append(" and receiver_id = ?"); 26 | params.add(receiverId); 27 | } 28 | if(readFlag != null) { 29 | where.append(" and read_flag = ?"); 30 | params.add(readFlag); 31 | } 32 | return MsgNoticeSend.dao.paginate(pageNumber, pageSize, "select * ", "from msg_notice_send "+where.toString()+" order by id desc", params.toArray()); 33 | } 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/service/setting/SystemOperLogService.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.service.setting; 2 | 3 | 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import org.apache.commons.lang.StringUtils; 8 | 9 | import com.bytechainx.psi.common.model.TenantOperLog; 10 | import com.bytechainx.psi.common.service.base.CommonService; 11 | import com.jfinal.kit.Kv; 12 | import com.jfinal.plugin.activerecord.Page; 13 | 14 | 15 | /** 16 | * 操作日志 17 | */ 18 | public class SystemOperLogService extends CommonService { 19 | 20 | 21 | /** 22 | * 分页列表 23 | */ 24 | public Page paginate(Kv conditionColumns, String startTime, String endTime, Integer pageNumber, int pageSize) { 25 | StringBuffer where = new StringBuffer(); 26 | List params = new ArrayList(); 27 | where.append("where 1 = 1 "); 28 | 29 | conditionFilter(conditionColumns, where, params); 30 | 31 | if(StringUtils.isNotEmpty(startTime)) { 32 | where.append(" and oper_time >= ?"); 33 | params.add(startTime); 34 | } 35 | if(StringUtils.isNotEmpty(endTime)) { 36 | where.append(" and oper_time <= ?"); 37 | params.add(endTime); 38 | } 39 | return TenantOperLog.dao.paginate(pageNumber, pageSize, "select * ", "from tenant_oper_log "+where.toString()+" order by id desc", params.toArray()); 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/service/setting/TenantInfoService.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.service.setting; 2 | 3 | 4 | import java.util.Date; 5 | 6 | import org.apache.commons.lang.StringUtils; 7 | 8 | import com.bytechainx.psi.common.model.TenantOrg; 9 | import com.bytechainx.psi.common.service.base.CommonService; 10 | import com.jfinal.kit.Ret; 11 | 12 | 13 | /** 14 | * 商户信息 15 | */ 16 | public class TenantInfoService extends CommonService { 17 | 18 | /** 19 | * 修改 20 | */ 21 | public Ret update(TenantOrg tenantOrg) { 22 | if(tenantOrg == null) { 23 | return Ret.fail("参数错误"); 24 | } 25 | if(StringUtils.isEmpty(tenantOrg.getName())) { 26 | return Ret.fail("公司简称不能为空"); 27 | } 28 | if(StringUtils.isEmpty(tenantOrg.getMobile())) { 29 | return Ret.fail("服务电话不能为空"); 30 | } 31 | TenantOrg _tenantOrg = TenantOrg.dao.findCacheById(); 32 | tenantOrg.setId(_tenantOrg.getId()); 33 | tenantOrg.setUpdatedAt(new Date()); 34 | tenantOrg.update(); 35 | 36 | return Ret.ok(); 37 | } 38 | 39 | 40 | } -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/service/setting/TenantMerchantPayService.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.service.setting; 2 | 3 | 4 | import com.bytechainx.psi.common.model.TenantOrg; 5 | import com.bytechainx.psi.common.service.base.CommonService; 6 | import com.jfinal.kit.Ret; 7 | 8 | 9 | /** 10 | * 商户收款 11 | */ 12 | public class TenantMerchantPayService extends CommonService { 13 | 14 | // private static final Log LOG = Log.getLog(TenantMerchantPayService.class); 15 | 16 | /** 17 | * 修改 18 | */ 19 | public Ret update(TenantOrg tenantOrg) { 20 | 21 | 22 | return Ret.ok(); 23 | } 24 | 25 | 26 | 27 | } -------------------------------------------------------------------------------- /psi-common/src/main/java/com/bytechainx/psi/common/service/setting/TenantPayOrderService.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.common.service.setting; 2 | 3 | 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import com.bytechainx.psi.common.model.TenantPayOrder; 8 | import com.bytechainx.psi.common.service.base.CommonService; 9 | import com.jfinal.kit.Kv; 10 | import com.jfinal.plugin.activerecord.Page; 11 | 12 | 13 | /** 14 | * 在线支付 15 | */ 16 | public class TenantPayOrderService extends CommonService { 17 | 18 | 19 | /** 20 | * 分页列表 21 | */ 22 | public Page paginate(Kv condKv, Integer pageNumber, int pageSize) { 23 | StringBuffer where = new StringBuffer(); 24 | List params = new ArrayList(); 25 | where.append("where 1 = 1 "); 26 | 27 | conditionFilter(condKv, where, params); 28 | 29 | return TenantPayOrder.dao.paginate(pageNumber, pageSize, "select * ", "from tenant_pay_order "+where.toString()+" order by id", params.toArray()); 30 | } 31 | 32 | 33 | } -------------------------------------------------------------------------------- /psi-common/src/main/java/com/silkie/PidConstant.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.silkie; 5 | 6 | /** 7 | * @author defier 8 | * 2011-4-20 下午06:21:41 9 | * @since 1.0 10 | */ 11 | public class PidConstant { 12 | 13 | /** 14 | * 服务器间通讯必带信息 15 | */ 16 | public static final String COMMON_PROTOCOL = "CommonProtocol"; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/silkie/epc/Epc.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 by pw186.com. 3 | * All right reserved. 4 | */ 5 | package com.silkie.epc; 6 | 7 | import com.silkie.epc.impl.Collision; 8 | 9 | 10 | /** 11 | * 事件处理中心接口 12 | * 13 | */ 14 | public interface Epc { 15 | 16 | /** 17 | * 添加一个待处理事件到epc中 18 | * EPC保证拥有相同冲突体的事件不会被并发被执行 19 | * 20 | * @param event 待处理事件 21 | * @param collis 该事件对应的冲突体,null表示不会与其它事件有冲突 22 | */ 23 | void pushEvent(EpcEvent event, Collision collis); 24 | 25 | /** 26 | * 处理完所有待处理事件后,关闭epc 27 | */ 28 | void shutdown(); 29 | 30 | /** 31 | * 立刻关闭epc,丢弃所有待处理事件 32 | */ 33 | void shutdownNow(); 34 | } 35 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/silkie/epc/EpcErrCode.java: -------------------------------------------------------------------------------- 1 | package com.silkie.epc; 2 | 3 | /** 4 | * 错误码表 5 | * @author defier 6 | * @since 1.0 7 | */ 8 | public class EpcErrCode { 9 | /** 10 | * 操作成功,成功的通用返回码 11 | */ 12 | public static final int SUCCESS = 0; 13 | 14 | /** 15 | * 未知错误 16 | */ 17 | public static final int UNKNOWN_ERR = 9999; 18 | 19 | /** 20 | * 非法的SessionId 21 | */ 22 | public static final int INVALID_SESSION_ID = 1001; 23 | 24 | /** 25 | * 非法的消息格式 26 | */ 27 | public static final int INVALID_MSG_FORMAT = 1002; 28 | 29 | /** 30 | * 系统内部错误 31 | */ 32 | public static final int INTERNAL_ERR = 2001; 33 | 34 | /** 35 | * 数据库错误 36 | */ 37 | public static final int DB_ERR = 2101; 38 | 39 | /** 40 | * 通讯错误 41 | */ 42 | public static final int SOCKET_ERR = 2201; 43 | 44 | /** 45 | * 非法事件参数 46 | */ 47 | public static final int INVALID_PARAM = 2301; 48 | 49 | /** 50 | * 服务器状态异常 51 | */ 52 | public static final int SERVER_STATUS_ERROR = 2302; 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/silkie/epc/EpcEvent.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 by pw186.com. 3 | * All right reserved. 4 | */ 5 | package com.silkie.epc; 6 | 7 | import com.silkie.epc.impl.Collision; 8 | import com.silkie.epc.impl.EpcEventParam; 9 | 10 | 11 | 12 | 13 | /** 14 | * 处理事件,每个事件都有相关的传入参数和冲突体 15 | * 传入参数(EventParam):事件执行时,必须用到的相关参数。 16 | * 冲突体(Collision):事件并发执行时,需要锁定的资源,拥有相同冲突体的事件,不应该被并发执行,必须按顺序执行。 17 | * 18 | */ 19 | public interface EpcEvent { 20 | 21 | /** 22 | * 获得该事件执行时需要的传入参数 23 | * @return 事件需要的传入参数 24 | */ 25 | EpcEventParam getEventParam(); 26 | 27 | /** 28 | * 获得该事件执行时需要的传入参数 29 | * @param 事件需要的传入参数 30 | */ 31 | void setEventParam(EpcEventParam param); 32 | 33 | /** 34 | * 获得该事件执行时需要响应的结果参数 35 | * @return 事件需要的传入参数 36 | */ 37 | EpcEventParam getResponseParam(); 38 | 39 | /** 40 | * 执行事件该事件 41 | */ 42 | void execute(); 43 | 44 | /** 45 | * 事件对应的冲突体 46 | * @return 47 | */ 48 | Collision getCollision(); 49 | } 50 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/silkie/epc/ModeLock.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Since 2014, Power by Pw186.com 3 | */ 4 | package com.silkie.epc; 5 | 6 | import java.util.concurrent.TimeUnit; 7 | import java.util.concurrent.locks.Condition; 8 | import java.util.concurrent.locks.ReentrantLock; 9 | 10 | import org.slf4j.Logger; 11 | import org.slf4j.LoggerFactory; 12 | 13 | /** 14 | * 对话模式全局锁,对话模式请求端必须等待响应消息,才进入下一步处理。 15 | * 如果并发量多,对话模式会遇到瓶颈 16 | * @author defier 17 | * 2014年12月27日 下午4:15:46 18 | * @version 1.0 19 | */ 20 | public class ModeLock { 21 | 22 | private final static Logger LOG = LoggerFactory.getLogger(ModeLock.class); 23 | 24 | private static int TIME_OUT_TIME = 3; 25 | private ReentrantLock dialogLock = new ReentrantLock(); 26 | private final Condition sendCondition = dialogLock.newCondition(); 27 | 28 | public void await() throws Exception { 29 | sendCondition.await(TIME_OUT_TIME, TimeUnit.SECONDS); 30 | } 31 | 32 | public void singal() { 33 | dialogLock.lock(); 34 | try { 35 | sendCondition.signal(); 36 | } catch (Exception e) { 37 | LOG.error("error", e); 38 | } finally { 39 | dialogLock.unlock(); 40 | } 41 | } 42 | 43 | public void lock() { 44 | dialogLock.lock(); 45 | } 46 | 47 | public void unlock() { 48 | dialogLock.unlock(); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/silkie/epc/PerfTrace.java: -------------------------------------------------------------------------------- 1 | package com.silkie.epc; 2 | 3 | import java.io.PrintStream; 4 | 5 | /** 6 | * 跟踪一个运行过程的每步运行时间,并输出。 7 | * 该类线程不安全 8 | * 9 | */ 10 | public class PerfTrace { 11 | 12 | long init; 13 | long last; 14 | long maxCost; 15 | 16 | String name; 17 | 18 | PrintStream out; 19 | 20 | boolean enable; 21 | 22 | public PerfTrace(String name, boolean enable) { 23 | this(name, System.out, enable); 24 | } 25 | 26 | public PerfTrace(String name, PrintStream out, boolean enable) { 27 | this.name = name; 28 | this.out = out; 29 | this.enable = enable; 30 | } 31 | 32 | public void begin() { 33 | if (!enable) return; 34 | init = System.currentTimeMillis(); 35 | last = init; 36 | print(name+", begin trace at " + last); 37 | } 38 | 39 | public void step() { 40 | if (!enable) return; 41 | step(null); 42 | } 43 | public void step(String desc) { 44 | if (!enable) return; 45 | long cur = System.currentTimeMillis(); 46 | long cost=cur - last; 47 | print(name+", step: " + desc + ", elapsed: " + (cost) +" ms"); 48 | last = cur; 49 | if(cost>maxCost){ 50 | maxCost=cost; 51 | } 52 | } 53 | 54 | public void end() { 55 | if (!enable) return; 56 | long cur = System.currentTimeMillis(); 57 | print(name+", end trace, all elapsed: " + (cur - init) +" ms"); 58 | last = cur; 59 | } 60 | 61 | public long elpased () { 62 | return last - init; 63 | } 64 | 65 | private void print(String msg) { 66 | out.println(msg); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/silkie/epc/impl/BaseEpc.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 by pw186.com. 3 | * All right reserved. 4 | */ 5 | package com.silkie.epc.impl; 6 | 7 | import com.silkie.epc.Epc; 8 | import com.silkie.epc.EpcEvent; 9 | 10 | /** 11 | * epc的一些基础实现 12 | * @author defier 13 | * 2014年12月12日 下午3:44:45 14 | * @version 1.0 15 | */ 16 | public abstract class BaseEpc implements Epc { 17 | 18 | // 任务执行之前被调用 19 | protected void beforeRun(Task t) { } 20 | 21 | // 任务执行之后被调用 22 | protected void afterRun(Task t) { } 23 | 24 | /* 25 | * 在线程池中,执行Event的辅助类 26 | */ 27 | protected class Task implements Runnable { 28 | EpcEvent te; 29 | Collision colli; 30 | 31 | Task(EpcEvent event, Collision collis) { 32 | if (event == null) 33 | throw new NullPointerException("event is null."); 34 | 35 | te = event; 36 | colli = collis; 37 | } 38 | 39 | public EpcEvent getEvent() { 40 | return te; 41 | } 42 | 43 | public Collision getCollision() { 44 | return colli; 45 | } 46 | 47 | /* 48 | * @see java.lang.Runnable#run() 49 | */ 50 | @Override 51 | public void run() { 52 | try { 53 | beforeRun(this); 54 | 55 | te.execute(); 56 | } catch(Exception ex) { 57 | //ex.printStackTrace(); 58 | } finally { 59 | afterRun(this); 60 | } 61 | } 62 | 63 | /////////////////////////////////////////// 记录任务的运行时间 64 | long tm, em; 65 | void beginProfile() { 66 | tm = System.currentTimeMillis(); 67 | } 68 | 69 | void endProfile() { 70 | em = System.currentTimeMillis(); 71 | } 72 | 73 | long elpasedMills() { 74 | return em - tm; 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/silkie/epc/impl/EpcEventParam.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 by pw186.com. 3 | * All right reserved. 4 | */ 5 | package com.silkie.epc.impl; 6 | 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | 10 | import com.silkie.epc.BaseParam; 11 | import com.silkie.epc.ModeLock; 12 | 13 | /** 14 | * 事件参数,改接口实例将作为参数注入Event中执行 15 | * 16 | */ 17 | public class EpcEventParam extends BaseParam { 18 | 19 | private int seqSeries;// unsigned short 20 | private long seqNo; // unsigned int 21 | private String tid; 22 | 23 | private ModeLock modeLock; 24 | 25 | 26 | private HashMap map; 27 | private long timestamp; 28 | 29 | public EpcEventParam() { 30 | timestamp = System.currentTimeMillis(); 31 | map = new HashMap(); 32 | } 33 | 34 | @Override 35 | protected Map getMap() { 36 | return map; 37 | } 38 | 39 | /** 40 | * 参数类生成的时间 41 | */ 42 | public long getCreatedMillis() { 43 | return timestamp; 44 | } 45 | 46 | public void setSeqSeries(int seqSeries) { 47 | this.seqSeries = seqSeries; 48 | } 49 | 50 | public int getSeqSeries() { 51 | return seqSeries; 52 | } 53 | 54 | public void setSeqNo(long seqNo) { 55 | this.seqNo = seqNo; 56 | } 57 | 58 | public long getSeqNo() { 59 | return seqNo; 60 | } 61 | 62 | public void setTid(String tid) { 63 | this.tid = tid; 64 | } 65 | 66 | public String getTid() { 67 | return tid; 68 | } 69 | 70 | public ModeLock getModeLock() { 71 | return modeLock; 72 | } 73 | 74 | public void setModeLock(ModeLock modeLock) { 75 | this.modeLock = modeLock; 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/silkie/epc/impl/EpcFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 by pw186.com. 3 | * All right reserved. 4 | */ 5 | package com.silkie.epc.impl; 6 | 7 | import com.silkie.epc.Epc; 8 | 9 | 10 | 11 | 12 | /** 13 | * Epc工厂,对外提供Epc的构造方法 14 | * 15 | */ 16 | public class EpcFactory { 17 | 18 | /** 19 | * 非常简单的epc,按时间排序,挨个处理 20 | * @return 21 | */ 22 | public static Epc createSimpleEpc() { 23 | return new SimpleEpc(); 24 | } 25 | 26 | /** 27 | * 采用线程池,并发处理事件的EPC 28 | * @return 29 | */ 30 | public static Epc createThreadPoolEpc() { 31 | return createThreadPoolEpc(ThreadPoolEpc.DEFAULT_POOL_SIZE, ThreadPoolEpc.DEFAULT_POOL_SIZE); 32 | } 33 | 34 | /** 35 | * 采用线程池,并发处理事件的EPC 36 | * @param maxPoolSize 线程池最大线程数 37 | * @return 38 | */ 39 | public static Epc createThreadPoolEpc(int maxPoolSize) { 40 | return createThreadPoolEpc(maxPoolSize, maxPoolSize); 41 | } 42 | 43 | /** 44 | * 采用线程池,并发处理事件的EPC 45 | * @param corePoolSize 线程池最小线程数 46 | * @param maxPoolSize 线程池最大线程数 47 | * @return 48 | */ 49 | public static Epc createThreadPoolEpc(int corePoolSize, int maxPoolSize) { 50 | Epc epc = new ThreadPoolEpc(corePoolSize, maxPoolSize); 51 | //TODO set epc to jmx 52 | //Registry.getJmxManager().registerMBean(new TsMBean(epc), "EPC"); 53 | return epc; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/silkie/epc/impl/SimpleEpc.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 by pw186.com. 3 | * All right reserved. 4 | */ 5 | package com.silkie.epc.impl; 6 | 7 | import java.util.concurrent.ExecutorService; 8 | import java.util.concurrent.Executors; 9 | 10 | import com.jfinal.log.Log; 11 | import com.silkie.epc.EpcEvent; 12 | 13 | /** 14 | * 非常简单的事件处理中心 15 | * 按时间顺序排队,挨个执行 16 | * 17 | */ 18 | public class SimpleEpc extends BaseEpc { 19 | private static final Log LOG = Log.getLog(SimpleEpc.class); 20 | 21 | private ExecutorService es; 22 | private boolean isShutdown; 23 | SimpleEpc() { 24 | es = Executors.newFixedThreadPool(1); 25 | isShutdown = false; 26 | } 27 | 28 | @Override 29 | public void pushEvent(EpcEvent event, Collision collis) { 30 | if (isShutdown) return; 31 | try { 32 | es.submit(new Task(event, collis)); 33 | } catch (Exception ex) { 34 | LOG.error("execute event error:", ex); 35 | } 36 | } 37 | 38 | @Override 39 | public void shutdown() { 40 | isShutdown = true; 41 | es.shutdown(); 42 | } 43 | 44 | @Override 45 | public void shutdownNow() { 46 | isShutdown = true; 47 | es.shutdownNow(); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /psi-common/src/main/java/com/silkie/field/CommonProtocol.java: -------------------------------------------------------------------------------- 1 | package com.silkie.field; 2 | 3 | /** 4 | * 公共域信息,所有的协议包都必须携带此域 5 | * @author defier 6 | * 2011-4-20 下午05:51:21 7 | * @since 1.0 8 | */ 9 | public class CommonProtocol { 10 | 11 | /** 12 | * 返回编码 13 | */ 14 | private int rtnCode; 15 | /** 16 | * 返回消息 17 | */ 18 | private String rtnMsg; 19 | 20 | public int getRtnCode() { 21 | return rtnCode; 22 | } 23 | 24 | public void setRtnCode(int rtnCode) { 25 | this.rtnCode = rtnCode; 26 | } 27 | 28 | public String getRtnMsg() { 29 | return rtnMsg; 30 | } 31 | 32 | public void setRtnMsg(String rtnMsg) { 33 | this.rtnMsg = rtnMsg; 34 | } 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /psi-common/src/main/resources/commonConfig/app-config-dev.txt: -------------------------------------------------------------------------------- 1 | # db config 2 | mysql.jdbcUrl = jdbc:mysql://localhost/psi_opensource?useSSL=false&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull 3 | mysql.user = root 4 | mysql.password = root 5 | 6 | pc.web.domain=http://127.0.0.1:8080 7 | 8 | resource.upload.path=D:\\eclipse\\Workspaces\\Oomph\\psi-core\\src\\main\\webapp\\resources\\uploads 9 | resource.upload.domain=http://127.0.0.1:8080/resources/uploads 10 | resource.domain=http://127.0.0.1:8080/resources 11 | 12 | redis.ip=127.0.0.1 13 | redis.port=6379 14 | redis.password= 15 | 16 | lodop.cloud.script.url1=http://192.168.0.104:8000/CLodopfuncs.js 17 | lodop.cloud.script.url2=http://192.168.0.104:8000/CLodopfuncs.js 18 | 19 | lodop.local.script.url1=http://localhost:8000/CLodopfuncs.js 20 | lodop.local.script.url2=http://localhost:18000/CLodopfuncs.js 21 | 22 | //掌骏短信 23 | sms.junmei.user.id= 24 | sms.junmei.user.user= 25 | sms.junmei.user.pwd= 26 | 27 | // summail赛邮短信 28 | sms.submail.app.id= 29 | sms.submail.app.key= 30 | 31 | -------------------------------------------------------------------------------- /psi-common/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # log4j.rootLogger=WARN, stdout, file 2 | log4j.rootLogger=debug, stdout, file 3 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.stdout.layout.ConversionPattern=%n%-d{yyyy-MM-dd HH:mm:ss}%n[%p]-[Thread: %t]-[%C.%M()]: %m%n 6 | 7 | # Output to the File 8 | log4j.appender.file=org.apache.log4j.DailyRollingFileAppender 9 | log4j.appender.file.DatePattern='_'yyyy-MM-dd'.log' 10 | log4j.appender.file.File=./log/run.log 11 | log4j.appender.file.layout=org.apache.log4j.PatternLayout 12 | log4j.appender.file.layout.ConversionPattern=%n%-d{yyyy-MM-dd HH:mm:ss}%n[%p]-[Thread: %t]-[%C.%M()]: %m%n 13 | 14 | 15 | -------------------------------------------------------------------------------- /psi-common/src/test/java/com/bytechainx/psi/common/system-oper.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guandianyun/psi/0f6913f39c4f4098f571653ed5b5851636430fae/psi-common/src/test/java/com/bytechainx/psi/common/system-oper.sql -------------------------------------------------------------------------------- /psi-fund/src/main/java/com/bytechainx/psi/fund/service/base/BaseService.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.fund.service.base; 2 | 3 | import com.bytechainx.psi.common.service.base.CommonService; 4 | 5 | public class BaseService extends CommonService { 6 | 7 | 8 | 9 | } 10 | -------------------------------------------------------------------------------- /psi-purchase/src/main/java/com/bytechainx/psi/purchase/service/StatStockService.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.purchase.service; 2 | 3 | 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import com.bytechainx.psi.common.model.InventoryStockLog; 8 | import com.bytechainx.psi.common.service.base.CommonService; 9 | import com.jfinal.kit.Kv; 10 | import com.jfinal.kit.Ret; 11 | import com.jfinal.plugin.activerecord.Page; 12 | 13 | 14 | /** 15 | * 库存统计 16 | */ 17 | public class StatStockService extends CommonService { 18 | 19 | 20 | /** 21 | * 库存流水 22 | */ 23 | public Page paginate(Kv conditionColumns, Integer pageNumber, int pageSize) { 24 | StringBuffer where = new StringBuffer(); 25 | List params = new ArrayList(); 26 | where.append("where 1 = 1 "); 27 | 28 | conditionFilter(conditionColumns, where, params); 29 | 30 | return InventoryStockLog.dao.paginate(pageNumber, pageSize, "select * ", "from inventory_stock_log "+where.toString()+" order by id desc", params.toArray()); 31 | } 32 | 33 | /** 34 | * 查看 35 | */ 36 | public Ret show() { 37 | 38 | return Ret.ok(); 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /psi-purchase/src/main/java/com/bytechainx/psi/purchase/service/StockInfoService.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.purchase.service; 2 | 3 | 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import com.bytechainx.psi.common.model.InventoryStock; 8 | import com.bytechainx.psi.common.service.base.CommonService; 9 | import com.jfinal.kit.Kv; 10 | import com.jfinal.plugin.activerecord.Page; 11 | 12 | 13 | /** 14 | * 库存查询 15 | */ 16 | public class StockInfoService extends CommonService { 17 | 18 | 19 | /** 20 | * 分页列表 21 | * 按商品查询 22 | */ 23 | public Page paginate(Kv conditionColumns, Integer pageNumber, int pageSize) { 24 | StringBuffer where = new StringBuffer(); 25 | List params = new ArrayList(); 26 | where.append("where 1 = 1 "); 27 | 28 | conditionFilter(conditionColumns, where, params); 29 | 30 | return InventoryStock.dao.paginate(pageNumber, pageSize, "select goods_info_id, sum(stock) sum_stock, sum(reserve_stock) as sum_reserve_stock, sum(lock_stock) as sum_lock_stock ", "from inventory_stock "+where.toString()+" group by goods_info_id", params.toArray()); 31 | } 32 | 33 | /** 34 | * 分页列表 35 | * 按规格查询 36 | */ 37 | public Page paginateBySpec(Kv conditionColumns, Integer pageNumber, int pageSize) { 38 | StringBuffer where = new StringBuffer(); 39 | List params = new ArrayList(); 40 | where.append("where 1 = 1 "); 41 | 42 | conditionFilter(conditionColumns, where, params); 43 | 44 | return InventoryStock.dao.paginate(pageNumber, pageSize, "select * ", "from inventory_stock "+where.toString()+" order by id desc", params.toArray()); 45 | } 46 | 47 | } -------------------------------------------------------------------------------- /psi-purchase/src/main/java/com/bytechainx/psi/purchase/service/StockWarningService.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.purchase.service; 2 | 3 | 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import com.bytechainx.psi.common.model.InventoryStock; 8 | import com.bytechainx.psi.common.service.base.CommonService; 9 | import com.jfinal.kit.Kv; 10 | import com.jfinal.kit.Ret; 11 | import com.jfinal.plugin.activerecord.Page; 12 | 13 | 14 | /** 15 | * 库存预警 16 | */ 17 | public class StockWarningService extends CommonService { 18 | 19 | 20 | /** 21 | * 分页列表 22 | */ 23 | public Page paginate(Kv conditionColumns, Integer pageNumber, int pageSize) { 24 | StringBuffer where = new StringBuffer(); 25 | List params = new ArrayList(); 26 | where.append("where 1 = 1 "); 27 | 28 | conditionFilter(conditionColumns, where, params); 29 | 30 | return InventoryStock.dao.paginate(pageNumber, pageSize, "select * ", "from inventory_stock "+where.toString()+" order by id desc", params.toArray()); 31 | } 32 | 33 | /** 34 | * 查看 35 | */ 36 | public Ret show() { 37 | 38 | return Ret.ok(); 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /psi-purchase/src/main/java/com/bytechainx/psi/purchase/service/base/BaseService.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.purchase.service.base; 2 | 3 | import com.bytechainx.psi.common.service.base.CommonService; 4 | 5 | public class BaseService extends CommonService { 6 | 7 | 8 | 9 | } 10 | -------------------------------------------------------------------------------- /psi-sale/src/main/java/com/bytechainx/psi/sale/service/base/BaseService.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.sale.service.base; 2 | 3 | import com.bytechainx.psi.common.service.base.CommonService; 4 | 5 | public class BaseService extends CommonService { 6 | 7 | 8 | 9 | } 10 | -------------------------------------------------------------------------------- /psi-web/src/main/java/com/bytechainx/psi/web/App.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.web; 2 | 3 | import com.bytechainx.psi.web.config.AppConfig; 4 | import com.jfinal.server.undertow.UndertowServer; 5 | 6 | /** 7 | * 启动入口 8 | */ 9 | public class App { 10 | 11 | public static void main(String[] args) { 12 | UndertowServer.start(AppConfig.class); 13 | } 14 | 15 | } 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /psi-web/src/main/java/com/bytechainx/psi/web/job/OrderCodeBuilderJob.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.web.job; 5 | 6 | import org.quartz.JobExecutionContext; 7 | 8 | import com.bytechainx.psi.common.model.InventoryChecking; 9 | import com.bytechainx.psi.common.model.PurchaseOrder; 10 | import com.bytechainx.psi.common.model.PurchaseRejectOrder; 11 | import com.bytechainx.psi.common.model.SaleOrder; 12 | import com.bytechainx.psi.common.model.SaleRejectOrder; 13 | import com.bytechainx.psi.common.model.TraderIncomeExpenses; 14 | import com.bytechainx.psi.common.model.TraderPayOrder; 15 | import com.bytechainx.psi.common.model.TraderReceiptOrder; 16 | import com.bytechainx.psi.common.model.TraderTransferOrder; 17 | import com.bytechainx.psi.web.job.base.BaseJob; 18 | 19 | /** 20 | * 单据编号生成任务 21 | * @author defier 22 | * 23 | */ 24 | public class OrderCodeBuilderJob extends BaseJob { 25 | 26 | @Override 27 | protected void run(JobExecutionContext context) { 28 | 29 | InventoryChecking.dao.buildOrderCodes(); 30 | PurchaseOrder.dao.buildOrderCodes(); 31 | PurchaseRejectOrder.dao.buildOrderCodes(); 32 | SaleOrder.dao.buildOrderCodes(); 33 | SaleRejectOrder.dao.buildOrderCodes(); 34 | TraderPayOrder.dao.buildOrderCodes(); 35 | TraderReceiptOrder.dao.buildOrderCodes(); 36 | TraderTransferOrder.dao.buildOrderCodes(); 37 | TraderIncomeExpenses.dao.buildOrderCodes(); 38 | 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /psi-web/src/main/java/com/bytechainx/psi/web/job/base/BaseJob.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.web.job.base; 5 | 6 | import org.quartz.JobExecutionContext; 7 | import org.quartz.StatefulJob; 8 | 9 | import com.bytechainx.psi.web.config.AppConfig; 10 | 11 | /** 12 | * @author defier 13 | * 14 | */ 15 | @SuppressWarnings("deprecation") 16 | public abstract class BaseJob implements StatefulJob { 17 | 18 | public final static int THREAD_COUNT = 8; // 线程总数 19 | 20 | @Override 21 | public void execute(JobExecutionContext context) { 22 | if(!AppConfig.staratup) { 23 | return; 24 | } 25 | run(context); 26 | } 27 | 28 | protected abstract void run(JobExecutionContext context); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /psi-web/src/main/java/com/bytechainx/psi/web/web/controller/ExportLogController.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.web.web.controller; 5 | 6 | import java.util.Date; 7 | 8 | import com.bytechainx.psi.common.EnumConstant.ExportStatusEnum; 9 | import com.bytechainx.psi.common.model.TenantExportLog; 10 | import com.bytechainx.psi.common.service.export.ExportLogService; 11 | import com.bytechainx.psi.web.web.controller.base.BaseController; 12 | import com.jfinal.aop.Inject; 13 | import com.jfinal.core.Path; 14 | import com.jfinal.plugin.activerecord.Page; 15 | 16 | /** 17 | * 导出任务信息 18 | * @author defier 19 | */ 20 | @Path("/export/log") 21 | public class ExportLogController extends BaseController { 22 | 23 | @Inject 24 | private ExportLogService exportLogService; 25 | 26 | public void index() { 27 | keepPara("targetId"); 28 | } 29 | 30 | public void list() { 31 | int pageNumber = getInt("pageNumber", 1); 32 | pageSize = getPageSize(); 33 | 34 | Page page = exportLogService.paginate(getAdminId(), pageNumber, pageSize); 35 | for (TenantExportLog exportLog : page.getList()) { 36 | if(exportLog.getExportStatus() == ExportStatusEnum.ing.getValue() && exportLog.getCreatedAt().getTime() + (10*60*1000) <= System.currentTimeMillis()) { 37 | exportLog.setExportStatus(ExportStatusEnum.fail.getValue()); 38 | exportLog.setErrorDesc("导出超时"); 39 | exportLog.setUpdatedAt(new Date()); 40 | exportLog.update(); 41 | } 42 | } 43 | 44 | setAttr("page", page); 45 | keepPara("targetId"); 46 | } 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /psi-web/src/main/java/com/bytechainx/psi/web/web/controller/UploadController.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.web.web.controller; 5 | 6 | import com.bytechainx.psi.common.kit.FileKit; 7 | import com.bytechainx.psi.web.config.AppConfig; 8 | import com.bytechainx.psi.web.web.controller.base.BaseController; 9 | import com.jfinal.core.Path; 10 | import com.jfinal.kit.Ret; 11 | import com.jfinal.upload.UploadFile; 12 | 13 | /** 14 | * 上传文件 15 | * @author defier 16 | */ 17 | @Path("/upload") 18 | public class UploadController extends BaseController { 19 | 20 | public void index() { 21 | UploadFile uploadFile = getFile(); 22 | if(uploadFile == null) { 23 | renderJson(Ret.fail("上传文件不存在")); 24 | return; 25 | } 26 | Ret ret = FileKit.uploadImage(uploadFile, AppConfig.resourceUploadPath); 27 | //return Ret.ok().set("filePath", filePath).set("thumbPath", thumbPath); 28 | renderJson(ret); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /psi-web/src/main/java/com/bytechainx/psi/web/web/controller/inventory/StatStockController.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.web.web.controller.inventory; 2 | 3 | 4 | import com.bytechainx.psi.web.web.controller.base.BaseController; 5 | import com.jfinal.core.Path; 6 | import com.jfinal.kit.Ret; 7 | 8 | 9 | /** 10 | * 库存统计 11 | */ 12 | @Path("/inventory/stat/stock") 13 | public class StatStockController extends BaseController { 14 | 15 | 16 | /** 17 | * 首页 18 | */ 19 | // @Permission(Permissions.inventory_stat_stock) 20 | public void index() { 21 | 22 | list(); 23 | 24 | } 25 | 26 | /** 27 | * 列表 28 | */ 29 | // @Permission(Permissions.inventory_stat_stock) 30 | public void list() { 31 | 32 | 33 | } 34 | 35 | /** 36 | * 查看 37 | */ 38 | // @Permission(Permissions.inventory_stat_stock_show) 39 | public void show() { 40 | 41 | renderJson(Ret.ok()); 42 | } 43 | } -------------------------------------------------------------------------------- /psi-web/src/main/java/com/bytechainx/psi/web/web/controller/msg/MsgNoticeController.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.bytechainx.psi.web.web.controller.msg; 5 | 6 | import java.util.Date; 7 | 8 | import com.bytechainx.psi.common.EnumConstant.FlagEnum; 9 | import com.bytechainx.psi.common.model.MsgNoticeSend; 10 | import com.bytechainx.psi.common.service.msg.MsgNoticeService; 11 | import com.bytechainx.psi.web.web.controller.base.BaseController; 12 | import com.jfinal.aop.Inject; 13 | import com.jfinal.core.Path; 14 | import com.jfinal.plugin.activerecord.Page; 15 | 16 | /** 17 | * 消息通知 18 | * @author defier 19 | */ 20 | @Path("/msg/notice") 21 | public class MsgNoticeController extends BaseController { 22 | 23 | @Inject 24 | private MsgNoticeService msgNoticeService; 25 | 26 | public void index() { 27 | 28 | } 29 | 30 | public void list() { 31 | pageSize = 10; 32 | int pageNumber = getInt("pageNumber", 1); 33 | Boolean readFlag = getBoolean("read_flag"); 34 | Page page = msgNoticeService.paginate(getAdminId(), readFlag, pageNumber, pageSize); 35 | setAttr("page", page); 36 | } 37 | 38 | 39 | public void show() { 40 | Integer id = getInt("id"); 41 | MsgNoticeSend msg = MsgNoticeSend.dao.findBy(id); 42 | if(msg == null) { 43 | renderError(404); 44 | return; 45 | } 46 | msg.setReadFlag(FlagEnum.YES.getValue()); 47 | msg.setReadTime(new Date()); 48 | msg.update(); 49 | 50 | setAttr("msg", msg); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /psi-web/src/main/java/com/bytechainx/psi/web/web/interceptor/ViewContextInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.bytechainx.psi.web.web.interceptor; 2 | 3 | import com.bytechainx.psi.common.CommonConstant; 4 | import com.bytechainx.psi.common.model.TenantOrg; 5 | import com.jfinal.aop.Interceptor; 6 | import com.jfinal.aop.Invocation; 7 | import com.jfinal.core.Controller; 8 | 9 | /** 10 | * 一些公共数据,在此类中处理 11 | * @author defier 12 | * 13 | */ 14 | public class ViewContextInterceptor implements Interceptor { 15 | 16 | // private final static String TOKEN_NAME = "_mvc_token"; 17 | 18 | @Override 19 | public void intercept(Invocation ai) { 20 | Controller controller = ai.getController(); 21 | controller.setAttr("session", controller.getSessionAttr(CommonConstant.SESSION_ID_KEY)); 22 | TenantOrg currentTenant = TenantOrg.dao.findCacheById(); 23 | controller.setAttr("currentTenant", currentTenant); 24 | /** 25 | String methodName = ai.getMethodName(); 26 | if (StringUtils.contains(methodName, "add") || StringUtils.contains(methodName, "edit")) { 27 | controller.createToken(TOKEN_NAME); 28 | } 29 | if (StringUtils.contains(methodName, "create") || StringUtils.contains(methodName, "update")) { 30 | if(!controller.validateToken(TOKEN_NAME)) { 31 | controller.renderJson(Ret.fail("操作过于频繁")); 32 | return; 33 | } 34 | } 35 | **/ 36 | 37 | ai.invoke(); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/common/_commonMethod.html: -------------------------------------------------------------------------------- 1 | #define goodsCategoryOptions(currentId, category, level) 2 | 9 | #set(childList = category.childList) 10 | #if(childList.size() <= 0) 11 | #return 12 | #end 13 | #if(level == "") 14 | #set(level = level+"    ") 15 | #else 16 | #set(level = level+"        ") 17 | #end 18 | 19 | #for(child : childList) 20 | #@goodsCategoryOptions(currentId, child, level) 21 | #end 22 | #end 23 | 24 | 25 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/common/_noLogin.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/common/_nopermission.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/dashboard/loadGoodsStatByDay.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | #set(amounts="") 4 | #set(buyNumbers="") 5 | #set(goodsList="") 6 | #for(x : goodsStatList) 7 | #set(amounts = amounts + x.amount??0) 8 | #set(buyNumbers = buyNumbers + x.buy_number??0) 9 | #set(goodsList = goodsList + "'" + x.goodsInfo.name + "'") 10 | #if(!for.last) 11 | #set(amounts = amounts + ",") 12 | #set(buyNumbers = buyNumbers + ",") 13 | #set(goodsList = goodsList + ",") 14 | #end 15 | #end 16 | 17 | 18 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/dashboard/service.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/export/log/index.html: -------------------------------------------------------------------------------- 1 | 22 | 23 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/export/log/list.html: -------------------------------------------------------------------------------- 1 | #if(page.totalRow <=0) 2 |
暂无导出记录!
3 | #else 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | #set(ingStatus = false) 16 | #for (x : page.getList()) 17 | #if(x.export_status == ExportStatusEnum.ing.value) 18 | #set(ingStatus = true) 19 | #end 20 | 21 | 22 | 23 | 24 | 25 | 26 | #end 27 | 28 |
文件名导出时间状态操作
#(x.file_name)#date(x.created_at, "yyyy-MM-dd HH:mm:ss")#(x.exportStatusName)#if(x.export_status == ExportStatusEnum.finish.value) 下载 #end
29 |
30 |
31 |
32 | #@paginate(page.pageNumber, page.totalPage, "") 33 |
34 |
35 |
36 | 37 | #end 38 | 39 | 40 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/account/fundType/edit.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 46 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/account/fundType/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 6 |
7 |
8 | #if(session.hasOper(Permissions.fund_account_fundType_create)) 9 | 12 | #end 13 |
14 |
15 | 16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 | 24 |
25 | 26 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/account/fundType/optionList.html: -------------------------------------------------------------------------------- 1 | #for(x : page.list) 2 | 3 | #end 4 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/account/info/edit.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 44 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/account/info/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 6 |
7 |
8 | #if(session.hasOper(Permissions.fund_account_info_create)) 9 | 12 | #end 13 |
14 |
15 | 16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 | 24 |
25 | 26 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/account/info/optionList.html: -------------------------------------------------------------------------------- 1 | #for(x : page.list) 2 | 3 | #end 4 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/account/transfer/add.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 52 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/account/transfer/edit.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 51 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/book/payOrder/audit.html: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | 43 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/book/payOrder/draftIndex.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 草稿箱 4 |
5 | 6 |
7 |
8 | #include("draftList.html") 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/book/payOrder/draftList.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | #for(x : page.list) 15 | 16 | 17 | 18 | 19 | 20 | 25 | 26 | #end 27 | 28 |
单据编号单据日期供应商备注操作
#(x.order_code)#date(x.order_time, "yyyy-MM-dd")#(x.supplierInfo.name??)#(x.remark) 21 | 22 |    23 | 24 |
29 |
30 |
-------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/book/payOrder/editDraft.html: -------------------------------------------------------------------------------- 1 | #include("add.html") -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/book/receiptOrder/audit.html: -------------------------------------------------------------------------------- 1 | 28 | 29 | 42 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/book/receiptOrder/draftIndex.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 草稿箱 4 |
5 | 6 |
7 |
8 | #include("draftList.html") 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/book/receiptOrder/draftList.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | #for(x : page.list) 15 | 16 | 17 | 18 | 19 | 20 | 25 | 26 | #end 27 | 28 |
单据编号单据日期客户备注操作
#(x.order_code)#date(x.order_time, "yyyy-MM-dd")#(x.customerInfo.name??)#(x.remark) 21 | 22 |    23 | 24 |
29 |
30 |
-------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/book/receiptOrder/editDraft.html: -------------------------------------------------------------------------------- 1 | #include("add.html") -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/flow/expenses/audit.html: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | 43 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/flow/expenses/draftIndex.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 草稿箱 4 |
5 | 6 |
7 |
8 | #include("draftList.html") 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/flow/expenses/draftList.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | #for(x : page.list) 15 | 16 | 17 | 18 | 19 | 20 | 25 | 26 | #end 27 | 28 |
单据编号单据日期支出项目备注操作
#(x.order_code)#date(x.order_time, "yyyy-MM-dd HH:mm:ss")#(x.fundType.name??)#(x.remark) 21 | 22 |    23 | 24 |
29 |
30 |
-------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/flow/expenses/editDraft.html: -------------------------------------------------------------------------------- 1 | #include("add.html") -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/flow/income/audit.html: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | 43 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/flow/income/draftIndex.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 草稿箱 4 |
5 | 6 |
7 |
8 | #include("draftList.html") 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/flow/income/draftList.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | #for(x : page.list) 15 | 16 | 17 | 18 | 19 | 20 | 25 | 26 | #end 27 | 28 |
单据编号单据日期收入项目备注操作
#(x.order_code)#date(x.order_time, "yyyy-MM-dd HH:mm:ss")#(x.fundType.name??)#(x.remark) 21 | 22 |    23 | 24 |
29 |
30 |
-------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/fund/flow/income/editDraft.html: -------------------------------------------------------------------------------- 1 | #include("add.html") -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/goods/goods/attribute/edit.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 42 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/goods/goods/attribute/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 6 |
7 |
8 | #if(session.hasOper(Permissions.goods_goods_attribute_create)) 9 | 12 | #end 13 |
14 |
15 | 16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 | 24 |
25 | 26 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/goods/goods/attribute/optionList.html: -------------------------------------------------------------------------------- 1 | #for(x : page.list) 2 | 3 | #end 4 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/goods/goods/category/edit.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 42 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/goods/goods/category/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 6 |
7 |
8 | #if(session.hasOper(Permissions.goods_goods_category_create)) 9 | 12 | #end 13 |
14 |
15 |
16 |
17 |
18 |
19 | 20 |
21 | 22 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/goods/goods/category/optionList.html: -------------------------------------------------------------------------------- 1 | #for(x : page.list) 2 | 3 | #end 4 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/goods/goods/spec/edit.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 42 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/goods/goods/spec/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 6 |
7 |
8 | #if(session.hasOper(Permissions.goods_goods_spec_create)) 9 | 12 | #end 13 |
14 |
15 | 16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 | 24 |
25 | 26 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/goods/goods/spec/optionList.html: -------------------------------------------------------------------------------- 1 | #for(x : page.list) 2 | 3 | #end 4 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/goods/goods/unit/_form.html: -------------------------------------------------------------------------------- 1 | #(token) 2 | 3 |
4 |
5 |
6 |
7 | 商品单位名称* 8 | 9 |
10 |
11 |
12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/goods/goods/unit/edit.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 46 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/goods/goods/unit/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 6 |
7 |
8 | #if(session.hasOper(Permissions.goods_goods_unit_create)) 9 | 12 | #end 13 |
14 |
15 | 16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 | 24 |
25 | 26 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/goods/goods/unit/optionList.html: -------------------------------------------------------------------------------- 1 | #for(x : page.list) 2 | 3 | #end 4 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/purchase/order/audit.html: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | 43 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/purchase/order/draftIndex.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 草稿箱 4 |
5 | 6 |
7 |
8 | #include("draftList.html") 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/purchase/order/draftList.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | #for(x : page.list) 15 | 16 | 17 | 18 | 19 | 20 | 25 | 26 | #end 27 | 28 |
单据编号进货日期供应商备注操作
#(x.order_code)#date(x.order_time, "yyyy-MM-dd HH:mm:ss")#(x.supplierInfo.name??)#(x.remark) 21 | 22 |    23 | 24 |
29 |
30 |
-------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/purchase/order/editDraft.html: -------------------------------------------------------------------------------- 1 | #include("add.html") -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/purchase/order/showOrderLog.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | #for(x : purchaseOrder.orderLogList) 13 | 14 | 15 | 16 | 17 | 18 | #end 19 | 20 |
操作人操作日期操作描述
#(x.oper_admin_name??)#date(x.oper_time, "yyyy-MM-dd HH:mm:ss")#(x.oper_desc)
21 |
22 |
-------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/purchase/order/showPayLog.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | #for(x : purchaseOrder.orderFundList) 16 | 17 | #if(x.pay_type == FundTypeEnum.cash.value) 18 | 19 | 20 | #elseif(x.pay_type == FundTypeEnum.balance.value) 21 | 22 | 23 | #elseif(x.pay_type == FundTypeEnum.checking.value) 24 | 25 | 26 | #end 27 | 28 | 29 | 30 | 31 | 32 | #end 33 | 34 |
付款类型付款账户付款金额付款时间创建时间备注
本单现付#(x.balanceAccount.name??)余额扣款供应商账户核销清账付款单#number(x.amount, "#.##")#date(x.pay_time, "yyyy-MM-dd HH:mm:ss")#date(x.created_at, "yyyy-MM-dd HH:mm:ss")
35 |
36 |
-------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/purchase/rejectOrder/audit.html: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | 43 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/purchase/rejectOrder/draftIndex.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 草稿箱 4 |
5 | 6 |
7 |
8 | #include("draftList.html") 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/purchase/rejectOrder/draftList.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | #for(x : page.list) 15 | 16 | 17 | 18 | 19 | 20 | 25 | 26 | #end 27 | 28 |
单据编号退货日期供应商备注操作
#(x.order_code)#date(x.order_time, "yyyy-MM-dd HH:mm:ss")#(x.supplierInfo.name??)#(x.remark) 21 | 22 |    23 | 24 |
29 |
30 |
-------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/purchase/rejectOrder/editDraft.html: -------------------------------------------------------------------------------- 1 | #include("add.html") -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/purchase/rejectOrder/showOrderLog.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | #for(x : purchaseRejectOrder.orderLogList) 13 | 14 | 15 | 16 | 17 | 18 | #end 19 | 20 |
操作人操作日期操作描述
#(x.oper_admin_name??)#date(x.oper_time, "yyyy-MM-dd HH:mm:ss")#(x.oper_desc)
21 |
22 |
-------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/purchase/rejectOrder/showPayLog.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | #for(x : purchaseRejectOrder.orderFundList) 16 | 17 | #if(x.pay_type == FundTypeEnum.cash.value) 18 | 19 | 20 | #elseif(x.pay_type == FundTypeEnum.balance.value) 21 | 22 | 23 | #elseif(x.pay_type == FundTypeEnum.checking.value) 24 | 25 | 26 | #end 27 | 28 | 29 | 30 | 31 | 32 | #end 33 | 34 |
退款类型退款账户退货金额退款时间创建时间备注
本单现收#(x.balanceAccount.name??)存入余额供应商账户核销清账收款单#number(x.amount, "#.##")#date(x.pay_time, "yyyy-MM-dd HH:mm:ss")#date(x.created_at, "yyyy-MM-dd HH:mm:ss")
35 |
36 |
-------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/stat/purchase/showGoodsList.html: -------------------------------------------------------------------------------- 1 | #if(page.totalPage > 1) 2 |
3 |
4 |
5 |
6 |
7 |
8 |
#@paginate(page.pageNumber, page.totalPage, "")
9 |
10 |
11 |
12 |
13 | #end 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | #for (x : page.list) 27 | #set(goodsInfo = x.goodsInfo) 28 | 29 | 30 | 31 | 32 | 39 | 46 | 47 | #end 48 | 49 | 50 |
商品名称商品进货额进货数量退货数量退货金额
#(goodsInfo.name)#number(x.amount, "#.##")#number(x.buy_number, "#.####") 33 | #if(x.reject_number??0 > 0) 34 | #number(x.reject_number, "#.####") 35 | #else 36 | 0 37 | #end 38 | 40 | #if(x.reject_amount??0 > 0) 41 | #number(x.reject_amount??0, "#.##") 42 | #else 43 | 0 44 | #end 45 |
-------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/stat/purchase/showList.html: -------------------------------------------------------------------------------- 1 | #if(page.totalPage > 1) 2 |
3 |
4 |
5 |
6 |
7 |
8 |
#@paginate(page.pageNumber, page.totalPage, "")
9 |
10 |
11 |
12 |
13 | #end 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | #for (x : page.list) 28 | 29 | 30 | 31 | 32 | 33 | 41 | 48 | 49 | #end 50 | 51 | 52 |
进货日期单据编号进货员应付金额剩余未付退货金额
#date(x.order_time, "yyyy-MM-dd")#(x.order_code)#(x.handler.real_name)#number(x.amount, "#.##") 34 | #set(remainAmount = x.amount-x.paid_amount) 35 | #if(remainAmount > 0) 36 | #number(x.amount-x.paid_amount, "#.##") 37 | #else 38 | 0 39 | #end 40 | 42 | #if(x.reject_amount > 0) 43 | #number(x.reject_amount??0, "#.##") 44 | #else 45 | 0 46 | #end 47 |
-------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/stock/checking/audit.html: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | 43 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/stock/checking/draftIndex.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 草稿箱 4 |
5 | 6 |
7 |
8 | #include("draftList.html") 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/stock/checking/draftList.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | #for(x : page.list) 14 | 15 | 16 | 17 | 18 | 23 | 24 | #end 25 | 26 |
单据编号盘点日期备注操作
#(x.order_code)#date(x.order_time, "yyyy-MM-dd HH:mm:ss")#(x.remark) 19 | 20 |    21 | 22 |
27 |
28 |
-------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/stock/checking/editDraft.html: -------------------------------------------------------------------------------- 1 | #include("add.html") -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/supplier/category/_form.html: -------------------------------------------------------------------------------- 1 | #(token) 2 | 3 |
4 |
5 |
6 |
7 | 供应商分类名称* 8 | 10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | 备注 19 | 20 |
21 |
22 |
23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/supplier/category/edit.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 42 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/supplier/category/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 6 |
7 |
8 | #if(session.hasOper(Permissions.inventory_supplier_category_create)) 9 | 12 | #end 13 |
14 |
15 |
16 |
17 |
18 |
19 | 20 |
21 | 22 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/inventory/supplier/category/optionList.html: -------------------------------------------------------------------------------- 1 | #for(x : page.list) 2 | 3 | #end 4 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/msg/notice/list.html: -------------------------------------------------------------------------------- 1 | #if(page.totalRow <=0) 2 |
暂无消息通知!
3 | #else 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | #for (x : page.getList()) 16 | #set(msgNotice = x.msgNotice) 17 | 18 | 27 | 28 | 33 | 34 | 35 | #end 36 | 37 |
级别类型标题时间
19 | #if(msgNotice.msg_level == MsgLevelEnum.important.value) 20 | 重要 21 | #elseif(msgNotice.msg_level == MsgLevelEnum.urgent.value) 22 | 紧急 23 | #else 24 | 普通 25 | #end 26 | #(msgNotice.msgTypeName) 29 | 30 | #(msgNotice.title??) 31 | 32 | #date(x.created_at, "yyyy-MM-dd HH:mm:ss")
38 |
39 |
40 |
41 | #@paginate(page.pageNumber, page.totalPage, "") 42 |
43 |
44 |
45 | 46 | #end 47 | 48 | 49 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/sale/customer/category/_form.html: -------------------------------------------------------------------------------- 1 | #(token) 2 | 3 |
4 |
5 |
6 |
7 | 客户分类名称* 8 | 9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | 备注 18 | 19 |
20 |
21 |
22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/sale/customer/category/edit.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 42 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/sale/customer/category/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 6 |
7 |
8 | #if(session.hasOper(Permissions.sale_customer_category_create)) 9 | 12 | #end 13 |
14 |
15 |
16 |
17 |
18 |
19 | 20 |
21 | 22 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/sale/customer/category/optionList.html: -------------------------------------------------------------------------------- 1 | #for(x : page.list) 2 | 3 | #end 4 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/sale/customer/info/add.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 53 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/sale/customer/info/edit.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 52 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/sale/customer/priceLevel/_form.html: -------------------------------------------------------------------------------- 1 | #(token) 2 | 3 |
4 |
5 |
6 |
7 | 价格等级名称* 8 | 9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | 备注 18 | 19 |
20 |
21 |
22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/sale/customer/priceLevel/add.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 46 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/sale/customer/priceLevel/edit.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 42 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/sale/customer/priceLevel/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 6 |
7 |
8 | #if(session.hasOper(Permissions.sale_customer_priceLevel_create)) 9 | 12 | #end 13 |
14 |
15 |
16 |
17 |
18 |
19 | 20 |
21 | 22 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /psi-web/src/main/webapp/WEB-INF/views/setting/tenant/info/index.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 21 | 22 | -------------------------------------------------------------------------------- /readme-pic/contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guandianyun/psi/0f6913f39c4f4098f571653ed5b5851636430fae/readme-pic/contact.png -------------------------------------------------------------------------------- /readme-pic/demo-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guandianyun/psi/0f6913f39c4f4098f571653ed5b5851636430fae/readme-pic/demo-home.png -------------------------------------------------------------------------------- /readme-pic/demo-print.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guandianyun/psi/0f6913f39c4f4098f571653ed5b5851636430fae/readme-pic/demo-print.png -------------------------------------------------------------------------------- /readme-pic/demo-salecadd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guandianyun/psi/0f6913f39c4f4098f571653ed5b5851636430fae/readme-pic/demo-salecadd.png -------------------------------------------------------------------------------- /readme-pic/demo-saleorder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guandianyun/psi/0f6913f39c4f4098f571653ed5b5851636430fae/readme-pic/demo-saleorder.png -------------------------------------------------------------------------------- /readme-pic/demo-setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guandianyun/psi/0f6913f39c4f4098f571653ed5b5851636430fae/readme-pic/demo-setting.png -------------------------------------------------------------------------------- /readme-pic/demo-shouyin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guandianyun/psi/0f6913f39c4f4098f571653ed5b5851636430fae/readme-pic/demo-shouyin.png -------------------------------------------------------------------------------- /readme-pic/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guandianyun/psi/0f6913f39c4f4098f571653ed5b5851636430fae/readme-pic/logo.png -------------------------------------------------------------------------------- /readme-pic/paychannel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guandianyun/psi/0f6913f39c4f4098f571653ed5b5851636430fae/readme-pic/paychannel.png -------------------------------------------------------------------------------- /readme-pic/weixin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guandianyun/psi/0f6913f39c4f4098f571653ed5b5851636430fae/readme-pic/weixin.jpg -------------------------------------------------------------------------------- /readme-pic/weixinpay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guandianyun/psi/0f6913f39c4f4098f571653ed5b5851636430fae/readme-pic/weixinpay.jpg --------------------------------------------------------------------------------