From 22efab39b0328a9bf586d1aa9f69c44372fc5f44 Mon Sep 17 00:00:00 2001 From: lizhengwei <171332584@qq.com> Date: Fri, 13 Feb 2026 11:17:42 +0800 Subject: [PATCH] =?UTF-8?q?h5=20=E5=8A=A8=E6=80=81=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-modules/pom.xml | 5 +- ruoyi-modules/ruoyi-form/.gitignore | 42 + ruoyi-modules/ruoyi-form/README.md | 47 + .../ruoyi-form/booksflow-form-api/pom.xml | 33 + .../form/api/constant/BaseConstant.java | 18 + .../form/api/constant/FormFieldDictType.java | 50 + .../api/constant/FormTemplateFieldType.java | 47 + .../booksflow/form/api/dto/DictCodesDTO.java | 15 + .../booksflow/form/api/dto/FormDictDTO.java | 33 + .../form/api/dto/FormFieldDictDTO.java | 177 ++ .../form/api/dto/FormFieldDictQ.java | 25 + .../form/api/dto/FormPrintConfigDTO.java | 126 ++ .../form/api/dto/FormPrintConfigModeDTO.java | 32 + .../api/dto/FormPrintConfigUploadDTO.java | 40 + .../booksflow/form/api/dto/FormPrintDTO.java | 32 + .../form/api/dto/FormTemplateDTO.java | 168 ++ .../form/api/dto/ModifyLogRecordDTO.java | 107 + .../booksflow/form/api/vo/FormDictVO.java | 50 + .../form/api/vo/FormFieldDictDifyVo.java | 19 + .../form/api/vo/FormFieldDictVO.java | 44 + .../form/api/vo/FormPrintConfigVO.java | 64 + .../booksflow/form/api/vo/FormTemplateVO.java | 163 ++ .../ruoyi-form/booksflow-form-feign/pom.xml | 31 + .../form/feign/FormFieldDictFeignClient.java | 87 + .../feign/FormPrintConfigFeignClient.java | 26 + .../form/feign/FormTemplateFeignClient.java | 45 + .../feign/ModifyLogRecordFeignClient.java | 30 + .../form/feign/SystemDictFeignClient.java | 28 + .../ruoyi-form/booksflow-form-mapper/pom.xml | 20 + .../booksflow/form/mybatis/entity/Form.java | 63 + .../form/mybatis/entity/FormDict.java | 130 ++ .../form/mybatis/entity/FormDictExample.java | 872 ++++++++ .../form/mybatis/entity/FormExample.java | 501 +++++ .../form/mybatis/entity/FormFieldDict.java | 185 ++ .../mybatis/entity/FormFieldDictExample.java | 1122 ++++++++++ .../form/mybatis/entity/FormPrintConfig.java | 295 +++ .../entity/FormPrintConfigExample.java | 1872 ++++++++++++++++ .../mybatis/entity/FormPrintConfigTpl.java | 141 ++ .../entity/FormPrintConfigTplExample.java | 932 ++++++++ .../entity/FormPrintConfigWithBLOBs.java | 47 + .../form/mybatis/entity/FormTemplate.java | 119 + .../mybatis/entity/FormTemplateExample.java | 792 +++++++ .../mybatis/entity/FormTemplateField.java | 317 +++ .../entity/FormTemplateFieldExample.java | 1912 +++++++++++++++++ .../form/mybatis/entity/ModifyLogRecord.java | 207 ++ .../entity/ModifyLogRecordExample.java | 1362 ++++++++++++ .../form/mybatis/entity/TenantInitStatus.java | 86 + .../entity/TenantInitStatusExample.java | 602 ++++++ .../form/mybatis/mapper/FormDictMapper.java | 121 ++ .../mybatis/mapper/FormDictMapperExt.java | 4 + .../mybatis/mapper/FormFieldDictMapper.java | 145 ++ .../mapper/FormFieldDictMapperExt.java | 21 + .../form/mybatis/mapper/FormMapper.java | 121 ++ .../form/mybatis/mapper/FormMapperExt.java | 4 + .../mybatis/mapper/FormPrintConfigMapper.java | 146 ++ .../mapper/FormPrintConfigMapperExt.java | 4 + .../mapper/FormPrintConfigTplMapper.java | 121 ++ .../mapper/FormPrintConfigTplMapperExt.java | 4 + .../mapper/FormTemplateFieldMapper.java | 145 ++ .../mapper/FormTemplateFieldMapperExt.java | 4 + .../mybatis/mapper/FormTemplateMapper.java | 121 ++ .../mybatis/mapper/FormTemplateMapperExt.java | 4 + .../mybatis/mapper/ModifyLogRecordMapper.java | 121 ++ .../mapper/ModifyLogRecordMapperExt.java | 4 + .../mapper/TenantInitStatusMapper.java | 121 ++ .../mapper/TenantInitStatusMapperExt.java | 4 + .../main/resources/mapper/FormDictMapper.xml | 385 ++++ .../resources/mapper/FormDictMapperExt.xml | 3 + .../resources/mapper/FormFieldDictMapper.xml | 547 +++++ .../mapper/FormFieldDictMapperExt.xml | 84 + .../src/main/resources/mapper/FormMapper.xml | 287 +++ .../main/resources/mapper/FormMapperExt.xml | 3 + .../mapper/FormPrintConfigMapper.xml | 767 +++++++ .../mapper/FormPrintConfigMapperExt.xml | 3 + .../mapper/FormPrintConfigTplMapper.xml | 403 ++++ .../mapper/FormPrintConfigTplMapperExt.xml | 3 + .../mapper/FormTemplateFieldMapper.xml | 769 +++++++ .../mapper/FormTemplateFieldMapperExt.xml | 3 + .../resources/mapper/FormTemplateMapper.xml | 370 ++++ .../mapper/FormTemplateMapperExt.xml | 3 + .../mapper/ModifyLogRecordMapper.xml | 504 +++++ .../mapper/ModifyLogRecordMapperExt.xml | 3 + .../mapper/TenantInitStatusMapper.xml | 321 +++ .../mapper/TenantInitStatusMapperExt.xml | 3 + .../main/resources/mybatis/mybatis-config.xml | 46 + .../src/test/resources/generatorConfig.xml | 110 + .../src/test/resources/logback.xml | 23 + .../ruoyi-form/booksflow-form-service/pom.xml | 51 + .../form/controller/FormController.java | 145 ++ .../form/controller/FormDictController.java | 262 +++ .../controller/FormFieldDictController.java | 149 ++ .../controller/FormPrintConfigController.java | 92 + .../controller/FormTemplateController.java | 78 + .../FormTemplateFieldController.java | 68 + .../controller/ModifyLogRecordController.java | 58 + .../controller/SysFormDictController.java | 90 + .../SysFormFieldDictController.java | 151 ++ .../feign/FormFieldDictFeignController.java | 118 + .../feign/FormPrintConfigFeignController.java | 34 + .../feign/FormTemplateFeignController.java | 58 + .../feign/ModifyLogRecordFeignController.java | 31 + .../feign/SystemDictFeignController.java | 39 + .../form/service/FormDictService.java | 216 ++ .../form/service/FormFieldDictService.java | 628 ++++++ .../form/service/FormPrintConfigService.java | 288 +++ .../booksflow/form/service/FormService.java | 135 ++ .../service/FormTemplateFieldService.java | 217 ++ .../form/service/FormTemplateService.java | 436 ++++ .../form/service/ModifyLogRecordService.java | 86 + .../form/service/TenantInitStatusService.java | 72 + .../service/TenantInitializationService.java | 195 ++ .../booksflow/form/utils/TenantHelper.java | 164 ++ .../booksflow/form/utils/UserUtils.java | 16 + .../utils/poi/ExcelTemplateProcessor.java | 310 +++ .../form/utils/poi/ProcessorUtils.java | 177 ++ .../form/utils/poi/WordTemplateProcessor.java | 572 +++++ .../ruoyi-form/booksflow-form-starter/pom.xml | 44 + .../pcloud/booksflow/form/AppApplication.java | 17 + .../com/pcloud/booksflow/form/AppContext.java | 29 + .../config/BooksflowFormDataSourceConfig.java | 173 ++ .../config/BooksflowFormExceptionHandler.java | 55 + .../form/config/NacosPropertyLoadConfig.java | 19 + .../booksflow/form/config/SwaggerConfig.java | 37 + .../main/resources/config/application-dev.yml | 20 + .../resources/config/application-perf.yml | 1 + .../resources/config/application-prod.yml | 1 + .../resources/config/application-test.yml | 1 + .../resources/config/application-tsrpd.yml | 1 + .../main/resources/config/application-uat.yml | 1 + .../src/main/resources/config/application.yml | 76 + .../src/main/resources/logback.xml | 139 ++ .../test/resources/config/application-dev.yml | 20 + ruoyi-modules/ruoyi-form/docs/20160130.sql | 66 + .../ruoyi-form/docs/http/FormController.http | 41 + .../docs/http/FormDictController.http | 35 + .../docs/http/FormFieldDictController.http | 73 + .../docs/http/FormPrintConfigController.http | 65 + .../docs/http/FormTemplateController.http | 137 ++ .../http/FormTemplateFieldController.http | 32 + .../docs/http/ModifyLogRecordController.http | 25 + .../docs/http/SystemDictController.http | 12 + .../ruoyi-form/docs/http/http-client.env.json | 12 + ruoyi-modules/ruoyi-form/docs/init_table.sql | 72 + ruoyi-modules/ruoyi-form/pom.xml | 26 + 144 files changed, 25180 insertions(+), 2 deletions(-) create mode 100644 ruoyi-modules/ruoyi-form/.gitignore create mode 100644 ruoyi-modules/ruoyi-form/README.md create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/pom.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/constant/BaseConstant.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/constant/FormFieldDictType.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/constant/FormTemplateFieldType.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/DictCodesDTO.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormDictDTO.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormFieldDictDTO.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormFieldDictQ.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintConfigDTO.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintConfigModeDTO.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintConfigUploadDTO.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintDTO.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormTemplateDTO.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/ModifyLogRecordDTO.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormDictVO.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormFieldDictDifyVo.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormFieldDictVO.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormPrintConfigVO.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormTemplateVO.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-feign/pom.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/FormFieldDictFeignClient.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/FormPrintConfigFeignClient.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/FormTemplateFeignClient.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/ModifyLogRecordFeignClient.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/SystemDictFeignClient.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/pom.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/Form.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormDict.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormDictExample.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormExample.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormFieldDict.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormFieldDictExample.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfig.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigExample.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigTpl.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigTplExample.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigWithBLOBs.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplate.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplateExample.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplateField.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplateFieldExample.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/ModifyLogRecord.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/ModifyLogRecordExample.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/TenantInitStatus.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/TenantInitStatusExample.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormDictMapper.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormDictMapperExt.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormFieldDictMapper.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormFieldDictMapperExt.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormMapper.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormMapperExt.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigMapper.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigMapperExt.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigTplMapper.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigTplMapperExt.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateFieldMapper.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateFieldMapperExt.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateMapper.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateMapperExt.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/ModifyLogRecordMapper.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/ModifyLogRecordMapperExt.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/TenantInitStatusMapper.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/TenantInitStatusMapperExt.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormDictMapper.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormDictMapperExt.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormFieldDictMapper.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormFieldDictMapperExt.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormMapper.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormMapperExt.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigMapper.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigMapperExt.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigTplMapper.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigTplMapperExt.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateFieldMapper.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateFieldMapperExt.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateMapper.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateMapperExt.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/ModifyLogRecordMapper.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/ModifyLogRecordMapperExt.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/TenantInitStatusMapper.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/TenantInitStatusMapperExt.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mybatis/mybatis-config.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/test/resources/generatorConfig.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/test/resources/logback.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/pom.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormController.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormDictController.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormFieldDictController.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormPrintConfigController.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormTemplateController.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormTemplateFieldController.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/ModifyLogRecordController.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/SysFormDictController.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/SysFormFieldDictController.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/FormFieldDictFeignController.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/FormPrintConfigFeignController.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/FormTemplateFeignController.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/ModifyLogRecordFeignController.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/SystemDictFeignController.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormDictService.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormFieldDictService.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormPrintConfigService.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormService.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormTemplateFieldService.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormTemplateService.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/ModifyLogRecordService.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/TenantInitStatusService.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/TenantInitializationService.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/TenantHelper.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/UserUtils.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/poi/ExcelTemplateProcessor.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/poi/ProcessorUtils.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/poi/WordTemplateProcessor.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/pom.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/AppApplication.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/AppContext.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/BooksflowFormDataSourceConfig.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/BooksflowFormExceptionHandler.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/NacosPropertyLoadConfig.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/SwaggerConfig.java create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-dev.yml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-perf.yml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-prod.yml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-test.yml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-tsrpd.yml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-uat.yml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application.yml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/logback.xml create mode 100644 ruoyi-modules/ruoyi-form/booksflow-form-starter/src/test/resources/config/application-dev.yml create mode 100644 ruoyi-modules/ruoyi-form/docs/20160130.sql create mode 100644 ruoyi-modules/ruoyi-form/docs/http/FormController.http create mode 100644 ruoyi-modules/ruoyi-form/docs/http/FormDictController.http create mode 100644 ruoyi-modules/ruoyi-form/docs/http/FormFieldDictController.http create mode 100644 ruoyi-modules/ruoyi-form/docs/http/FormPrintConfigController.http create mode 100644 ruoyi-modules/ruoyi-form/docs/http/FormTemplateController.http create mode 100644 ruoyi-modules/ruoyi-form/docs/http/FormTemplateFieldController.http create mode 100644 ruoyi-modules/ruoyi-form/docs/http/ModifyLogRecordController.http create mode 100644 ruoyi-modules/ruoyi-form/docs/http/SystemDictController.http create mode 100644 ruoyi-modules/ruoyi-form/docs/http/http-client.env.json create mode 100644 ruoyi-modules/ruoyi-form/docs/init_table.sql create mode 100644 ruoyi-modules/ruoyi-form/pom.xml diff --git a/ruoyi-modules/pom.xml b/ruoyi-modules/pom.xml index e899c446f..7d0bd5b98 100644 --- a/ruoyi-modules/pom.xml +++ b/ruoyi-modules/pom.xml @@ -12,10 +12,11 @@ ruoyi-generator - + ruoyi-job ruoyi-system ruoyi-system-saas - + ruoyi-workflow + ruoyi-form ruoyi-modules diff --git a/ruoyi-modules/ruoyi-form/.gitignore b/ruoyi-modules/ruoyi-form/.gitignore new file mode 100644 index 000000000..c8a3c4218 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/.gitignore @@ -0,0 +1,42 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +.flattened-pom.xml + +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +.vscode/ + +.DS_Store + +**/logs/ +.idea/ +**/*.iml + +nacos/ +logs/ +temp/ diff --git a/ruoyi-modules/ruoyi-form/README.md b/ruoyi-modules/ruoyi-form/README.md new file mode 100644 index 000000000..175b9c288 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/README.md @@ -0,0 +1,47 @@ +# 动态表单 + +核心点:表单支持版本管理、表单修改后历史表单内容同步修改吗、表单的页面样式有什么要求、打印的按钮在哪 + +## 问题点 + +表单支持版本管理?表单修改后,会新增一条记录、并且版本号会+1,避免覆盖历史表单模板; +表单的要求?:数字、字符串、时间、多选、单选、宽度、自定义必填提示词、字段备注 等等表单相关的 +打印的按钮在哪?有公共的报表打印平台吗?是在前端打印,还是后端打印,后端的话不支持复杂的样式渲染。 +模板是否有暂存和发布状态?:如果每次更改 +表单中的保存后的数据不存在表单系统里面存在业务数据中? + +## 开发接口 +[FormController.http](docs/http/FormController.http)
+[FormFieldDictController.http](docs/http/FormFieldDictController.http)
+[FormTemplateController.http](docs/http/FormTemplateController.http)
+[FormTemplateFieldController.http](docs/http/FormTemplateFieldController.http)
+ +## 表结构 +[init_table.sql](docs/init_table.sql) + +# 字段下拉选项 + +## 需求 + +有一个字段选项配置,主要分为3个核心模块,配置的字段是给表单用的,设计出合适的mysql表结构,满足需求。其实和数据字典很像 + +### 往来单位 + +里面包含2个子配置模块: +单位类型设置 包含属性:单位/个人名称 单位/个人编码 排序 显示状态; +往来单位设置 包含属性:单位/个人名称 单位/个人简称 单位/个人编码 单位类型 所在地区 证件类型 证件号码 排序 显示状态; + +### 费用科目 + +里面包含3个子配置模块: +税率设置 包含属性:税率名称 税率编码 税率 排序 显示状态; +费用分类设置 包含属性:费用分类名称 费用分类编码 排序 显示状态; +费用科目设置 包含属性:费用科目 费用科目编码 费用分类 企业税率 个人税率 排序 显示状态; + +### 仓库管理 + +里面包含1个配置模块: +包含属性:仓库名称、仓库名称编码、仓库地址、排序、显示状态 + +## 开发 +[init_table.sql](docs/init_table.sql) diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/pom.xml b/ruoyi-modules/ruoyi-form/booksflow-form-api/pom.xml new file mode 100644 index 000000000..3d0c503fb --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/pom.xml @@ -0,0 +1,33 @@ + + + 4.0.0 + + org.dromara + ruoyi-form + ${revision} + + + booksflow-form-api + + + + org.projectlombok + lombok + + + jakarta.validation + jakarta.validation-api + + + io.swagger + swagger-annotations + 1.5.13 + + + com.fasterxml.jackson.core + jackson-annotations + + + + diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/constant/BaseConstant.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/constant/BaseConstant.java new file mode 100644 index 000000000..a84265736 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/constant/BaseConstant.java @@ -0,0 +1,18 @@ +package com.pcloud.booksflow.form.api.constant; + +public interface BaseConstant { + /** + * 微服务上下文路径 + */ + String CONTEXT_PATH = "/booksflow/form/v1.0/"; + + /** + * 微服务名称 + */ + String ServiceName = "booksflow-form-service"; + + /** + * 模板租户ID + */ + String TplTenantId = "-1"; +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/constant/FormFieldDictType.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/constant/FormFieldDictType.java new file mode 100644 index 000000000..6f59df003 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/constant/FormFieldDictType.java @@ -0,0 +1,50 @@ +package com.pcloud.booksflow.form.api.constant; + + +import lombok.AllArgsConstructor; + +import java.util.HashMap; +import java.util.Map; + +@AllArgsConstructor +public enum FormFieldDictType { + + unitContact("单位类型"), + contactUnit("往来单位"), + expense("税率"), + expenseCategory("办公费用"), + expenseSubject("费用科目"), + warehouse("仓库管理"); + + private final String desc; + + + /** + * 获取所有枚举返map + * @return map + */ + public static Map getMap() { + FormFieldDictType[] values = FormFieldDictType.values(); + + Map map = new HashMap<>(); + for (int i = 0; i < values.length; i++) { + map.put(values[i].name(), values[i].desc); + } + return map; + } + + /** + * getByName + * @param name name + * @return FormFieldDictType + */ + public static FormFieldDictType getByName(String name) { + for (FormFieldDictType value : FormFieldDictType.values()) { + if (value.name().equals(name)) { + return value; + } + } + return null; + } + +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/constant/FormTemplateFieldType.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/constant/FormTemplateFieldType.java new file mode 100644 index 000000000..b336fef1e --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/constant/FormTemplateFieldType.java @@ -0,0 +1,47 @@ +package com.pcloud.booksflow.form.api.constant; + + +import lombok.AllArgsConstructor; + +import java.util.HashMap; +import java.util.Map; + +@AllArgsConstructor +public enum FormTemplateFieldType { + + group("字段分组"), + table("表格分组"); + private final String desc; + + + /** + * 获取所有枚举返map + * + * @return map + */ + public static Map getMap() { + FormTemplateFieldType[] values = FormTemplateFieldType.values(); + + Map map = new HashMap<>(); + for (int i = 0; i < values.length; i++) { + map.put(values[i].name(), values[i].desc); + } + return map; + } + + /** + * getByName + * + * @param name name + * @return FormFieldDictType + */ + public static FormTemplateFieldType getByName(String name) { + for (FormTemplateFieldType value : FormTemplateFieldType.values()) { + if (value.name().equals(name)) { + return value; + } + } + return null; + } + +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/DictCodesDTO.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/DictCodesDTO.java new file mode 100644 index 000000000..80820656d --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/DictCodesDTO.java @@ -0,0 +1,15 @@ +package com.pcloud.booksflow.form.api.dto; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; + +import java.util.Set; + +@Getter +@Setter +@AllArgsConstructor +public class DictCodesDTO { + private String configType; + private Set codes; +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormDictDTO.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormDictDTO.java new file mode 100644 index 000000000..e15c2e3c3 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormDictDTO.java @@ -0,0 +1,33 @@ +package com.pcloud.booksflow.form.api.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 表单字典DTO + */ +@Data +@ApiModel(description = "表单字典DTO") +public class FormDictDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "主键ID") + private Long id; + + @NotBlank(message = "名称不能为空") + @ApiModelProperty(value = "名称", required = true) + private String name; + + @NotBlank(message = "编码不能为空") + @ApiModelProperty(value = "编码", required = true) + private String code; + + @ApiModelProperty(value = "备注", required = false) + private String remarks; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormFieldDictDTO.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormFieldDictDTO.java new file mode 100644 index 000000000..f0b8c4fb7 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormFieldDictDTO.java @@ -0,0 +1,177 @@ +package com.pcloud.booksflow.form.api.dto; + + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.time.LocalDateTime; + +/** + * 字段配置DTO + */ +@Data +@ApiModel(description = "字段配置DTO", discriminator = "configType") +public class FormFieldDictDTO { + + @ApiModelProperty(value = "主键ID") + private Long id; + + @NotBlank(message = "配置类型不能为空") + @ApiModelProperty(value = "配置类型", required = true, example = "contactUnit") + private String configType; + + @NotBlank(message = "配置名称不能为空") + @ApiModelProperty(value = "配置名称", required = true) + private String name; + + @NotBlank(message = "编码不能为空") + @ApiModelProperty(value = "编码", required = true) + private String code; + + @ApiModelProperty(value = "父级ID") + private Long parentId; + + @ApiModelProperty(value = "其他字段(JSON格式)") + @JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXTERNAL_PROPERTY, + property = "configType", + defaultImpl = FormFieldDictDTO.OtherFields.class + )//类型:单位类型、往来单位、税率 、费用分类、费用科目、仓库管理 + @JsonSubTypes({ + @JsonSubTypes.Type(value = FormFieldDictDTO.OtherFields.class, name = "unitContact"), + @JsonSubTypes.Type(value = FormFieldDictDTO.ContactUnitDTO.class, name = "contactUnit"), + @JsonSubTypes.Type(value = FormFieldDictDTO.TaxRateDTO.class, name = "expense"), + @JsonSubTypes.Type(value = FormFieldDictDTO.OtherFields.class, name = "expenseCategory"), + @JsonSubTypes.Type(value = FormFieldDictDTO.ExpenseSubjectDTO.class, name = "expenseSubject"), + @JsonSubTypes.Type(value = FormFieldDictDTO.WarehouseDTO.class, name = "warehouse"), + }) + private OtherFields otherFields; + + @ApiModelProperty(value = "排序", required = true) + private Integer sortOrder; + + @NotNull(message = "状态不能为空") + @ApiModelProperty(value = "状态(1:启用,0:禁用)", required = true) + private Integer status; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createdTime; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updatedTime; + + + /** + * 扩展其他属性 + */ + @Data + public static class OtherFields { + } + + /** + * 往来单位设置DTO + */ + @Data + @ApiModel(description = "往来单位设置DTO") + public static class ContactUnitDTO extends OtherFields { + + @ApiModelProperty(value = "单位/个人简称") + @NotBlank(message = "单位/个人简称不能为空") + private String shortName; + + @ApiModelProperty(value = "所在地区") + private String region; + @ApiModelProperty(value = "所在地区adcode") + private String adcode; + + @ApiModelProperty(value = "证件类型:社会信用代码-socialCreditCode、身份证-idCard、营业执照-businessLicense、组织机构代码-organizationCode") + private String idTypeId; + @ApiModelProperty(value = "证件类型title") + private String idTypeTitle; + + @ApiModelProperty(value = "证件号码") + private String idNumber; + + @ApiModelProperty(value = "地址") + private String address; + + @ApiModelProperty(value = "联系人") + private String contact; + + @ApiModelProperty(value = "联系电话") + private String phoneNumber; + + @ApiModelProperty(value = "开户行名称") + private String bankName; + + @ApiModelProperty(value = "开户行账号") + private String bankAccountNumber; + + @ApiModelProperty(value = "开户行名称") + private String bankBranchName; + +// @ApiModelProperty(value = "社会信用代码") +// private String socialCreditCode; + + } + + + /** + * 税率设置DTO + */ + @Data + @ApiModel(description = "税率设置DTO") + public static class TaxRateDTO extends OtherFields { + + @ApiModelProperty(value = "税率") + private Double rate; + + } + + /** + * 费用科目设置DTO + */ + @Data + @ApiModel(description = "费用科目设置DTO") + public static class ExpenseSubjectDTO extends OtherFields { + + @ApiModelProperty(value = "费用分类") + private Long categoryId; + @ApiModelProperty(value = "费用分类Code") + private String categoryCode; + @ApiModelProperty(value = "费用分类title") + private String categoryTitle; + + @ApiModelProperty(value = "个人税率") + private Long personalTaxRateId; + @ApiModelProperty(value = "个人税率Code") + private String personalTaxRateCode; + @ApiModelProperty(value = "个人税率title") + private String personalTaxRateTitle; + + @ApiModelProperty(value = "企业税率") + private Long corporateTaxRateId; + @ApiModelProperty(value = "企业税率Code") + private String corporateTaxRateCode; + @ApiModelProperty(value = "企业税率title") + private String corporateTaxRateTitle; + + } + + /** + * 仓库管理DTO + */ + @Data + @ApiModel(description = "仓库管理DTO") + public static class WarehouseDTO extends OtherFields { + @ApiModelProperty(value = "仓库地址") + private String address; + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormFieldDictQ.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormFieldDictQ.java new file mode 100644 index 000000000..0071e571f --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormFieldDictQ.java @@ -0,0 +1,25 @@ +package com.pcloud.booksflow.form.api.dto; + + +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +import java.util.Set; + +@Getter +@Setter +public class FormFieldDictQ { + @ApiModelProperty(value = "是否树形结构") + private Boolean tree = false; + @ApiModelProperty(value = "父类id") + private Long parentId; + @ApiModelProperty(value = "查询所有状态,true查询所有状态,false|null 查询显示状态的字典项") + private Boolean allStatus; + @ApiModelProperty(value = "父类code") + private String parentCode; + @ApiModelProperty(value = "父类codes") + private Set parentCodes; + @ApiModelProperty(value = "层级") + private Integer level; +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintConfigDTO.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintConfigDTO.java new file mode 100644 index 000000000..a0c920785 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintConfigDTO.java @@ -0,0 +1,126 @@ +package com.pcloud.booksflow.form.api.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.Getter; +import lombok.Setter; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * 表单打印配置DTO + * + * @author your-name + */ +@Data +@ApiModel(description = "表单打印配置DTO") +public class FormPrintConfigDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 关联的表单ID + */ + @ApiModelProperty(value = "关联的表单ID") + @NotNull(message = "关联的表单ID不能为空") + private Long formId; + + /** + * 主标题 + */ + @ApiModelProperty(value = "主标题") + @NotBlank(message = "主标题不能为空") + private String mainTitle; + + /** + * 副标题 + */ + @ApiModelProperty(value = "副标题") + private String subTitle; + + /** + * 显示格式:简洁、标准、完整 + */ + @ApiModelProperty(value = "显示格式:简洁、标准、完整") + private String displayFormat; + + /** + * 单据编号前缀(如CG-) + */ + @ApiModelProperty(value = "单据编号前缀(如CG-)") + private String documentNoPrefix; + + /** + * 是否显示单据编号 + */ + @ApiModelProperty(value = "是否显示单据编号") + private Boolean showDocumentNo; + + /** + * 打印日期格式 + */ + @ApiModelProperty(value = "打印日期格式") + private String printDateFormat; + + /** + * 是否显示打印日期 + */ + @ApiModelProperty(value = "是否显示打印日期") + private Boolean showPrintDate; + + /** + * 是否显示页码 + */ + @ApiModelProperty(value = "是否显示页码") + private Boolean showPageNumber; + + /** + * 列宽模式:固定宽度或自适应 + */ + @ApiModelProperty(value = "列宽模式:固定宽度或自适应") + private String columnWidthMode; + + /** + * 表格样式:有边框或无边框 + */ + @ApiModelProperty(value = "表格样式:有边框或无边框") + private String tableStyle; + + /** + * 数据行高 + */ + @ApiModelProperty(value = "数据行高") + private String rowHeight; + + @ApiModelProperty(value = "打印配置模式(1、默认模式;2、模板打印模式)") + private Integer mode; + + /** + * 打印字段 + */ + @ApiModelProperty(value = "打印字段") + private List printFields; + + /** + * 扩展属性(JSON格式) + */ + @ApiModelProperty(value = "扩展属性(JSON格式)") + private String ext; + + @Getter + @Setter + public static class PrintField { + private String code; + private String showTitle; + private Integer order; + private Boolean line; + private Boolean print; + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintConfigModeDTO.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintConfigModeDTO.java new file mode 100644 index 000000000..497e88021 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintConfigModeDTO.java @@ -0,0 +1,32 @@ +package com.pcloud.booksflow.form.api.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * 表单打印配置DTO + * + * @author your-name + */ +@Data +@ApiModel(description = "表单打印配置DTO") +public class FormPrintConfigModeDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @ApiModelProperty(value = "formId") + @NotNull + private Long formId; + + @ApiModelProperty(value = "打印配置模式(1、默认模式;2、模板打印模式)") + @NotNull + private Integer mode; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintConfigUploadDTO.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintConfigUploadDTO.java new file mode 100644 index 000000000..133890af6 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintConfigUploadDTO.java @@ -0,0 +1,40 @@ +package com.pcloud.booksflow.form.api.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * 表单打印配置DTO + * + * @author your-name + */ +@Data +@ApiModel(description = "表单打印模板上传") +public class FormPrintConfigUploadDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "表单打印配置ID") + @NotNull(message = "formId不能为空") + private Long formId; + + @ApiModelProperty(value = "fileName") + @NotNull(message = "fileName不能为空") + private String fileName; + + @ApiModelProperty(value = "fileUrl") + @NotNull(message = "fileUrl不能为空") + private String fileUrl; + + @ApiModelProperty(value = "fileSize") + @NotNull(message = "fileSize不能为空") + private Integer fileSize; + + @ApiModelProperty(value = "fileType") + @NotNull(message = "fileType不能为空") + private String fileType; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintDTO.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintDTO.java new file mode 100644 index 000000000..ead142724 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormPrintDTO.java @@ -0,0 +1,32 @@ +package com.pcloud.booksflow.form.api.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Map; + +/** + * 表单打印配置DTO + * + * @author your-name + */ +@Data +@ApiModel(description = "表单打印模板上传") +public class FormPrintDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "表单ID") + private Long formId; + + @ApiModelProperty(value = "表单code") + private String formCode; + + @ApiModelProperty(value = "表单ID") + @NotEmpty(message = "数据") + private Map data; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormTemplateDTO.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormTemplateDTO.java new file mode 100644 index 000000000..6a5282902 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/FormTemplateDTO.java @@ -0,0 +1,168 @@ +package com.pcloud.booksflow.form.api.dto; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +import javax.validation.Valid; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; + +/** + * 表单定义DTO + */ +@Getter +@Setter +@Api("表单模板数据传输对象") +public class FormTemplateDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 表单ID + */ + @NotNull + @ApiModelProperty(value = "表单ID", required = true, example = "1001") + private Long formId; + + /** + * 表单项列表 + */ + @NotEmpty(message = "表单项列表不能为空") + @Valid + @ApiModelProperty(value = "表单项列表", required = true) + private List templateFields; + + + /** + * 表单项DTO + */ + @Getter + @Setter + @ApiModel(description = "表单项数据传输对象") + public static class FieldDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 编码 + */ + @ApiModelProperty(value = "字段编码") + @NotNull + private String code; + + /** + * 标题 + */ + @ApiModelProperty(value = "字段标题") + private String title; + + /** + * show标题 + */ + @ApiModelProperty(value = "显示标题") + private String showTitle; + + /** + * 数据库中关联字段 + */ + @ApiModelProperty(value = "数据库关联字段") + private String dbField; + + /** + * 类型:group、table、input、inputNumber、radio、rate、switch、select、date、button、checkbox + */ + @ApiModelProperty(value = "字段控件类型") + @NotNull(message = "字段控件类型不能为空:group、table、input、inputNumber、radio、rate、switch、select、date、button、checkbox") + private String type; + + /** + * 是否必填 + */ + @ApiModelProperty(value = "是否必填", example = "true") + private Boolean required; + + @ApiModelProperty(value = "是否显示", example = "true") + private Boolean show; + + @ApiModelProperty(value = "字典code") + private String dcode; + + @ApiModelProperty(value = "占行数量(0-不占一行,其他-占的行数)") + private Integer line; + + /** + * 固定(0不固定,1固定) + */ + @ApiModelProperty(value = "是否固定字段", example = "false") + @Deprecated + private Boolean fixed; + + @ApiModelProperty(value = "格式约束(int、double、str、boolean、date、select(下拉选择)") + private String fmtConstraint; + + @ApiModelProperty(value = "是否可编辑") + private Boolean edit; + + @ApiModelProperty(value = "排序", example = "999") + private Integer sortOrder; + + @ApiModelProperty(value = "级联显示关") + private String cascadeClose; + + @ApiModelProperty(value = "级联显示开") + private String cascadeOpen; + + @ApiModelProperty(value = "可编辑按钮禁用") + private Boolean editDisabled; + + @ApiModelProperty(value = "可编辑按钮禁用提示") + private String editDisabledMsg; + + @ApiModelProperty(value = "级联显示") + private String showCascade; + + /** + * 扩展、暂时没用 + */ + @ApiModelProperty(value = "扩展") + private ExtDTO ext; + + @ApiModelProperty(value = "子项") + private List children; + + } + + /** + * 验证规则DTO + */ + @Getter + @Setter + @ApiModel(description = "扩展验证规则数据传输对象") + public static class ExtDTO implements Serializable { + + private static final long serialVersionUID = 1L; +// /** +// * 提示信息 +// */ +// @ApiModelProperty(value = "提示信息") +// private String hint; +// +// /** +// * 正则表达式 +// */ +// @ApiModelProperty(value = "正则表达式验证规则") +// private String pattern; + + /** + * true时隐藏分组名称 + */ + @ApiModelProperty(value = "是否隐藏分组名称") + private Boolean disabledShowTitle; + + } +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/ModifyLogRecordDTO.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/ModifyLogRecordDTO.java new file mode 100644 index 000000000..ffa1fb871 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/dto/ModifyLogRecordDTO.java @@ -0,0 +1,107 @@ +package com.pcloud.booksflow.form.api.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; + +/** + * 修改日志记录DTO + * + * @author 李郑伟 + */ +@Data +@ApiModel(description = "修改日志记录DTO") +public class ModifyLogRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 数据库列说明: + * 实体类型,如:FormFieldDict, FormTemplate, FormTemplateField等 + */ + @ApiModelProperty(value = "实体类型") + private String entityType; + + /** + * 数据库列说明: + * 实体ID + */ + @ApiModelProperty(value = "实体ID") + @NotBlank(message = "实体ID不能为空") + private String entityId; + + /** + * formCode + */ + @ApiModelProperty(value = "formCode") + private String formCode; + + /** + * 数据库列说明: + * 描述 + */ + @ApiModelProperty(value = "描述") + private String description; + + /** + * 数据库列说明: + * 字段中文名 + */ + @ApiModelProperty(value = "字段中文名") + private String fieldChineseName; + + /** + * 数据库列说明: + * 字段英文名 + */ + @ApiModelProperty(value = "字段英文名") + private String fieldEnglishName; + + /** + * 数据库列说明: + * 修改前值 + */ + @ApiModelProperty(value = "修改前值") + private String oldValue; + + /** + * 数据库列说明: + * 修改后值 + */ + @ApiModelProperty(value = "修改后值") + private String newValue; + + /** + * 数据库列说明: + * 操作人ID + */ + @ApiModelProperty(value = "操作人ID") + private Long operator; + + /** + * 数据库列说明: + * 操作人ID + */ + @ApiModelProperty(value = "操作人姓名") + private String operatorName; + + /** + * 数据库列说明: + * 操作时间 + */ + @ApiModelProperty(value = "操作时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date operationTime; + + /** + * 数据库列说明: + * 服务名称 + */ + @ApiModelProperty(value = "服务名称") + private String serviceName; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormDictVO.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormDictVO.java new file mode 100644 index 000000000..b883d7b79 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormDictVO.java @@ -0,0 +1,50 @@ +package com.pcloud.booksflow.form.api.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * 用的表单字典VO + */ +@Data +@ApiModel(description = "表单字典VO") +public class FormDictVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "名称") + private String name; + + @ApiModelProperty(value = "编码") + private String code; + + @ApiModelProperty(value = "备注") + private String remarks; + + @ApiModelProperty(value = "创建人") + private Long createdBy; + + @ApiModelProperty(value = "更新人") + private Long updatedBy; + + @ApiModelProperty(value = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + + @ApiModelProperty(value = "更新时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime; + + @ApiModelProperty(value = "是否删除(0:否,1:是)") + private Integer deleted; + + @ApiModelProperty(value = "字典项列表") + private List items; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormFieldDictDifyVo.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormFieldDictDifyVo.java new file mode 100644 index 000000000..77841bbfb --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormFieldDictDifyVo.java @@ -0,0 +1,19 @@ +package com.pcloud.booksflow.form.api.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Getter; +import lombok.Setter; + +import java.util.Date; +import java.util.List; + +@Getter +@Setter +public class FormFieldDictDifyVo { + + private Long id; + + private String name; + + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormFieldDictVO.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormFieldDictVO.java new file mode 100644 index 000000000..97c81dea9 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormFieldDictVO.java @@ -0,0 +1,44 @@ +package com.pcloud.booksflow.form.api.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Getter; +import lombok.Setter; + +import java.util.Date; +import java.util.List; + +@Getter +@Setter +public class FormFieldDictVO { + + private Long id; + + private String configType; + + private String name; + + private String code; + + private Long parentId; + + private Integer sortOrder; + + private Integer status; + + private Long createdBy; + + private Long updatedBy; + + private Integer deleted; + + private String otherFields; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime; + + private List children; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormPrintConfigVO.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormPrintConfigVO.java new file mode 100644 index 000000000..6c279b480 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormPrintConfigVO.java @@ -0,0 +1,64 @@ +package com.pcloud.booksflow.form.api.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class FormPrintConfigVO implements Serializable { + private static final long serialVersionUID = 1L; + + private Long id; + + private Long formId; + + private String mainTitle; + + private String subTitle; + + private String displayFormat; + + private String documentNoPrefix; + + private Boolean showDocumentNo; + + private String printDateFormat; + + private Boolean showPrintDate; + + private Boolean showPageNumber; + + private String columnWidthMode; + + private String tableStyle; + + private String rowHeight; + + @ApiModelProperty(value = "打印配置模式(1、默认模式;2、模板打印模式)") + private Integer mode; + + @ApiModelProperty(value = "fileName") + private String fileName; + @ApiModelProperty(value = "fileUrl") + private String fileUrl; + @ApiModelProperty(value = "fileSize") + private Integer fileSize; + @ApiModelProperty(value = "fileType") + private String fileType; + + @ApiModelProperty(value = "fileUrlAi") + private String fileUrlAi; + + @ApiModelProperty(value = "fileWpsId") + private String fileWpsId; + + private Long createdBy; + + private Long updatedBy; + + private String printFields; + + private String ext; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormTemplateVO.java b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormTemplateVO.java new file mode 100644 index 000000000..81fcf0835 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-api/src/main/java/com/pcloud/booksflow/form/api/vo/FormTemplateVO.java @@ -0,0 +1,163 @@ +package com.pcloud.booksflow.form.api.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +import java.io.Serializable; +import java.util.List; + +@Getter +@Setter +public class FormTemplateVO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * id + */ + private Long id; + /** + * 表单名称 + */ + private Long formId; + + /** + * 表单名称 + */ + private String formName; + + /** + * 表单名称 + */ + private Integer version; + + /** + * 表单项列表 + */ + private List templateFields; + + + /** + * 表单项VO + */ + @Getter + @Setter + public static class FieldVO implements Serializable { + + private static final long serialVersionUID = 1L; + + private Long id; + /** + * 标题 + */ + private Long templateId; + + /** + * 编码 + */ + private String code; + + /** + * 父级ID + */ + private Long parentId; + + /** + * 标题 + */ + private String title; + + /** + * show标题 + */ + private String showTitle; + + /** + * 数据库中关联字段 + */ + private String dbField; + + /** + * 是否必填 + */ + private Boolean required; + + /** + * 是否显示 + */ + private Boolean show; + + @ApiModelProperty(value = "字典code") + private String dcode; + + @ApiModelProperty(value = "占行数量(0-不占一行,1、2、3-占的行数)") + private Integer line; + + /** + * 类型 + */ + private String type; + /** + * 固定(0不固定,1固定) + */ + private Boolean fixed; + + @ApiModelProperty(value = "格式约束") + private String fmtConstraint; + + @ApiModelProperty(value = "是否可编辑") + private Boolean edit; + + private Integer sortOrder; + + @ApiModelProperty(value = "级联显示关") + private String cascadeClose; + + @ApiModelProperty(value = "级联显示开") + private String cascadeOpen; + + @ApiModelProperty(value = "可编辑按钮禁用") + private Boolean editDisabled; + + @ApiModelProperty(value = "可编辑按钮禁用提示") + private String editDisabledMsg; + + @ApiModelProperty(value = "级联显示") + private String showCascade; + + /** + * 验证规则 + */ + private ExtVO ext; + + /** + * 子项 + */ + private List children; + + } + + /** + * 验证规则VO + */ + @Getter + @Setter + public static class ExtVO implements Serializable { + + private static final long serialVersionUID = 1L; +// +// /** +// * 提示信息 +// */ +// private String hint; +// +// /** +// * 正则表达式 +// */ +// private String pattern; + + @ApiModelProperty(value = "是否隐藏分组名称") + private Boolean disabledShowTitle; + } + +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-feign/pom.xml b/ruoyi-modules/ruoyi-form/booksflow-form-feign/pom.xml new file mode 100644 index 000000000..4dd7b2290 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-feign/pom.xml @@ -0,0 +1,31 @@ + + + 4.0.0 + + org.dromara + ruoyi-form + ${revision} + + + booksflow-form-feign + jar + + + + org.dromara + booksflow-form-api + ${revision} + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + + org.projectlombok + lombok + + + diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/FormFieldDictFeignClient.java b/ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/FormFieldDictFeignClient.java new file mode 100644 index 000000000..d72633b02 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/FormFieldDictFeignClient.java @@ -0,0 +1,87 @@ +package com.pcloud.booksflow.form.feign; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.dto.FormFieldDictQ; +import com.pcloud.booksflow.form.api.vo.FormFieldDictDifyVo; +import com.pcloud.booksflow.form.api.vo.FormFieldDictVO; +import io.swagger.annotations.Api; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * 表单字段配置 Feign 客户端 + */ +@Api(tags = "openfeign-字典项-有租户") +@FeignClient(name = BaseConstant.ServiceName, path = BaseConstant.CONTEXT_PATH + "formService/field-dict") +public interface FormFieldDictFeignClient { + + /** + * 根据配置类型获取表单字段配置列表 + * + * @param query 配置类型 + * @return 表单字段配置列表 + */ + @PostMapping("get") + Map> get(@RequestParam Long agentId, + @RequestBody Map query); + + /** + * 批量获取 字典项 + */ + @PostMapping("dict") + Map> dict(@RequestParam Long agentId, + @RequestBody List configTypes); + + /** + * items + */ + @PostMapping("getByIds") + List getByIds(@RequestParam Long agentId, + @RequestBody List ids, + @RequestParam(required = false) Integer deleted); + + /** + * 根据code查询字典项,不过滤状态,禁用和显示的都会查,删除的不查 + * + * @param agentId agentId + * @param configType configType + * @param itemCodes itemCodes + * @return list + */ + @PostMapping("getByCodes") + List getByCodes(@RequestParam Long agentId, + @RequestParam String configType, + @RequestBody List itemCodes); + + /** + * 根据code查询字典项,不过滤状态,禁用和显示的都会查,删除的不查 + * + * @param agentId agentId + * @param q key->configType, value->itemCodes + * @return list + */ + @PostMapping("getByCodesPlus") + Map> getByCodes(@RequestParam Long agentId, @RequestBody Map> q); + + + + /** + * 根据code查询字典项 + * 默认只查询第一级别 + * @param agentId agentId + * @param configType configType + * @return list + */ + @GetMapping("getByCodesByLevel") + List getByCodesByLevel(@RequestParam Long agentId, + @RequestParam String configType, + @RequestParam(required = false) List parentIds); + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/FormPrintConfigFeignClient.java b/ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/FormPrintConfigFeignClient.java new file mode 100644 index 000000000..fbdf78246 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/FormPrintConfigFeignClient.java @@ -0,0 +1,26 @@ +package com.pcloud.booksflow.form.feign; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.vo.FormPrintConfigVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + + +@Api(tags = "openfeign-表单打印配置") +@FeignClient(name = BaseConstant.ServiceName, path = BaseConstant.CONTEXT_PATH + "formService/form-print-config") +public interface FormPrintConfigFeignClient { + + /** + * 批量创建修改日志记录 + * + * @return 创建条数 + */ + @ApiOperation("根据表单ID获取表单打印配置") + @GetMapping("get") + FormPrintConfigVO get(@RequestParam Long agentId, @RequestParam String formCode); + + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/FormTemplateFeignClient.java b/ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/FormTemplateFeignClient.java new file mode 100644 index 000000000..872260abd --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/FormTemplateFeignClient.java @@ -0,0 +1,45 @@ +package com.pcloud.booksflow.form.feign; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.vo.FormTemplateVO; +import io.swagger.annotations.Api; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + + +@Api(tags = "openfeign-表单模板") +@FeignClient(name = BaseConstant.ServiceName, path = BaseConstant.CONTEXT_PATH + "formService/template") +public interface FormTemplateFeignClient { + + /** + * 批量创建修改日志记录 + * + * @return 创建条数 + */ + @GetMapping("get/maxVersion") + FormTemplateVO getMaxVersion(@RequestParam Long agentId, @RequestParam String formCode); + + + @GetMapping("get/maxVersionPlus") + FormTemplateVO getMaxVersion(@RequestParam Long agentId, + @RequestParam String formCode, + @RequestParam(required = false) Boolean show, + @RequestParam(required = false) Boolean tree); + + /** + * templateId 查询所有字段 + * + * @param agentId agentId + * @param id templateId + * @param show 是否显示 + * @param tree 返回树状结构 + * @return FormTemplateVO + */ + @GetMapping("get") + FormTemplateVO getById(@RequestParam Long agentId, + @RequestParam Long id, + @RequestParam(required = false) Boolean show, + @RequestParam(required = false) Boolean tree); + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/ModifyLogRecordFeignClient.java b/ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/ModifyLogRecordFeignClient.java new file mode 100644 index 000000000..521aa922e --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/ModifyLogRecordFeignClient.java @@ -0,0 +1,30 @@ +package com.pcloud.booksflow.form.feign; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.dto.ModifyLogRecordDTO; +import io.swagger.annotations.Api; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; + +/** + * 修改日志记录 Feign 客户端 + */ +@Api(tags = "openfeign-修改日志记录") +@FeignClient(name = BaseConstant.ServiceName, path = BaseConstant.CONTEXT_PATH + "formService/modify-log-record") +public interface ModifyLogRecordFeignClient { + + /** + * 批量创建修改日志记录 + * + * @param dtos 修改日志记录DTO对象列表 + * @return 创建条数 + */ + @PostMapping("/batchCreate") + Integer batchCreate(@RequestParam("agent_id") Long agentId, @RequestBody List dtos); + + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/SystemDictFeignClient.java b/ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/SystemDictFeignClient.java new file mode 100644 index 000000000..6ed24c6ad --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-feign/src/main/java/com/pcloud/booksflow/form/feign/SystemDictFeignClient.java @@ -0,0 +1,28 @@ +package com.pcloud.booksflow.form.feign; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.dto.FormFieldDictQ; +import com.pcloud.booksflow.form.api.vo.FormFieldDictVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; +import java.util.Map; + +@Api(tags = "openfeign-字典项-无租户【所有租户看到的字典都一样】") +@FeignClient(name = BaseConstant.ServiceName, path = BaseConstant.CONTEXT_PATH + "formService/not-agent/field-dict") +public interface SystemDictFeignClient { + + @ApiOperation(value = "批量获取表单字段配置,根据configType") + @PostMapping("get") + Map> get(@RequestBody Map q); + + @ApiOperation(value = "批量获取表单字段配置,根据id") + @PostMapping("getByIds") + List getByIds(@RequestBody List ids, @RequestParam Integer deleted); + +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/pom.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/pom.xml new file mode 100644 index 000000000..7739c4d44 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + org.dromara + ruoyi-form + ${revision} + + + booksflow-form-mapper + + + + org.dromara + booksflow-form-api + ${revision} + + + + diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/Form.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/Form.java new file mode 100644 index 000000000..1931eb88c --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/Form.java @@ -0,0 +1,63 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +/** + * + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form + */ +@Getter +@Setter +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class Form implements Serializable { + /** + * Database Column Remarks: + * 主键ID + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form.id + * + * @mbg.generated + */ + private Long id; + + /** + * Database Column Remarks: + * 表单名称 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form.name + * + * @mbg.generated + */ + private String name; + + /** + * Database Column Remarks: + * code + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form.code + * + * @mbg.generated + */ + private String code; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form + * + * @mbg.generated + */ + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormDict.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormDict.java new file mode 100644 index 000000000..89973a368 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormDict.java @@ -0,0 +1,130 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.io.Serializable; +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +/** + * + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_dict + */ +@Getter +@Setter +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class FormDict implements Serializable { + /** + * Database Column Remarks: + * 主键ID + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_dict.id + * + * @mbg.generated + */ + private Long id; + + /** + * Database Column Remarks: + * 名称 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_dict.name + * + * @mbg.generated + */ + private String name; + + /** + * Database Column Remarks: + * 值 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_dict.code + * + * @mbg.generated + */ + private String code; + + /** + * Database Column Remarks: + * 备注 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_dict.remarks + * + * @mbg.generated + */ + private String remarks; + + /** + * Database Column Remarks: + * 创建人 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_dict.created_by + * + * @mbg.generated + */ + private Long createdBy; + + /** + * Database Column Remarks: + * 更新人 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_dict.updated_by + * + * @mbg.generated + */ + private Long updatedBy; + + /** + * Database Column Remarks: + * 创建时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_dict.create_time + * + * @mbg.generated + */ + private Date createTime; + + /** + * Database Column Remarks: + * 更新时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_dict.update_time + * + * @mbg.generated + */ + private Date updateTime; + + /** + * Database Column Remarks: + * 是否删除(0:否,1:是) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_dict.deleted + * + * @mbg.generated + */ + private Integer deleted; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_dict + * + * @mbg.generated + */ + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormDictExample.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormDictExample.java new file mode 100644 index 000000000..b5dbb8aa4 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormDictExample.java @@ -0,0 +1,872 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class FormDictExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_dict + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_dict + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_dict + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + public FormDictExample() { + oredCriteria = new ArrayList<>(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_dict + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNull() { + addCriterion("created_by is null"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNotNull() { + addCriterion("created_by is not null"); + return (Criteria) this; + } + + public Criteria andCreatedByEqualTo(Long value) { + addCriterion("created_by =", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotEqualTo(Long value) { + addCriterion("created_by <>", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThan(Long value) { + addCriterion("created_by >", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThanOrEqualTo(Long value) { + addCriterion("created_by >=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThan(Long value) { + addCriterion("created_by <", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThanOrEqualTo(Long value) { + addCriterion("created_by <=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByIn(List values) { + addCriterion("created_by in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotIn(List values) { + addCriterion("created_by not in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByBetween(Long value1, Long value2) { + addCriterion("created_by between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotBetween(Long value1, Long value2) { + addCriterion("created_by not between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNull() { + addCriterion("updated_by is null"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNotNull() { + addCriterion("updated_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedByEqualTo(Long value) { + addCriterion("updated_by =", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotEqualTo(Long value) { + addCriterion("updated_by <>", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThan(Long value) { + addCriterion("updated_by >", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThanOrEqualTo(Long value) { + addCriterion("updated_by >=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThan(Long value) { + addCriterion("updated_by <", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThanOrEqualTo(Long value) { + addCriterion("updated_by <=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByIn(List values) { + addCriterion("updated_by in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotIn(List values) { + addCriterion("updated_by not in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByBetween(Long value1, Long value2) { + addCriterion("updated_by between", value1, value2, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotBetween(Long value1, Long value2) { + addCriterion("updated_by not between", value1, value2, "updatedBy"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andDeletedIsNull() { + addCriterion("deleted is null"); + return (Criteria) this; + } + + public Criteria andDeletedIsNotNull() { + addCriterion("deleted is not null"); + return (Criteria) this; + } + + public Criteria andDeletedEqualTo(Integer value) { + addCriterion("deleted =", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotEqualTo(Integer value) { + addCriterion("deleted <>", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedGreaterThan(Integer value) { + addCriterion("deleted >", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedGreaterThanOrEqualTo(Integer value) { + addCriterion("deleted >=", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedLessThan(Integer value) { + addCriterion("deleted <", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedLessThanOrEqualTo(Integer value) { + addCriterion("deleted <=", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedIn(List values) { + addCriterion("deleted in", values, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotIn(List values) { + addCriterion("deleted not in", values, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedBetween(Integer value1, Integer value2) { + addCriterion("deleted between", value1, value2, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotBetween(Integer value1, Integer value2) { + addCriterion("deleted not between", value1, value2, "deleted"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_dict + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_dict + * + * @mbg.generated + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormExample.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormExample.java new file mode 100644 index 000000000..a9ff7672c --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormExample.java @@ -0,0 +1,501 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.util.ArrayList; +import java.util.List; + +public class FormExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + public FormExample() { + oredCriteria = new ArrayList<>(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form + * + * @mbg.generated + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormFieldDict.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormFieldDict.java new file mode 100644 index 000000000..6bc26b620 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormFieldDict.java @@ -0,0 +1,185 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.io.Serializable; +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +/** + * + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_field_dict + */ +@Getter +@Setter +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class FormFieldDict implements Serializable { + /** + * Database Column Remarks: + * 主键ID + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_field_dict.id + * + * @mbg.generated + */ + private Long id; + + /** + * Database Column Remarks: + * 类型:单位类型、往来单位、税率、费用分类、费用科目、仓库管理 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_field_dict.config_type + * + * @mbg.generated + */ + private String configType; + + /** + * Database Column Remarks: + * 名称 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_field_dict.name + * + * @mbg.generated + */ + private String name; + + /** + * Database Column Remarks: + * 值 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_field_dict.code + * + * @mbg.generated + */ + private String code; + + /** + * Database Column Remarks: + * 父级ID,也可以是关联的id + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_field_dict.parent_id + * + * @mbg.generated + */ + private Long parentId; + + /** + * Database Column Remarks: + * 检查ids:当删除里面的id时,进行校验是否有相关联 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_field_dict.check_ids + * + * @mbg.generated + */ + private String checkIds; + + /** + * Database Column Remarks: + * 排序 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_field_dict.sort_order + * + * @mbg.generated + */ + private Integer sortOrder; + + /** + * Database Column Remarks: + * 状态(1:启用,0:禁用) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_field_dict.status + * + * @mbg.generated + */ + private Integer status; + + /** + * Database Column Remarks: + * 创建人 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_field_dict.created_by + * + * @mbg.generated + */ + private Long createdBy; + + /** + * Database Column Remarks: + * 更新人 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_field_dict.updated_by + * + * @mbg.generated + */ + private Long updatedBy; + + /** + * Database Column Remarks: + * 创建时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_field_dict.create_time + * + * @mbg.generated + */ + private Date createTime; + + /** + * Database Column Remarks: + * 更新时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_field_dict.update_time + * + * @mbg.generated + */ + private Date updateTime; + + /** + * Database Column Remarks: + * 是否删除(0:否,1:是) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_field_dict.deleted + * + * @mbg.generated + */ + private Integer deleted; + + /** + * Database Column Remarks: + * 其他字段(JSON格式) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_field_dict.other_fields + * + * @mbg.generated + */ + private String otherFields; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_field_dict + * + * @mbg.generated + */ + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormFieldDictExample.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormFieldDictExample.java new file mode 100644 index 000000000..33d406647 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormFieldDictExample.java @@ -0,0 +1,1122 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class FormFieldDictExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_field_dict + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_field_dict + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_field_dict + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + public FormFieldDictExample() { + oredCriteria = new ArrayList<>(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_field_dict + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andConfigTypeIsNull() { + addCriterion("config_type is null"); + return (Criteria) this; + } + + public Criteria andConfigTypeIsNotNull() { + addCriterion("config_type is not null"); + return (Criteria) this; + } + + public Criteria andConfigTypeEqualTo(String value) { + addCriterion("config_type =", value, "configType"); + return (Criteria) this; + } + + public Criteria andConfigTypeNotEqualTo(String value) { + addCriterion("config_type <>", value, "configType"); + return (Criteria) this; + } + + public Criteria andConfigTypeGreaterThan(String value) { + addCriterion("config_type >", value, "configType"); + return (Criteria) this; + } + + public Criteria andConfigTypeGreaterThanOrEqualTo(String value) { + addCriterion("config_type >=", value, "configType"); + return (Criteria) this; + } + + public Criteria andConfigTypeLessThan(String value) { + addCriterion("config_type <", value, "configType"); + return (Criteria) this; + } + + public Criteria andConfigTypeLessThanOrEqualTo(String value) { + addCriterion("config_type <=", value, "configType"); + return (Criteria) this; + } + + public Criteria andConfigTypeLike(String value) { + addCriterion("config_type like", value, "configType"); + return (Criteria) this; + } + + public Criteria andConfigTypeNotLike(String value) { + addCriterion("config_type not like", value, "configType"); + return (Criteria) this; + } + + public Criteria andConfigTypeIn(List values) { + addCriterion("config_type in", values, "configType"); + return (Criteria) this; + } + + public Criteria andConfigTypeNotIn(List values) { + addCriterion("config_type not in", values, "configType"); + return (Criteria) this; + } + + public Criteria andConfigTypeBetween(String value1, String value2) { + addCriterion("config_type between", value1, value2, "configType"); + return (Criteria) this; + } + + public Criteria andConfigTypeNotBetween(String value1, String value2) { + addCriterion("config_type not between", value1, value2, "configType"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(Long value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(Long value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(Long value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(Long value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(Long value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(Long value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(Long value1, Long value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(Long value1, Long value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andCheckIdsIsNull() { + addCriterion("check_ids is null"); + return (Criteria) this; + } + + public Criteria andCheckIdsIsNotNull() { + addCriterion("check_ids is not null"); + return (Criteria) this; + } + + public Criteria andCheckIdsEqualTo(String value) { + addCriterion("check_ids =", value, "checkIds"); + return (Criteria) this; + } + + public Criteria andCheckIdsNotEqualTo(String value) { + addCriterion("check_ids <>", value, "checkIds"); + return (Criteria) this; + } + + public Criteria andCheckIdsGreaterThan(String value) { + addCriterion("check_ids >", value, "checkIds"); + return (Criteria) this; + } + + public Criteria andCheckIdsGreaterThanOrEqualTo(String value) { + addCriterion("check_ids >=", value, "checkIds"); + return (Criteria) this; + } + + public Criteria andCheckIdsLessThan(String value) { + addCriterion("check_ids <", value, "checkIds"); + return (Criteria) this; + } + + public Criteria andCheckIdsLessThanOrEqualTo(String value) { + addCriterion("check_ids <=", value, "checkIds"); + return (Criteria) this; + } + + public Criteria andCheckIdsLike(String value) { + addCriterion("check_ids like", value, "checkIds"); + return (Criteria) this; + } + + public Criteria andCheckIdsNotLike(String value) { + addCriterion("check_ids not like", value, "checkIds"); + return (Criteria) this; + } + + public Criteria andCheckIdsIn(List values) { + addCriterion("check_ids in", values, "checkIds"); + return (Criteria) this; + } + + public Criteria andCheckIdsNotIn(List values) { + addCriterion("check_ids not in", values, "checkIds"); + return (Criteria) this; + } + + public Criteria andCheckIdsBetween(String value1, String value2) { + addCriterion("check_ids between", value1, value2, "checkIds"); + return (Criteria) this; + } + + public Criteria andCheckIdsNotBetween(String value1, String value2) { + addCriterion("check_ids not between", value1, value2, "checkIds"); + return (Criteria) this; + } + + public Criteria andSortOrderIsNull() { + addCriterion("sort_order is null"); + return (Criteria) this; + } + + public Criteria andSortOrderIsNotNull() { + addCriterion("sort_order is not null"); + return (Criteria) this; + } + + public Criteria andSortOrderEqualTo(Integer value) { + addCriterion("sort_order =", value, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderNotEqualTo(Integer value) { + addCriterion("sort_order <>", value, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderGreaterThan(Integer value) { + addCriterion("sort_order >", value, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderGreaterThanOrEqualTo(Integer value) { + addCriterion("sort_order >=", value, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderLessThan(Integer value) { + addCriterion("sort_order <", value, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderLessThanOrEqualTo(Integer value) { + addCriterion("sort_order <=", value, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderIn(List values) { + addCriterion("sort_order in", values, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderNotIn(List values) { + addCriterion("sort_order not in", values, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderBetween(Integer value1, Integer value2) { + addCriterion("sort_order between", value1, value2, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderNotBetween(Integer value1, Integer value2) { + addCriterion("sort_order not between", value1, value2, "sortOrder"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNull() { + addCriterion("created_by is null"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNotNull() { + addCriterion("created_by is not null"); + return (Criteria) this; + } + + public Criteria andCreatedByEqualTo(Long value) { + addCriterion("created_by =", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotEqualTo(Long value) { + addCriterion("created_by <>", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThan(Long value) { + addCriterion("created_by >", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThanOrEqualTo(Long value) { + addCriterion("created_by >=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThan(Long value) { + addCriterion("created_by <", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThanOrEqualTo(Long value) { + addCriterion("created_by <=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByIn(List values) { + addCriterion("created_by in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotIn(List values) { + addCriterion("created_by not in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByBetween(Long value1, Long value2) { + addCriterion("created_by between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotBetween(Long value1, Long value2) { + addCriterion("created_by not between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNull() { + addCriterion("updated_by is null"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNotNull() { + addCriterion("updated_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedByEqualTo(Long value) { + addCriterion("updated_by =", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotEqualTo(Long value) { + addCriterion("updated_by <>", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThan(Long value) { + addCriterion("updated_by >", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThanOrEqualTo(Long value) { + addCriterion("updated_by >=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThan(Long value) { + addCriterion("updated_by <", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThanOrEqualTo(Long value) { + addCriterion("updated_by <=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByIn(List values) { + addCriterion("updated_by in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotIn(List values) { + addCriterion("updated_by not in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByBetween(Long value1, Long value2) { + addCriterion("updated_by between", value1, value2, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotBetween(Long value1, Long value2) { + addCriterion("updated_by not between", value1, value2, "updatedBy"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andDeletedIsNull() { + addCriterion("deleted is null"); + return (Criteria) this; + } + + public Criteria andDeletedIsNotNull() { + addCriterion("deleted is not null"); + return (Criteria) this; + } + + public Criteria andDeletedEqualTo(Integer value) { + addCriterion("deleted =", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotEqualTo(Integer value) { + addCriterion("deleted <>", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedGreaterThan(Integer value) { + addCriterion("deleted >", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedGreaterThanOrEqualTo(Integer value) { + addCriterion("deleted >=", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedLessThan(Integer value) { + addCriterion("deleted <", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedLessThanOrEqualTo(Integer value) { + addCriterion("deleted <=", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedIn(List values) { + addCriterion("deleted in", values, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotIn(List values) { + addCriterion("deleted not in", values, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedBetween(Integer value1, Integer value2) { + addCriterion("deleted between", value1, value2, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotBetween(Integer value1, Integer value2) { + addCriterion("deleted not between", value1, value2, "deleted"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_field_dict + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_field_dict + * + * @mbg.generated + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfig.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfig.java new file mode 100644 index 000000000..874bd234f --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfig.java @@ -0,0 +1,295 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.io.Serializable; +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +/** + * + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_print_config + */ +@Getter +@Setter +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class FormPrintConfig implements Serializable { + /** + * Database Column Remarks: + * 主键ID + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.id + * + * @mbg.generated + */ + private Long id; + + /** + * Database Column Remarks: + * 关联的表单ID + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.form_id + * + * @mbg.generated + */ + private Long formId; + + /** + * Database Column Remarks: + * 主标题 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.main_title + * + * @mbg.generated + */ + private String mainTitle; + + /** + * Database Column Remarks: + * 副标题 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.sub_title + * + * @mbg.generated + */ + private String subTitle; + + /** + * Database Column Remarks: + * 显示格式:简洁、标准、完整 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.display_format + * + * @mbg.generated + */ + private String displayFormat; + + /** + * Database Column Remarks: + * 单据编号前缀(如CG-) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.document_no_prefix + * + * @mbg.generated + */ + private String documentNoPrefix; + + /** + * Database Column Remarks: + * 是否显示单据编号 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.show_document_no + * + * @mbg.generated + */ + private Boolean showDocumentNo; + + /** + * Database Column Remarks: + * 打印日期格式 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.print_date_format + * + * @mbg.generated + */ + private String printDateFormat; + + /** + * Database Column Remarks: + * 是否显示打印日期 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.show_print_date + * + * @mbg.generated + */ + private Boolean showPrintDate; + + /** + * Database Column Remarks: + * 是否显示页码 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.show_page_number + * + * @mbg.generated + */ + private Boolean showPageNumber; + + /** + * Database Column Remarks: + * 列宽模式:固定宽度或自适应 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.column_width_mode + * + * @mbg.generated + */ + private String columnWidthMode; + + /** + * Database Column Remarks: + * 表格样式:有边框或无边框 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.table_style + * + * @mbg.generated + */ + private String tableStyle; + + /** + * Database Column Remarks: + * 数据行高 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.row_height + * + * @mbg.generated + */ + private String rowHeight; + + /** + * Database Column Remarks: + * 模板文件大小 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.file_size + * + * @mbg.generated + */ + private Integer fileSize; + + /** + * Database Column Remarks: + * 模板文件name + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.file_name + * + * @mbg.generated + */ + private String fileName; + + /** + * Database Column Remarks: + * 文件类型:doc、excel + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.file_type + * + * @mbg.generated + */ + private String fileType; + + /** + * Database Column Remarks: + * file_wps_id + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.file_wps_id + * + * @mbg.generated + */ + private String fileWpsId; + + /** + * Database Column Remarks: + * ai模板文件url + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.file_url_ai + * + * @mbg.generated + */ + private String fileUrlAi; + + /** + * Database Column Remarks: + * 模板文件url + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.file_url + * + * @mbg.generated + */ + private String fileUrl; + + /** + * Database Column Remarks: + * 打印配置模式(1、默认模式;2、模板打印模式) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.mode + * + * @mbg.generated + */ + private Integer mode; + + /** + * Database Column Remarks: + * 创建人 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.created_by + * + * @mbg.generated + */ + private Long createdBy; + + /** + * Database Column Remarks: + * 更新人 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.updated_by + * + * @mbg.generated + */ + private Long updatedBy; + + /** + * Database Column Remarks: + * 创建时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.create_time + * + * @mbg.generated + */ + private Date createTime; + + /** + * Database Column Remarks: + * 更新时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.update_time + * + * @mbg.generated + */ + private Date updateTime; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_print_config + * + * @mbg.generated + */ + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigExample.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigExample.java new file mode 100644 index 000000000..d061a44a6 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigExample.java @@ -0,0 +1,1872 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class FormPrintConfigExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_print_config + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_print_config + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_print_config + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + public FormPrintConfigExample() { + oredCriteria = new ArrayList<>(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_print_config + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andFormIdIsNull() { + addCriterion("form_id is null"); + return (Criteria) this; + } + + public Criteria andFormIdIsNotNull() { + addCriterion("form_id is not null"); + return (Criteria) this; + } + + public Criteria andFormIdEqualTo(Long value) { + addCriterion("form_id =", value, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdNotEqualTo(Long value) { + addCriterion("form_id <>", value, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdGreaterThan(Long value) { + addCriterion("form_id >", value, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdGreaterThanOrEqualTo(Long value) { + addCriterion("form_id >=", value, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdLessThan(Long value) { + addCriterion("form_id <", value, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdLessThanOrEqualTo(Long value) { + addCriterion("form_id <=", value, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdIn(List values) { + addCriterion("form_id in", values, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdNotIn(List values) { + addCriterion("form_id not in", values, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdBetween(Long value1, Long value2) { + addCriterion("form_id between", value1, value2, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdNotBetween(Long value1, Long value2) { + addCriterion("form_id not between", value1, value2, "formId"); + return (Criteria) this; + } + + public Criteria andMainTitleIsNull() { + addCriterion("main_title is null"); + return (Criteria) this; + } + + public Criteria andMainTitleIsNotNull() { + addCriterion("main_title is not null"); + return (Criteria) this; + } + + public Criteria andMainTitleEqualTo(String value) { + addCriterion("main_title =", value, "mainTitle"); + return (Criteria) this; + } + + public Criteria andMainTitleNotEqualTo(String value) { + addCriterion("main_title <>", value, "mainTitle"); + return (Criteria) this; + } + + public Criteria andMainTitleGreaterThan(String value) { + addCriterion("main_title >", value, "mainTitle"); + return (Criteria) this; + } + + public Criteria andMainTitleGreaterThanOrEqualTo(String value) { + addCriterion("main_title >=", value, "mainTitle"); + return (Criteria) this; + } + + public Criteria andMainTitleLessThan(String value) { + addCriterion("main_title <", value, "mainTitle"); + return (Criteria) this; + } + + public Criteria andMainTitleLessThanOrEqualTo(String value) { + addCriterion("main_title <=", value, "mainTitle"); + return (Criteria) this; + } + + public Criteria andMainTitleLike(String value) { + addCriterion("main_title like", value, "mainTitle"); + return (Criteria) this; + } + + public Criteria andMainTitleNotLike(String value) { + addCriterion("main_title not like", value, "mainTitle"); + return (Criteria) this; + } + + public Criteria andMainTitleIn(List values) { + addCriterion("main_title in", values, "mainTitle"); + return (Criteria) this; + } + + public Criteria andMainTitleNotIn(List values) { + addCriterion("main_title not in", values, "mainTitle"); + return (Criteria) this; + } + + public Criteria andMainTitleBetween(String value1, String value2) { + addCriterion("main_title between", value1, value2, "mainTitle"); + return (Criteria) this; + } + + public Criteria andMainTitleNotBetween(String value1, String value2) { + addCriterion("main_title not between", value1, value2, "mainTitle"); + return (Criteria) this; + } + + public Criteria andSubTitleIsNull() { + addCriterion("sub_title is null"); + return (Criteria) this; + } + + public Criteria andSubTitleIsNotNull() { + addCriterion("sub_title is not null"); + return (Criteria) this; + } + + public Criteria andSubTitleEqualTo(String value) { + addCriterion("sub_title =", value, "subTitle"); + return (Criteria) this; + } + + public Criteria andSubTitleNotEqualTo(String value) { + addCriterion("sub_title <>", value, "subTitle"); + return (Criteria) this; + } + + public Criteria andSubTitleGreaterThan(String value) { + addCriterion("sub_title >", value, "subTitle"); + return (Criteria) this; + } + + public Criteria andSubTitleGreaterThanOrEqualTo(String value) { + addCriterion("sub_title >=", value, "subTitle"); + return (Criteria) this; + } + + public Criteria andSubTitleLessThan(String value) { + addCriterion("sub_title <", value, "subTitle"); + return (Criteria) this; + } + + public Criteria andSubTitleLessThanOrEqualTo(String value) { + addCriterion("sub_title <=", value, "subTitle"); + return (Criteria) this; + } + + public Criteria andSubTitleLike(String value) { + addCriterion("sub_title like", value, "subTitle"); + return (Criteria) this; + } + + public Criteria andSubTitleNotLike(String value) { + addCriterion("sub_title not like", value, "subTitle"); + return (Criteria) this; + } + + public Criteria andSubTitleIn(List values) { + addCriterion("sub_title in", values, "subTitle"); + return (Criteria) this; + } + + public Criteria andSubTitleNotIn(List values) { + addCriterion("sub_title not in", values, "subTitle"); + return (Criteria) this; + } + + public Criteria andSubTitleBetween(String value1, String value2) { + addCriterion("sub_title between", value1, value2, "subTitle"); + return (Criteria) this; + } + + public Criteria andSubTitleNotBetween(String value1, String value2) { + addCriterion("sub_title not between", value1, value2, "subTitle"); + return (Criteria) this; + } + + public Criteria andDisplayFormatIsNull() { + addCriterion("display_format is null"); + return (Criteria) this; + } + + public Criteria andDisplayFormatIsNotNull() { + addCriterion("display_format is not null"); + return (Criteria) this; + } + + public Criteria andDisplayFormatEqualTo(String value) { + addCriterion("display_format =", value, "displayFormat"); + return (Criteria) this; + } + + public Criteria andDisplayFormatNotEqualTo(String value) { + addCriterion("display_format <>", value, "displayFormat"); + return (Criteria) this; + } + + public Criteria andDisplayFormatGreaterThan(String value) { + addCriterion("display_format >", value, "displayFormat"); + return (Criteria) this; + } + + public Criteria andDisplayFormatGreaterThanOrEqualTo(String value) { + addCriterion("display_format >=", value, "displayFormat"); + return (Criteria) this; + } + + public Criteria andDisplayFormatLessThan(String value) { + addCriterion("display_format <", value, "displayFormat"); + return (Criteria) this; + } + + public Criteria andDisplayFormatLessThanOrEqualTo(String value) { + addCriterion("display_format <=", value, "displayFormat"); + return (Criteria) this; + } + + public Criteria andDisplayFormatLike(String value) { + addCriterion("display_format like", value, "displayFormat"); + return (Criteria) this; + } + + public Criteria andDisplayFormatNotLike(String value) { + addCriterion("display_format not like", value, "displayFormat"); + return (Criteria) this; + } + + public Criteria andDisplayFormatIn(List values) { + addCriterion("display_format in", values, "displayFormat"); + return (Criteria) this; + } + + public Criteria andDisplayFormatNotIn(List values) { + addCriterion("display_format not in", values, "displayFormat"); + return (Criteria) this; + } + + public Criteria andDisplayFormatBetween(String value1, String value2) { + addCriterion("display_format between", value1, value2, "displayFormat"); + return (Criteria) this; + } + + public Criteria andDisplayFormatNotBetween(String value1, String value2) { + addCriterion("display_format not between", value1, value2, "displayFormat"); + return (Criteria) this; + } + + public Criteria andDocumentNoPrefixIsNull() { + addCriterion("document_no_prefix is null"); + return (Criteria) this; + } + + public Criteria andDocumentNoPrefixIsNotNull() { + addCriterion("document_no_prefix is not null"); + return (Criteria) this; + } + + public Criteria andDocumentNoPrefixEqualTo(String value) { + addCriterion("document_no_prefix =", value, "documentNoPrefix"); + return (Criteria) this; + } + + public Criteria andDocumentNoPrefixNotEqualTo(String value) { + addCriterion("document_no_prefix <>", value, "documentNoPrefix"); + return (Criteria) this; + } + + public Criteria andDocumentNoPrefixGreaterThan(String value) { + addCriterion("document_no_prefix >", value, "documentNoPrefix"); + return (Criteria) this; + } + + public Criteria andDocumentNoPrefixGreaterThanOrEqualTo(String value) { + addCriterion("document_no_prefix >=", value, "documentNoPrefix"); + return (Criteria) this; + } + + public Criteria andDocumentNoPrefixLessThan(String value) { + addCriterion("document_no_prefix <", value, "documentNoPrefix"); + return (Criteria) this; + } + + public Criteria andDocumentNoPrefixLessThanOrEqualTo(String value) { + addCriterion("document_no_prefix <=", value, "documentNoPrefix"); + return (Criteria) this; + } + + public Criteria andDocumentNoPrefixLike(String value) { + addCriterion("document_no_prefix like", value, "documentNoPrefix"); + return (Criteria) this; + } + + public Criteria andDocumentNoPrefixNotLike(String value) { + addCriterion("document_no_prefix not like", value, "documentNoPrefix"); + return (Criteria) this; + } + + public Criteria andDocumentNoPrefixIn(List values) { + addCriterion("document_no_prefix in", values, "documentNoPrefix"); + return (Criteria) this; + } + + public Criteria andDocumentNoPrefixNotIn(List values) { + addCriterion("document_no_prefix not in", values, "documentNoPrefix"); + return (Criteria) this; + } + + public Criteria andDocumentNoPrefixBetween(String value1, String value2) { + addCriterion("document_no_prefix between", value1, value2, "documentNoPrefix"); + return (Criteria) this; + } + + public Criteria andDocumentNoPrefixNotBetween(String value1, String value2) { + addCriterion("document_no_prefix not between", value1, value2, "documentNoPrefix"); + return (Criteria) this; + } + + public Criteria andShowDocumentNoIsNull() { + addCriterion("show_document_no is null"); + return (Criteria) this; + } + + public Criteria andShowDocumentNoIsNotNull() { + addCriterion("show_document_no is not null"); + return (Criteria) this; + } + + public Criteria andShowDocumentNoEqualTo(Boolean value) { + addCriterion("show_document_no =", value, "showDocumentNo"); + return (Criteria) this; + } + + public Criteria andShowDocumentNoNotEqualTo(Boolean value) { + addCriterion("show_document_no <>", value, "showDocumentNo"); + return (Criteria) this; + } + + public Criteria andShowDocumentNoGreaterThan(Boolean value) { + addCriterion("show_document_no >", value, "showDocumentNo"); + return (Criteria) this; + } + + public Criteria andShowDocumentNoGreaterThanOrEqualTo(Boolean value) { + addCriterion("show_document_no >=", value, "showDocumentNo"); + return (Criteria) this; + } + + public Criteria andShowDocumentNoLessThan(Boolean value) { + addCriterion("show_document_no <", value, "showDocumentNo"); + return (Criteria) this; + } + + public Criteria andShowDocumentNoLessThanOrEqualTo(Boolean value) { + addCriterion("show_document_no <=", value, "showDocumentNo"); + return (Criteria) this; + } + + public Criteria andShowDocumentNoIn(List values) { + addCriterion("show_document_no in", values, "showDocumentNo"); + return (Criteria) this; + } + + public Criteria andShowDocumentNoNotIn(List values) { + addCriterion("show_document_no not in", values, "showDocumentNo"); + return (Criteria) this; + } + + public Criteria andShowDocumentNoBetween(Boolean value1, Boolean value2) { + addCriterion("show_document_no between", value1, value2, "showDocumentNo"); + return (Criteria) this; + } + + public Criteria andShowDocumentNoNotBetween(Boolean value1, Boolean value2) { + addCriterion("show_document_no not between", value1, value2, "showDocumentNo"); + return (Criteria) this; + } + + public Criteria andPrintDateFormatIsNull() { + addCriterion("print_date_format is null"); + return (Criteria) this; + } + + public Criteria andPrintDateFormatIsNotNull() { + addCriterion("print_date_format is not null"); + return (Criteria) this; + } + + public Criteria andPrintDateFormatEqualTo(String value) { + addCriterion("print_date_format =", value, "printDateFormat"); + return (Criteria) this; + } + + public Criteria andPrintDateFormatNotEqualTo(String value) { + addCriterion("print_date_format <>", value, "printDateFormat"); + return (Criteria) this; + } + + public Criteria andPrintDateFormatGreaterThan(String value) { + addCriterion("print_date_format >", value, "printDateFormat"); + return (Criteria) this; + } + + public Criteria andPrintDateFormatGreaterThanOrEqualTo(String value) { + addCriterion("print_date_format >=", value, "printDateFormat"); + return (Criteria) this; + } + + public Criteria andPrintDateFormatLessThan(String value) { + addCriterion("print_date_format <", value, "printDateFormat"); + return (Criteria) this; + } + + public Criteria andPrintDateFormatLessThanOrEqualTo(String value) { + addCriterion("print_date_format <=", value, "printDateFormat"); + return (Criteria) this; + } + + public Criteria andPrintDateFormatLike(String value) { + addCriterion("print_date_format like", value, "printDateFormat"); + return (Criteria) this; + } + + public Criteria andPrintDateFormatNotLike(String value) { + addCriterion("print_date_format not like", value, "printDateFormat"); + return (Criteria) this; + } + + public Criteria andPrintDateFormatIn(List values) { + addCriterion("print_date_format in", values, "printDateFormat"); + return (Criteria) this; + } + + public Criteria andPrintDateFormatNotIn(List values) { + addCriterion("print_date_format not in", values, "printDateFormat"); + return (Criteria) this; + } + + public Criteria andPrintDateFormatBetween(String value1, String value2) { + addCriterion("print_date_format between", value1, value2, "printDateFormat"); + return (Criteria) this; + } + + public Criteria andPrintDateFormatNotBetween(String value1, String value2) { + addCriterion("print_date_format not between", value1, value2, "printDateFormat"); + return (Criteria) this; + } + + public Criteria andShowPrintDateIsNull() { + addCriterion("show_print_date is null"); + return (Criteria) this; + } + + public Criteria andShowPrintDateIsNotNull() { + addCriterion("show_print_date is not null"); + return (Criteria) this; + } + + public Criteria andShowPrintDateEqualTo(Boolean value) { + addCriterion("show_print_date =", value, "showPrintDate"); + return (Criteria) this; + } + + public Criteria andShowPrintDateNotEqualTo(Boolean value) { + addCriterion("show_print_date <>", value, "showPrintDate"); + return (Criteria) this; + } + + public Criteria andShowPrintDateGreaterThan(Boolean value) { + addCriterion("show_print_date >", value, "showPrintDate"); + return (Criteria) this; + } + + public Criteria andShowPrintDateGreaterThanOrEqualTo(Boolean value) { + addCriterion("show_print_date >=", value, "showPrintDate"); + return (Criteria) this; + } + + public Criteria andShowPrintDateLessThan(Boolean value) { + addCriterion("show_print_date <", value, "showPrintDate"); + return (Criteria) this; + } + + public Criteria andShowPrintDateLessThanOrEqualTo(Boolean value) { + addCriterion("show_print_date <=", value, "showPrintDate"); + return (Criteria) this; + } + + public Criteria andShowPrintDateIn(List values) { + addCriterion("show_print_date in", values, "showPrintDate"); + return (Criteria) this; + } + + public Criteria andShowPrintDateNotIn(List values) { + addCriterion("show_print_date not in", values, "showPrintDate"); + return (Criteria) this; + } + + public Criteria andShowPrintDateBetween(Boolean value1, Boolean value2) { + addCriterion("show_print_date between", value1, value2, "showPrintDate"); + return (Criteria) this; + } + + public Criteria andShowPrintDateNotBetween(Boolean value1, Boolean value2) { + addCriterion("show_print_date not between", value1, value2, "showPrintDate"); + return (Criteria) this; + } + + public Criteria andShowPageNumberIsNull() { + addCriterion("show_page_number is null"); + return (Criteria) this; + } + + public Criteria andShowPageNumberIsNotNull() { + addCriterion("show_page_number is not null"); + return (Criteria) this; + } + + public Criteria andShowPageNumberEqualTo(Boolean value) { + addCriterion("show_page_number =", value, "showPageNumber"); + return (Criteria) this; + } + + public Criteria andShowPageNumberNotEqualTo(Boolean value) { + addCriterion("show_page_number <>", value, "showPageNumber"); + return (Criteria) this; + } + + public Criteria andShowPageNumberGreaterThan(Boolean value) { + addCriterion("show_page_number >", value, "showPageNumber"); + return (Criteria) this; + } + + public Criteria andShowPageNumberGreaterThanOrEqualTo(Boolean value) { + addCriterion("show_page_number >=", value, "showPageNumber"); + return (Criteria) this; + } + + public Criteria andShowPageNumberLessThan(Boolean value) { + addCriterion("show_page_number <", value, "showPageNumber"); + return (Criteria) this; + } + + public Criteria andShowPageNumberLessThanOrEqualTo(Boolean value) { + addCriterion("show_page_number <=", value, "showPageNumber"); + return (Criteria) this; + } + + public Criteria andShowPageNumberIn(List values) { + addCriterion("show_page_number in", values, "showPageNumber"); + return (Criteria) this; + } + + public Criteria andShowPageNumberNotIn(List values) { + addCriterion("show_page_number not in", values, "showPageNumber"); + return (Criteria) this; + } + + public Criteria andShowPageNumberBetween(Boolean value1, Boolean value2) { + addCriterion("show_page_number between", value1, value2, "showPageNumber"); + return (Criteria) this; + } + + public Criteria andShowPageNumberNotBetween(Boolean value1, Boolean value2) { + addCriterion("show_page_number not between", value1, value2, "showPageNumber"); + return (Criteria) this; + } + + public Criteria andColumnWidthModeIsNull() { + addCriterion("column_width_mode is null"); + return (Criteria) this; + } + + public Criteria andColumnWidthModeIsNotNull() { + addCriterion("column_width_mode is not null"); + return (Criteria) this; + } + + public Criteria andColumnWidthModeEqualTo(String value) { + addCriterion("column_width_mode =", value, "columnWidthMode"); + return (Criteria) this; + } + + public Criteria andColumnWidthModeNotEqualTo(String value) { + addCriterion("column_width_mode <>", value, "columnWidthMode"); + return (Criteria) this; + } + + public Criteria andColumnWidthModeGreaterThan(String value) { + addCriterion("column_width_mode >", value, "columnWidthMode"); + return (Criteria) this; + } + + public Criteria andColumnWidthModeGreaterThanOrEqualTo(String value) { + addCriterion("column_width_mode >=", value, "columnWidthMode"); + return (Criteria) this; + } + + public Criteria andColumnWidthModeLessThan(String value) { + addCriterion("column_width_mode <", value, "columnWidthMode"); + return (Criteria) this; + } + + public Criteria andColumnWidthModeLessThanOrEqualTo(String value) { + addCriterion("column_width_mode <=", value, "columnWidthMode"); + return (Criteria) this; + } + + public Criteria andColumnWidthModeLike(String value) { + addCriterion("column_width_mode like", value, "columnWidthMode"); + return (Criteria) this; + } + + public Criteria andColumnWidthModeNotLike(String value) { + addCriterion("column_width_mode not like", value, "columnWidthMode"); + return (Criteria) this; + } + + public Criteria andColumnWidthModeIn(List values) { + addCriterion("column_width_mode in", values, "columnWidthMode"); + return (Criteria) this; + } + + public Criteria andColumnWidthModeNotIn(List values) { + addCriterion("column_width_mode not in", values, "columnWidthMode"); + return (Criteria) this; + } + + public Criteria andColumnWidthModeBetween(String value1, String value2) { + addCriterion("column_width_mode between", value1, value2, "columnWidthMode"); + return (Criteria) this; + } + + public Criteria andColumnWidthModeNotBetween(String value1, String value2) { + addCriterion("column_width_mode not between", value1, value2, "columnWidthMode"); + return (Criteria) this; + } + + public Criteria andTableStyleIsNull() { + addCriterion("table_style is null"); + return (Criteria) this; + } + + public Criteria andTableStyleIsNotNull() { + addCriterion("table_style is not null"); + return (Criteria) this; + } + + public Criteria andTableStyleEqualTo(String value) { + addCriterion("table_style =", value, "tableStyle"); + return (Criteria) this; + } + + public Criteria andTableStyleNotEqualTo(String value) { + addCriterion("table_style <>", value, "tableStyle"); + return (Criteria) this; + } + + public Criteria andTableStyleGreaterThan(String value) { + addCriterion("table_style >", value, "tableStyle"); + return (Criteria) this; + } + + public Criteria andTableStyleGreaterThanOrEqualTo(String value) { + addCriterion("table_style >=", value, "tableStyle"); + return (Criteria) this; + } + + public Criteria andTableStyleLessThan(String value) { + addCriterion("table_style <", value, "tableStyle"); + return (Criteria) this; + } + + public Criteria andTableStyleLessThanOrEqualTo(String value) { + addCriterion("table_style <=", value, "tableStyle"); + return (Criteria) this; + } + + public Criteria andTableStyleLike(String value) { + addCriterion("table_style like", value, "tableStyle"); + return (Criteria) this; + } + + public Criteria andTableStyleNotLike(String value) { + addCriterion("table_style not like", value, "tableStyle"); + return (Criteria) this; + } + + public Criteria andTableStyleIn(List values) { + addCriterion("table_style in", values, "tableStyle"); + return (Criteria) this; + } + + public Criteria andTableStyleNotIn(List values) { + addCriterion("table_style not in", values, "tableStyle"); + return (Criteria) this; + } + + public Criteria andTableStyleBetween(String value1, String value2) { + addCriterion("table_style between", value1, value2, "tableStyle"); + return (Criteria) this; + } + + public Criteria andTableStyleNotBetween(String value1, String value2) { + addCriterion("table_style not between", value1, value2, "tableStyle"); + return (Criteria) this; + } + + public Criteria andRowHeightIsNull() { + addCriterion("row_height is null"); + return (Criteria) this; + } + + public Criteria andRowHeightIsNotNull() { + addCriterion("row_height is not null"); + return (Criteria) this; + } + + public Criteria andRowHeightEqualTo(String value) { + addCriterion("row_height =", value, "rowHeight"); + return (Criteria) this; + } + + public Criteria andRowHeightNotEqualTo(String value) { + addCriterion("row_height <>", value, "rowHeight"); + return (Criteria) this; + } + + public Criteria andRowHeightGreaterThan(String value) { + addCriterion("row_height >", value, "rowHeight"); + return (Criteria) this; + } + + public Criteria andRowHeightGreaterThanOrEqualTo(String value) { + addCriterion("row_height >=", value, "rowHeight"); + return (Criteria) this; + } + + public Criteria andRowHeightLessThan(String value) { + addCriterion("row_height <", value, "rowHeight"); + return (Criteria) this; + } + + public Criteria andRowHeightLessThanOrEqualTo(String value) { + addCriterion("row_height <=", value, "rowHeight"); + return (Criteria) this; + } + + public Criteria andRowHeightLike(String value) { + addCriterion("row_height like", value, "rowHeight"); + return (Criteria) this; + } + + public Criteria andRowHeightNotLike(String value) { + addCriterion("row_height not like", value, "rowHeight"); + return (Criteria) this; + } + + public Criteria andRowHeightIn(List values) { + addCriterion("row_height in", values, "rowHeight"); + return (Criteria) this; + } + + public Criteria andRowHeightNotIn(List values) { + addCriterion("row_height not in", values, "rowHeight"); + return (Criteria) this; + } + + public Criteria andRowHeightBetween(String value1, String value2) { + addCriterion("row_height between", value1, value2, "rowHeight"); + return (Criteria) this; + } + + public Criteria andRowHeightNotBetween(String value1, String value2) { + addCriterion("row_height not between", value1, value2, "rowHeight"); + return (Criteria) this; + } + + public Criteria andFileSizeIsNull() { + addCriterion("file_size is null"); + return (Criteria) this; + } + + public Criteria andFileSizeIsNotNull() { + addCriterion("file_size is not null"); + return (Criteria) this; + } + + public Criteria andFileSizeEqualTo(Integer value) { + addCriterion("file_size =", value, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeNotEqualTo(Integer value) { + addCriterion("file_size <>", value, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeGreaterThan(Integer value) { + addCriterion("file_size >", value, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeGreaterThanOrEqualTo(Integer value) { + addCriterion("file_size >=", value, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeLessThan(Integer value) { + addCriterion("file_size <", value, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeLessThanOrEqualTo(Integer value) { + addCriterion("file_size <=", value, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeIn(List values) { + addCriterion("file_size in", values, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeNotIn(List values) { + addCriterion("file_size not in", values, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeBetween(Integer value1, Integer value2) { + addCriterion("file_size between", value1, value2, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileSizeNotBetween(Integer value1, Integer value2) { + addCriterion("file_size not between", value1, value2, "fileSize"); + return (Criteria) this; + } + + public Criteria andFileNameIsNull() { + addCriterion("file_name is null"); + return (Criteria) this; + } + + public Criteria andFileNameIsNotNull() { + addCriterion("file_name is not null"); + return (Criteria) this; + } + + public Criteria andFileNameEqualTo(String value) { + addCriterion("file_name =", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotEqualTo(String value) { + addCriterion("file_name <>", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameGreaterThan(String value) { + addCriterion("file_name >", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameGreaterThanOrEqualTo(String value) { + addCriterion("file_name >=", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameLessThan(String value) { + addCriterion("file_name <", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameLessThanOrEqualTo(String value) { + addCriterion("file_name <=", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameLike(String value) { + addCriterion("file_name like", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotLike(String value) { + addCriterion("file_name not like", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameIn(List values) { + addCriterion("file_name in", values, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotIn(List values) { + addCriterion("file_name not in", values, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameBetween(String value1, String value2) { + addCriterion("file_name between", value1, value2, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotBetween(String value1, String value2) { + addCriterion("file_name not between", value1, value2, "fileName"); + return (Criteria) this; + } + + public Criteria andFileTypeIsNull() { + addCriterion("file_type is null"); + return (Criteria) this; + } + + public Criteria andFileTypeIsNotNull() { + addCriterion("file_type is not null"); + return (Criteria) this; + } + + public Criteria andFileTypeEqualTo(String value) { + addCriterion("file_type =", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeNotEqualTo(String value) { + addCriterion("file_type <>", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeGreaterThan(String value) { + addCriterion("file_type >", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeGreaterThanOrEqualTo(String value) { + addCriterion("file_type >=", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeLessThan(String value) { + addCriterion("file_type <", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeLessThanOrEqualTo(String value) { + addCriterion("file_type <=", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeLike(String value) { + addCriterion("file_type like", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeNotLike(String value) { + addCriterion("file_type not like", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeIn(List values) { + addCriterion("file_type in", values, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeNotIn(List values) { + addCriterion("file_type not in", values, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeBetween(String value1, String value2) { + addCriterion("file_type between", value1, value2, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeNotBetween(String value1, String value2) { + addCriterion("file_type not between", value1, value2, "fileType"); + return (Criteria) this; + } + + public Criteria andFileWpsIdIsNull() { + addCriterion("file_wps_id is null"); + return (Criteria) this; + } + + public Criteria andFileWpsIdIsNotNull() { + addCriterion("file_wps_id is not null"); + return (Criteria) this; + } + + public Criteria andFileWpsIdEqualTo(String value) { + addCriterion("file_wps_id =", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdNotEqualTo(String value) { + addCriterion("file_wps_id <>", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdGreaterThan(String value) { + addCriterion("file_wps_id >", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdGreaterThanOrEqualTo(String value) { + addCriterion("file_wps_id >=", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdLessThan(String value) { + addCriterion("file_wps_id <", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdLessThanOrEqualTo(String value) { + addCriterion("file_wps_id <=", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdLike(String value) { + addCriterion("file_wps_id like", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdNotLike(String value) { + addCriterion("file_wps_id not like", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdIn(List values) { + addCriterion("file_wps_id in", values, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdNotIn(List values) { + addCriterion("file_wps_id not in", values, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdBetween(String value1, String value2) { + addCriterion("file_wps_id between", value1, value2, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdNotBetween(String value1, String value2) { + addCriterion("file_wps_id not between", value1, value2, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileUrlAiIsNull() { + addCriterion("file_url_ai is null"); + return (Criteria) this; + } + + public Criteria andFileUrlAiIsNotNull() { + addCriterion("file_url_ai is not null"); + return (Criteria) this; + } + + public Criteria andFileUrlAiEqualTo(String value) { + addCriterion("file_url_ai =", value, "fileUrlAi"); + return (Criteria) this; + } + + public Criteria andFileUrlAiNotEqualTo(String value) { + addCriterion("file_url_ai <>", value, "fileUrlAi"); + return (Criteria) this; + } + + public Criteria andFileUrlAiGreaterThan(String value) { + addCriterion("file_url_ai >", value, "fileUrlAi"); + return (Criteria) this; + } + + public Criteria andFileUrlAiGreaterThanOrEqualTo(String value) { + addCriterion("file_url_ai >=", value, "fileUrlAi"); + return (Criteria) this; + } + + public Criteria andFileUrlAiLessThan(String value) { + addCriterion("file_url_ai <", value, "fileUrlAi"); + return (Criteria) this; + } + + public Criteria andFileUrlAiLessThanOrEqualTo(String value) { + addCriterion("file_url_ai <=", value, "fileUrlAi"); + return (Criteria) this; + } + + public Criteria andFileUrlAiLike(String value) { + addCriterion("file_url_ai like", value, "fileUrlAi"); + return (Criteria) this; + } + + public Criteria andFileUrlAiNotLike(String value) { + addCriterion("file_url_ai not like", value, "fileUrlAi"); + return (Criteria) this; + } + + public Criteria andFileUrlAiIn(List values) { + addCriterion("file_url_ai in", values, "fileUrlAi"); + return (Criteria) this; + } + + public Criteria andFileUrlAiNotIn(List values) { + addCriterion("file_url_ai not in", values, "fileUrlAi"); + return (Criteria) this; + } + + public Criteria andFileUrlAiBetween(String value1, String value2) { + addCriterion("file_url_ai between", value1, value2, "fileUrlAi"); + return (Criteria) this; + } + + public Criteria andFileUrlAiNotBetween(String value1, String value2) { + addCriterion("file_url_ai not between", value1, value2, "fileUrlAi"); + return (Criteria) this; + } + + public Criteria andFileUrlIsNull() { + addCriterion("file_url is null"); + return (Criteria) this; + } + + public Criteria andFileUrlIsNotNull() { + addCriterion("file_url is not null"); + return (Criteria) this; + } + + public Criteria andFileUrlEqualTo(String value) { + addCriterion("file_url =", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotEqualTo(String value) { + addCriterion("file_url <>", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlGreaterThan(String value) { + addCriterion("file_url >", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlGreaterThanOrEqualTo(String value) { + addCriterion("file_url >=", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlLessThan(String value) { + addCriterion("file_url <", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlLessThanOrEqualTo(String value) { + addCriterion("file_url <=", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlLike(String value) { + addCriterion("file_url like", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotLike(String value) { + addCriterion("file_url not like", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlIn(List values) { + addCriterion("file_url in", values, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotIn(List values) { + addCriterion("file_url not in", values, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlBetween(String value1, String value2) { + addCriterion("file_url between", value1, value2, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotBetween(String value1, String value2) { + addCriterion("file_url not between", value1, value2, "fileUrl"); + return (Criteria) this; + } + + public Criteria andModeIsNull() { + addCriterion("`mode` is null"); + return (Criteria) this; + } + + public Criteria andModeIsNotNull() { + addCriterion("`mode` is not null"); + return (Criteria) this; + } + + public Criteria andModeEqualTo(Integer value) { + addCriterion("`mode` =", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeNotEqualTo(Integer value) { + addCriterion("`mode` <>", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeGreaterThan(Integer value) { + addCriterion("`mode` >", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeGreaterThanOrEqualTo(Integer value) { + addCriterion("`mode` >=", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeLessThan(Integer value) { + addCriterion("`mode` <", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeLessThanOrEqualTo(Integer value) { + addCriterion("`mode` <=", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeIn(List values) { + addCriterion("`mode` in", values, "mode"); + return (Criteria) this; + } + + public Criteria andModeNotIn(List values) { + addCriterion("`mode` not in", values, "mode"); + return (Criteria) this; + } + + public Criteria andModeBetween(Integer value1, Integer value2) { + addCriterion("`mode` between", value1, value2, "mode"); + return (Criteria) this; + } + + public Criteria andModeNotBetween(Integer value1, Integer value2) { + addCriterion("`mode` not between", value1, value2, "mode"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNull() { + addCriterion("created_by is null"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNotNull() { + addCriterion("created_by is not null"); + return (Criteria) this; + } + + public Criteria andCreatedByEqualTo(Long value) { + addCriterion("created_by =", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotEqualTo(Long value) { + addCriterion("created_by <>", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThan(Long value) { + addCriterion("created_by >", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThanOrEqualTo(Long value) { + addCriterion("created_by >=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThan(Long value) { + addCriterion("created_by <", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThanOrEqualTo(Long value) { + addCriterion("created_by <=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByIn(List values) { + addCriterion("created_by in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotIn(List values) { + addCriterion("created_by not in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByBetween(Long value1, Long value2) { + addCriterion("created_by between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotBetween(Long value1, Long value2) { + addCriterion("created_by not between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNull() { + addCriterion("updated_by is null"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNotNull() { + addCriterion("updated_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedByEqualTo(Long value) { + addCriterion("updated_by =", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotEqualTo(Long value) { + addCriterion("updated_by <>", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThan(Long value) { + addCriterion("updated_by >", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThanOrEqualTo(Long value) { + addCriterion("updated_by >=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThan(Long value) { + addCriterion("updated_by <", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThanOrEqualTo(Long value) { + addCriterion("updated_by <=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByIn(List values) { + addCriterion("updated_by in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotIn(List values) { + addCriterion("updated_by not in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByBetween(Long value1, Long value2) { + addCriterion("updated_by between", value1, value2, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotBetween(Long value1, Long value2) { + addCriterion("updated_by not between", value1, value2, "updatedBy"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_print_config + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_print_config + * + * @mbg.generated + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigTpl.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigTpl.java new file mode 100644 index 000000000..1a0e6723a --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigTpl.java @@ -0,0 +1,141 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.io.Serializable; +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +/** + * + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_print_config_tpl + */ +@Getter +@Setter +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class FormPrintConfigTpl implements Serializable { + /** + * Database Column Remarks: + * 主键ID + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config_tpl.id + * + * @mbg.generated + */ + private Long id; + + /** + * Database Column Remarks: + * 表单打印配置 ID + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config_tpl.form_print_config_id + * + * @mbg.generated + */ + private Long formPrintConfigId; + + /** + * Database Column Remarks: + * 模板文件url + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config_tpl.file_url + * + * @mbg.generated + */ + private String fileUrl; + + /** + * Database Column Remarks: + * 文件类型:doc、excel + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config_tpl.file_type + * + * @mbg.generated + */ + private String fileType; + + /** + * Database Column Remarks: + * file_wps_id + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config_tpl.file_wps_id + * + * @mbg.generated + */ + private String fileWpsId; + + /** + * Database Column Remarks: + * 创建人 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config_tpl.created_by + * + * @mbg.generated + */ + private Long createdBy; + + /** + * Database Column Remarks: + * 更新人 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config_tpl.updated_by + * + * @mbg.generated + */ + private Long updatedBy; + + /** + * Database Column Remarks: + * 创建时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config_tpl.create_time + * + * @mbg.generated + */ + private Date createTime; + + /** + * Database Column Remarks: + * 更新时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config_tpl.update_time + * + * @mbg.generated + */ + private Date updateTime; + + /** + * Database Column Remarks: + * 是否删除(0:否,1:是) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config_tpl.deleted + * + * @mbg.generated + */ + private Integer deleted; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigTplExample.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigTplExample.java new file mode 100644 index 000000000..b5ce52a51 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigTplExample.java @@ -0,0 +1,932 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class FormPrintConfigTplExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + public FormPrintConfigTplExample() { + oredCriteria = new ArrayList<>(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andFormPrintConfigIdIsNull() { + addCriterion("form_print_config_id is null"); + return (Criteria) this; + } + + public Criteria andFormPrintConfigIdIsNotNull() { + addCriterion("form_print_config_id is not null"); + return (Criteria) this; + } + + public Criteria andFormPrintConfigIdEqualTo(Long value) { + addCriterion("form_print_config_id =", value, "formPrintConfigId"); + return (Criteria) this; + } + + public Criteria andFormPrintConfigIdNotEqualTo(Long value) { + addCriterion("form_print_config_id <>", value, "formPrintConfigId"); + return (Criteria) this; + } + + public Criteria andFormPrintConfigIdGreaterThan(Long value) { + addCriterion("form_print_config_id >", value, "formPrintConfigId"); + return (Criteria) this; + } + + public Criteria andFormPrintConfigIdGreaterThanOrEqualTo(Long value) { + addCriterion("form_print_config_id >=", value, "formPrintConfigId"); + return (Criteria) this; + } + + public Criteria andFormPrintConfigIdLessThan(Long value) { + addCriterion("form_print_config_id <", value, "formPrintConfigId"); + return (Criteria) this; + } + + public Criteria andFormPrintConfigIdLessThanOrEqualTo(Long value) { + addCriterion("form_print_config_id <=", value, "formPrintConfigId"); + return (Criteria) this; + } + + public Criteria andFormPrintConfigIdIn(List values) { + addCriterion("form_print_config_id in", values, "formPrintConfigId"); + return (Criteria) this; + } + + public Criteria andFormPrintConfigIdNotIn(List values) { + addCriterion("form_print_config_id not in", values, "formPrintConfigId"); + return (Criteria) this; + } + + public Criteria andFormPrintConfigIdBetween(Long value1, Long value2) { + addCriterion("form_print_config_id between", value1, value2, "formPrintConfigId"); + return (Criteria) this; + } + + public Criteria andFormPrintConfigIdNotBetween(Long value1, Long value2) { + addCriterion("form_print_config_id not between", value1, value2, "formPrintConfigId"); + return (Criteria) this; + } + + public Criteria andFileUrlIsNull() { + addCriterion("file_url is null"); + return (Criteria) this; + } + + public Criteria andFileUrlIsNotNull() { + addCriterion("file_url is not null"); + return (Criteria) this; + } + + public Criteria andFileUrlEqualTo(String value) { + addCriterion("file_url =", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotEqualTo(String value) { + addCriterion("file_url <>", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlGreaterThan(String value) { + addCriterion("file_url >", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlGreaterThanOrEqualTo(String value) { + addCriterion("file_url >=", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlLessThan(String value) { + addCriterion("file_url <", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlLessThanOrEqualTo(String value) { + addCriterion("file_url <=", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlLike(String value) { + addCriterion("file_url like", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotLike(String value) { + addCriterion("file_url not like", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlIn(List values) { + addCriterion("file_url in", values, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotIn(List values) { + addCriterion("file_url not in", values, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlBetween(String value1, String value2) { + addCriterion("file_url between", value1, value2, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotBetween(String value1, String value2) { + addCriterion("file_url not between", value1, value2, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileTypeIsNull() { + addCriterion("file_type is null"); + return (Criteria) this; + } + + public Criteria andFileTypeIsNotNull() { + addCriterion("file_type is not null"); + return (Criteria) this; + } + + public Criteria andFileTypeEqualTo(String value) { + addCriterion("file_type =", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeNotEqualTo(String value) { + addCriterion("file_type <>", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeGreaterThan(String value) { + addCriterion("file_type >", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeGreaterThanOrEqualTo(String value) { + addCriterion("file_type >=", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeLessThan(String value) { + addCriterion("file_type <", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeLessThanOrEqualTo(String value) { + addCriterion("file_type <=", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeLike(String value) { + addCriterion("file_type like", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeNotLike(String value) { + addCriterion("file_type not like", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeIn(List values) { + addCriterion("file_type in", values, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeNotIn(List values) { + addCriterion("file_type not in", values, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeBetween(String value1, String value2) { + addCriterion("file_type between", value1, value2, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeNotBetween(String value1, String value2) { + addCriterion("file_type not between", value1, value2, "fileType"); + return (Criteria) this; + } + + public Criteria andFileWpsIdIsNull() { + addCriterion("file_wps_id is null"); + return (Criteria) this; + } + + public Criteria andFileWpsIdIsNotNull() { + addCriterion("file_wps_id is not null"); + return (Criteria) this; + } + + public Criteria andFileWpsIdEqualTo(String value) { + addCriterion("file_wps_id =", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdNotEqualTo(String value) { + addCriterion("file_wps_id <>", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdGreaterThan(String value) { + addCriterion("file_wps_id >", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdGreaterThanOrEqualTo(String value) { + addCriterion("file_wps_id >=", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdLessThan(String value) { + addCriterion("file_wps_id <", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdLessThanOrEqualTo(String value) { + addCriterion("file_wps_id <=", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdLike(String value) { + addCriterion("file_wps_id like", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdNotLike(String value) { + addCriterion("file_wps_id not like", value, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdIn(List values) { + addCriterion("file_wps_id in", values, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdNotIn(List values) { + addCriterion("file_wps_id not in", values, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdBetween(String value1, String value2) { + addCriterion("file_wps_id between", value1, value2, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andFileWpsIdNotBetween(String value1, String value2) { + addCriterion("file_wps_id not between", value1, value2, "fileWpsId"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNull() { + addCriterion("created_by is null"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNotNull() { + addCriterion("created_by is not null"); + return (Criteria) this; + } + + public Criteria andCreatedByEqualTo(Long value) { + addCriterion("created_by =", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotEqualTo(Long value) { + addCriterion("created_by <>", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThan(Long value) { + addCriterion("created_by >", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThanOrEqualTo(Long value) { + addCriterion("created_by >=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThan(Long value) { + addCriterion("created_by <", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThanOrEqualTo(Long value) { + addCriterion("created_by <=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByIn(List values) { + addCriterion("created_by in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotIn(List values) { + addCriterion("created_by not in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByBetween(Long value1, Long value2) { + addCriterion("created_by between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotBetween(Long value1, Long value2) { + addCriterion("created_by not between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNull() { + addCriterion("updated_by is null"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNotNull() { + addCriterion("updated_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedByEqualTo(Long value) { + addCriterion("updated_by =", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotEqualTo(Long value) { + addCriterion("updated_by <>", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThan(Long value) { + addCriterion("updated_by >", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThanOrEqualTo(Long value) { + addCriterion("updated_by >=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThan(Long value) { + addCriterion("updated_by <", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThanOrEqualTo(Long value) { + addCriterion("updated_by <=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByIn(List values) { + addCriterion("updated_by in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotIn(List values) { + addCriterion("updated_by not in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByBetween(Long value1, Long value2) { + addCriterion("updated_by between", value1, value2, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotBetween(Long value1, Long value2) { + addCriterion("updated_by not between", value1, value2, "updatedBy"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andDeletedIsNull() { + addCriterion("deleted is null"); + return (Criteria) this; + } + + public Criteria andDeletedIsNotNull() { + addCriterion("deleted is not null"); + return (Criteria) this; + } + + public Criteria andDeletedEqualTo(Integer value) { + addCriterion("deleted =", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotEqualTo(Integer value) { + addCriterion("deleted <>", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedGreaterThan(Integer value) { + addCriterion("deleted >", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedGreaterThanOrEqualTo(Integer value) { + addCriterion("deleted >=", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedLessThan(Integer value) { + addCriterion("deleted <", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedLessThanOrEqualTo(Integer value) { + addCriterion("deleted <=", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedIn(List values) { + addCriterion("deleted in", values, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotIn(List values) { + addCriterion("deleted not in", values, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedBetween(Integer value1, Integer value2) { + addCriterion("deleted between", value1, value2, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotBetween(Integer value1, Integer value2) { + addCriterion("deleted not between", value1, value2, "deleted"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_print_config_tpl + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigWithBLOBs.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigWithBLOBs.java new file mode 100644 index 000000000..85f557053 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormPrintConfigWithBLOBs.java @@ -0,0 +1,47 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import lombok.*; + +import java.io.Serializable; + +/** + * + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_print_config + */ +@Getter +@Setter +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class FormPrintConfigWithBLOBs extends FormPrintConfig implements Serializable { + /** + * Database Column Remarks: + * 打印字段 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.print_fields + * + * @mbg.generated + */ + private String printFields; + + /** + * Database Column Remarks: + * 扩展属性(JSON格式) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_print_config.ext + * + * @mbg.generated + */ + private String ext; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_print_config + * + * @mbg.generated + */ + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplate.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplate.java new file mode 100644 index 000000000..41b525700 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplate.java @@ -0,0 +1,119 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.io.Serializable; +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +/** + * + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_template + */ +@Getter +@Setter +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class FormTemplate implements Serializable { + /** + * Database Column Remarks: + * 主键ID + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template.id + * + * @mbg.generated + */ + private Long id; + + /** + * Database Column Remarks: + * form id + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template.form_id + * + * @mbg.generated + */ + private Long formId; + + /** + * Database Column Remarks: + * 版本 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template.version + * + * @mbg.generated + */ + private Integer version; + + /** + * Database Column Remarks: + * 内容编码,保存时和上次的编码是否一致,一致时则不进行更新 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template.content_encoding + * + * @mbg.generated + */ + private String contentEncoding; + + /** + * Database Column Remarks: + * 创建人 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template.created_by + * + * @mbg.generated + */ + private Long createdBy; + + /** + * Database Column Remarks: + * 更新人 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template.updated_by + * + * @mbg.generated + */ + private Long updatedBy; + + /** + * Database Column Remarks: + * 创建时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template.create_time + * + * @mbg.generated + */ + private Date createTime; + + /** + * Database Column Remarks: + * 更新时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template.update_time + * + * @mbg.generated + */ + private Date updateTime; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_template + * + * @mbg.generated + */ + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplateExample.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplateExample.java new file mode 100644 index 000000000..e194783b6 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplateExample.java @@ -0,0 +1,792 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class FormTemplateExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_template + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_template + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_template + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + public FormTemplateExample() { + oredCriteria = new ArrayList<>(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_template + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andFormIdIsNull() { + addCriterion("form_id is null"); + return (Criteria) this; + } + + public Criteria andFormIdIsNotNull() { + addCriterion("form_id is not null"); + return (Criteria) this; + } + + public Criteria andFormIdEqualTo(Long value) { + addCriterion("form_id =", value, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdNotEqualTo(Long value) { + addCriterion("form_id <>", value, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdGreaterThan(Long value) { + addCriterion("form_id >", value, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdGreaterThanOrEqualTo(Long value) { + addCriterion("form_id >=", value, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdLessThan(Long value) { + addCriterion("form_id <", value, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdLessThanOrEqualTo(Long value) { + addCriterion("form_id <=", value, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdIn(List values) { + addCriterion("form_id in", values, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdNotIn(List values) { + addCriterion("form_id not in", values, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdBetween(Long value1, Long value2) { + addCriterion("form_id between", value1, value2, "formId"); + return (Criteria) this; + } + + public Criteria andFormIdNotBetween(Long value1, Long value2) { + addCriterion("form_id not between", value1, value2, "formId"); + return (Criteria) this; + } + + public Criteria andVersionIsNull() { + addCriterion("version is null"); + return (Criteria) this; + } + + public Criteria andVersionIsNotNull() { + addCriterion("version is not null"); + return (Criteria) this; + } + + public Criteria andVersionEqualTo(Integer value) { + addCriterion("version =", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotEqualTo(Integer value) { + addCriterion("version <>", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionGreaterThan(Integer value) { + addCriterion("version >", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionGreaterThanOrEqualTo(Integer value) { + addCriterion("version >=", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLessThan(Integer value) { + addCriterion("version <", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLessThanOrEqualTo(Integer value) { + addCriterion("version <=", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionIn(List values) { + addCriterion("version in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotIn(List values) { + addCriterion("version not in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionBetween(Integer value1, Integer value2) { + addCriterion("version between", value1, value2, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotBetween(Integer value1, Integer value2) { + addCriterion("version not between", value1, value2, "version"); + return (Criteria) this; + } + + public Criteria andContentEncodingIsNull() { + addCriterion("content_encoding is null"); + return (Criteria) this; + } + + public Criteria andContentEncodingIsNotNull() { + addCriterion("content_encoding is not null"); + return (Criteria) this; + } + + public Criteria andContentEncodingEqualTo(String value) { + addCriterion("content_encoding =", value, "contentEncoding"); + return (Criteria) this; + } + + public Criteria andContentEncodingNotEqualTo(String value) { + addCriterion("content_encoding <>", value, "contentEncoding"); + return (Criteria) this; + } + + public Criteria andContentEncodingGreaterThan(String value) { + addCriterion("content_encoding >", value, "contentEncoding"); + return (Criteria) this; + } + + public Criteria andContentEncodingGreaterThanOrEqualTo(String value) { + addCriterion("content_encoding >=", value, "contentEncoding"); + return (Criteria) this; + } + + public Criteria andContentEncodingLessThan(String value) { + addCriterion("content_encoding <", value, "contentEncoding"); + return (Criteria) this; + } + + public Criteria andContentEncodingLessThanOrEqualTo(String value) { + addCriterion("content_encoding <=", value, "contentEncoding"); + return (Criteria) this; + } + + public Criteria andContentEncodingLike(String value) { + addCriterion("content_encoding like", value, "contentEncoding"); + return (Criteria) this; + } + + public Criteria andContentEncodingNotLike(String value) { + addCriterion("content_encoding not like", value, "contentEncoding"); + return (Criteria) this; + } + + public Criteria andContentEncodingIn(List values) { + addCriterion("content_encoding in", values, "contentEncoding"); + return (Criteria) this; + } + + public Criteria andContentEncodingNotIn(List values) { + addCriterion("content_encoding not in", values, "contentEncoding"); + return (Criteria) this; + } + + public Criteria andContentEncodingBetween(String value1, String value2) { + addCriterion("content_encoding between", value1, value2, "contentEncoding"); + return (Criteria) this; + } + + public Criteria andContentEncodingNotBetween(String value1, String value2) { + addCriterion("content_encoding not between", value1, value2, "contentEncoding"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNull() { + addCriterion("created_by is null"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNotNull() { + addCriterion("created_by is not null"); + return (Criteria) this; + } + + public Criteria andCreatedByEqualTo(Long value) { + addCriterion("created_by =", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotEqualTo(Long value) { + addCriterion("created_by <>", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThan(Long value) { + addCriterion("created_by >", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThanOrEqualTo(Long value) { + addCriterion("created_by >=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThan(Long value) { + addCriterion("created_by <", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThanOrEqualTo(Long value) { + addCriterion("created_by <=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByIn(List values) { + addCriterion("created_by in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotIn(List values) { + addCriterion("created_by not in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByBetween(Long value1, Long value2) { + addCriterion("created_by between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotBetween(Long value1, Long value2) { + addCriterion("created_by not between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNull() { + addCriterion("updated_by is null"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNotNull() { + addCriterion("updated_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedByEqualTo(Long value) { + addCriterion("updated_by =", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotEqualTo(Long value) { + addCriterion("updated_by <>", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThan(Long value) { + addCriterion("updated_by >", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThanOrEqualTo(Long value) { + addCriterion("updated_by >=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThan(Long value) { + addCriterion("updated_by <", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThanOrEqualTo(Long value) { + addCriterion("updated_by <=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByIn(List values) { + addCriterion("updated_by in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotIn(List values) { + addCriterion("updated_by not in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByBetween(Long value1, Long value2) { + addCriterion("updated_by between", value1, value2, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotBetween(Long value1, Long value2) { + addCriterion("updated_by not between", value1, value2, "updatedBy"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_template + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_template + * + * @mbg.generated + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplateField.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplateField.java new file mode 100644 index 000000000..4e6ed1156 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplateField.java @@ -0,0 +1,317 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.io.Serializable; +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +/** + * + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_template_field + */ +@Getter +@Setter +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class FormTemplateField implements Serializable { + /** + * Database Column Remarks: + * 主键ID + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.id + * + * @mbg.generated + */ + private Long id; + + /** + * Database Column Remarks: + * form_template 的id + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.template_id + * + * @mbg.generated + */ + private Long templateId; + + /** + * Database Column Remarks: + * 编码 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.code + * + * @mbg.generated + */ + private String code; + + /** + * Database Column Remarks: + * 父id + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.parent_id + * + * @mbg.generated + */ + private Long parentId; + + /** + * Database Column Remarks: + * 标题 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.title + * + * @mbg.generated + */ + private String title; + + /** + * Database Column Remarks: + * show标题 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.show_title + * + * @mbg.generated + */ + private String showTitle; + + /** + * Database Column Remarks: + * 数据库中关联字段(目前用作流程流转时数据判断) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.db_field + * + * @mbg.generated + */ + private String dbField; + + /** + * Database Column Remarks: + * 是否必填 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.required + * + * @mbg.generated + */ + private Boolean required; + + /** + * Database Column Remarks: + * 是否显示 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.show + * + * @mbg.generated + */ + private Boolean show; + + /** + * Database Column Remarks: + * 字典code + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.dcode + * + * @mbg.generated + */ + private String dcode; + + /** + * Database Column Remarks: + * 占行数量(0-不占一行,其他-占的行数) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.line + * + * @mbg.generated + */ + private Integer line; + + /** + * Database Column Remarks: + * 字段类型(group、string...) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.type + * + * @mbg.generated + */ + private String type; + + /** + * Database Column Remarks: + * 固定(0不固定,1固定) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.fixed + * + * @mbg.generated + */ + private Boolean fixed; + + /** + * Database Column Remarks: + * 格式约束:int、double、str、boolean、date、select(下拉选择) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.fmt_constraint + * + * @mbg.generated + */ + private String fmtConstraint; + + /** + * Database Column Remarks: + * 是否可编辑 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.edit + * + * @mbg.generated + */ + private Boolean edit; + + /** + * Database Column Remarks: + * 排序 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.sort_order + * + * @mbg.generated + */ + private Integer sortOrder; + + /** + * Database Column Remarks: + * 级联显示关 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.cascade_close + * + * @mbg.generated + */ + private String cascadeClose; + + /** + * Database Column Remarks: + * 级联显示开 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.cascade_open + * + * @mbg.generated + */ + private String cascadeOpen; + + /** + * Database Column Remarks: + * 可编辑按钮禁用提示 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.edit_disabled_msg + * + * @mbg.generated + */ + private String editDisabledMsg; + + /** + * Database Column Remarks: + * 可编辑按钮禁用 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.edit_disabled + * + * @mbg.generated + */ + private Boolean editDisabled; + + /** + * Database Column Remarks: + * 字典级联显示 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.show_cascade + * + * @mbg.generated + */ + private String showCascade; + + /** + * Database Column Remarks: + * 创建人 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.created_by + * + * @mbg.generated + */ + private Long createdBy; + + /** + * Database Column Remarks: + * 更新人 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.updated_by + * + * @mbg.generated + */ + private Long updatedBy; + + /** + * Database Column Remarks: + * 创建时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.create_time + * + * @mbg.generated + */ + private Date createTime; + + /** + * Database Column Remarks: + * 更新时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.update_time + * + * @mbg.generated + */ + private Date updateTime; + + /** + * Database Column Remarks: + * 扩展属性(JSON格式) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column form_template_field.ext + * + * @mbg.generated + */ + private String ext; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_template_field + * + * @mbg.generated + */ + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplateFieldExample.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplateFieldExample.java new file mode 100644 index 000000000..df3266137 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/FormTemplateFieldExample.java @@ -0,0 +1,1912 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class FormTemplateFieldExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_template_field + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_template_field + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table form_template_field + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + public FormTemplateFieldExample() { + oredCriteria = new ArrayList<>(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_template_field + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTemplateIdIsNull() { + addCriterion("template_id is null"); + return (Criteria) this; + } + + public Criteria andTemplateIdIsNotNull() { + addCriterion("template_id is not null"); + return (Criteria) this; + } + + public Criteria andTemplateIdEqualTo(Long value) { + addCriterion("template_id =", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotEqualTo(Long value) { + addCriterion("template_id <>", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdGreaterThan(Long value) { + addCriterion("template_id >", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdGreaterThanOrEqualTo(Long value) { + addCriterion("template_id >=", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdLessThan(Long value) { + addCriterion("template_id <", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdLessThanOrEqualTo(Long value) { + addCriterion("template_id <=", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdIn(List values) { + addCriterion("template_id in", values, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotIn(List values) { + addCriterion("template_id not in", values, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdBetween(Long value1, Long value2) { + addCriterion("template_id between", value1, value2, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotBetween(Long value1, Long value2) { + addCriterion("template_id not between", value1, value2, "templateId"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(Long value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(Long value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(Long value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(Long value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(Long value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(Long value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(Long value1, Long value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(Long value1, Long value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andTitleIsNull() { + addCriterion("title is null"); + return (Criteria) this; + } + + public Criteria andTitleIsNotNull() { + addCriterion("title is not null"); + return (Criteria) this; + } + + public Criteria andTitleEqualTo(String value) { + addCriterion("title =", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotEqualTo(String value) { + addCriterion("title <>", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThan(String value) { + addCriterion("title >", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThanOrEqualTo(String value) { + addCriterion("title >=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThan(String value) { + addCriterion("title <", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThanOrEqualTo(String value) { + addCriterion("title <=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLike(String value) { + addCriterion("title like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotLike(String value) { + addCriterion("title not like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleIn(List values) { + addCriterion("title in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotIn(List values) { + addCriterion("title not in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleBetween(String value1, String value2) { + addCriterion("title between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotBetween(String value1, String value2) { + addCriterion("title not between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andShowTitleIsNull() { + addCriterion("show_title is null"); + return (Criteria) this; + } + + public Criteria andShowTitleIsNotNull() { + addCriterion("show_title is not null"); + return (Criteria) this; + } + + public Criteria andShowTitleEqualTo(String value) { + addCriterion("show_title =", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleNotEqualTo(String value) { + addCriterion("show_title <>", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleGreaterThan(String value) { + addCriterion("show_title >", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleGreaterThanOrEqualTo(String value) { + addCriterion("show_title >=", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleLessThan(String value) { + addCriterion("show_title <", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleLessThanOrEqualTo(String value) { + addCriterion("show_title <=", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleLike(String value) { + addCriterion("show_title like", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleNotLike(String value) { + addCriterion("show_title not like", value, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleIn(List values) { + addCriterion("show_title in", values, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleNotIn(List values) { + addCriterion("show_title not in", values, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleBetween(String value1, String value2) { + addCriterion("show_title between", value1, value2, "showTitle"); + return (Criteria) this; + } + + public Criteria andShowTitleNotBetween(String value1, String value2) { + addCriterion("show_title not between", value1, value2, "showTitle"); + return (Criteria) this; + } + + public Criteria andDbFieldIsNull() { + addCriterion("db_field is null"); + return (Criteria) this; + } + + public Criteria andDbFieldIsNotNull() { + addCriterion("db_field is not null"); + return (Criteria) this; + } + + public Criteria andDbFieldEqualTo(String value) { + addCriterion("db_field =", value, "dbField"); + return (Criteria) this; + } + + public Criteria andDbFieldNotEqualTo(String value) { + addCriterion("db_field <>", value, "dbField"); + return (Criteria) this; + } + + public Criteria andDbFieldGreaterThan(String value) { + addCriterion("db_field >", value, "dbField"); + return (Criteria) this; + } + + public Criteria andDbFieldGreaterThanOrEqualTo(String value) { + addCriterion("db_field >=", value, "dbField"); + return (Criteria) this; + } + + public Criteria andDbFieldLessThan(String value) { + addCriterion("db_field <", value, "dbField"); + return (Criteria) this; + } + + public Criteria andDbFieldLessThanOrEqualTo(String value) { + addCriterion("db_field <=", value, "dbField"); + return (Criteria) this; + } + + public Criteria andDbFieldLike(String value) { + addCriterion("db_field like", value, "dbField"); + return (Criteria) this; + } + + public Criteria andDbFieldNotLike(String value) { + addCriterion("db_field not like", value, "dbField"); + return (Criteria) this; + } + + public Criteria andDbFieldIn(List values) { + addCriterion("db_field in", values, "dbField"); + return (Criteria) this; + } + + public Criteria andDbFieldNotIn(List values) { + addCriterion("db_field not in", values, "dbField"); + return (Criteria) this; + } + + public Criteria andDbFieldBetween(String value1, String value2) { + addCriterion("db_field between", value1, value2, "dbField"); + return (Criteria) this; + } + + public Criteria andDbFieldNotBetween(String value1, String value2) { + addCriterion("db_field not between", value1, value2, "dbField"); + return (Criteria) this; + } + + public Criteria andRequiredIsNull() { + addCriterion("required is null"); + return (Criteria) this; + } + + public Criteria andRequiredIsNotNull() { + addCriterion("required is not null"); + return (Criteria) this; + } + + public Criteria andRequiredEqualTo(Boolean value) { + addCriterion("required =", value, "required"); + return (Criteria) this; + } + + public Criteria andRequiredNotEqualTo(Boolean value) { + addCriterion("required <>", value, "required"); + return (Criteria) this; + } + + public Criteria andRequiredGreaterThan(Boolean value) { + addCriterion("required >", value, "required"); + return (Criteria) this; + } + + public Criteria andRequiredGreaterThanOrEqualTo(Boolean value) { + addCriterion("required >=", value, "required"); + return (Criteria) this; + } + + public Criteria andRequiredLessThan(Boolean value) { + addCriterion("required <", value, "required"); + return (Criteria) this; + } + + public Criteria andRequiredLessThanOrEqualTo(Boolean value) { + addCriterion("required <=", value, "required"); + return (Criteria) this; + } + + public Criteria andRequiredIn(List values) { + addCriterion("required in", values, "required"); + return (Criteria) this; + } + + public Criteria andRequiredNotIn(List values) { + addCriterion("required not in", values, "required"); + return (Criteria) this; + } + + public Criteria andRequiredBetween(Boolean value1, Boolean value2) { + addCriterion("required between", value1, value2, "required"); + return (Criteria) this; + } + + public Criteria andRequiredNotBetween(Boolean value1, Boolean value2) { + addCriterion("required not between", value1, value2, "required"); + return (Criteria) this; + } + + public Criteria andShowIsNull() { + addCriterion("`show` is null"); + return (Criteria) this; + } + + public Criteria andShowIsNotNull() { + addCriterion("`show` is not null"); + return (Criteria) this; + } + + public Criteria andShowEqualTo(Boolean value) { + addCriterion("`show` =", value, "show"); + return (Criteria) this; + } + + public Criteria andShowNotEqualTo(Boolean value) { + addCriterion("`show` <>", value, "show"); + return (Criteria) this; + } + + public Criteria andShowGreaterThan(Boolean value) { + addCriterion("`show` >", value, "show"); + return (Criteria) this; + } + + public Criteria andShowGreaterThanOrEqualTo(Boolean value) { + addCriterion("`show` >=", value, "show"); + return (Criteria) this; + } + + public Criteria andShowLessThan(Boolean value) { + addCriterion("`show` <", value, "show"); + return (Criteria) this; + } + + public Criteria andShowLessThanOrEqualTo(Boolean value) { + addCriterion("`show` <=", value, "show"); + return (Criteria) this; + } + + public Criteria andShowIn(List values) { + addCriterion("`show` in", values, "show"); + return (Criteria) this; + } + + public Criteria andShowNotIn(List values) { + addCriterion("`show` not in", values, "show"); + return (Criteria) this; + } + + public Criteria andShowBetween(Boolean value1, Boolean value2) { + addCriterion("`show` between", value1, value2, "show"); + return (Criteria) this; + } + + public Criteria andShowNotBetween(Boolean value1, Boolean value2) { + addCriterion("`show` not between", value1, value2, "show"); + return (Criteria) this; + } + + public Criteria andDcodeIsNull() { + addCriterion("dcode is null"); + return (Criteria) this; + } + + public Criteria andDcodeIsNotNull() { + addCriterion("dcode is not null"); + return (Criteria) this; + } + + public Criteria andDcodeEqualTo(String value) { + addCriterion("dcode =", value, "dcode"); + return (Criteria) this; + } + + public Criteria andDcodeNotEqualTo(String value) { + addCriterion("dcode <>", value, "dcode"); + return (Criteria) this; + } + + public Criteria andDcodeGreaterThan(String value) { + addCriterion("dcode >", value, "dcode"); + return (Criteria) this; + } + + public Criteria andDcodeGreaterThanOrEqualTo(String value) { + addCriterion("dcode >=", value, "dcode"); + return (Criteria) this; + } + + public Criteria andDcodeLessThan(String value) { + addCriterion("dcode <", value, "dcode"); + return (Criteria) this; + } + + public Criteria andDcodeLessThanOrEqualTo(String value) { + addCriterion("dcode <=", value, "dcode"); + return (Criteria) this; + } + + public Criteria andDcodeLike(String value) { + addCriterion("dcode like", value, "dcode"); + return (Criteria) this; + } + + public Criteria andDcodeNotLike(String value) { + addCriterion("dcode not like", value, "dcode"); + return (Criteria) this; + } + + public Criteria andDcodeIn(List values) { + addCriterion("dcode in", values, "dcode"); + return (Criteria) this; + } + + public Criteria andDcodeNotIn(List values) { + addCriterion("dcode not in", values, "dcode"); + return (Criteria) this; + } + + public Criteria andDcodeBetween(String value1, String value2) { + addCriterion("dcode between", value1, value2, "dcode"); + return (Criteria) this; + } + + public Criteria andDcodeNotBetween(String value1, String value2) { + addCriterion("dcode not between", value1, value2, "dcode"); + return (Criteria) this; + } + + public Criteria andLineIsNull() { + addCriterion("line is null"); + return (Criteria) this; + } + + public Criteria andLineIsNotNull() { + addCriterion("line is not null"); + return (Criteria) this; + } + + public Criteria andLineEqualTo(Integer value) { + addCriterion("line =", value, "line"); + return (Criteria) this; + } + + public Criteria andLineNotEqualTo(Integer value) { + addCriterion("line <>", value, "line"); + return (Criteria) this; + } + + public Criteria andLineGreaterThan(Integer value) { + addCriterion("line >", value, "line"); + return (Criteria) this; + } + + public Criteria andLineGreaterThanOrEqualTo(Integer value) { + addCriterion("line >=", value, "line"); + return (Criteria) this; + } + + public Criteria andLineLessThan(Integer value) { + addCriterion("line <", value, "line"); + return (Criteria) this; + } + + public Criteria andLineLessThanOrEqualTo(Integer value) { + addCriterion("line <=", value, "line"); + return (Criteria) this; + } + + public Criteria andLineIn(List values) { + addCriterion("line in", values, "line"); + return (Criteria) this; + } + + public Criteria andLineNotIn(List values) { + addCriterion("line not in", values, "line"); + return (Criteria) this; + } + + public Criteria andLineBetween(Integer value1, Integer value2) { + addCriterion("line between", value1, value2, "line"); + return (Criteria) this; + } + + public Criteria andLineNotBetween(Integer value1, Integer value2) { + addCriterion("line not between", value1, value2, "line"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andFixedIsNull() { + addCriterion("fixed is null"); + return (Criteria) this; + } + + public Criteria andFixedIsNotNull() { + addCriterion("fixed is not null"); + return (Criteria) this; + } + + public Criteria andFixedEqualTo(Boolean value) { + addCriterion("fixed =", value, "fixed"); + return (Criteria) this; + } + + public Criteria andFixedNotEqualTo(Boolean value) { + addCriterion("fixed <>", value, "fixed"); + return (Criteria) this; + } + + public Criteria andFixedGreaterThan(Boolean value) { + addCriterion("fixed >", value, "fixed"); + return (Criteria) this; + } + + public Criteria andFixedGreaterThanOrEqualTo(Boolean value) { + addCriterion("fixed >=", value, "fixed"); + return (Criteria) this; + } + + public Criteria andFixedLessThan(Boolean value) { + addCriterion("fixed <", value, "fixed"); + return (Criteria) this; + } + + public Criteria andFixedLessThanOrEqualTo(Boolean value) { + addCriterion("fixed <=", value, "fixed"); + return (Criteria) this; + } + + public Criteria andFixedIn(List values) { + addCriterion("fixed in", values, "fixed"); + return (Criteria) this; + } + + public Criteria andFixedNotIn(List values) { + addCriterion("fixed not in", values, "fixed"); + return (Criteria) this; + } + + public Criteria andFixedBetween(Boolean value1, Boolean value2) { + addCriterion("fixed between", value1, value2, "fixed"); + return (Criteria) this; + } + + public Criteria andFixedNotBetween(Boolean value1, Boolean value2) { + addCriterion("fixed not between", value1, value2, "fixed"); + return (Criteria) this; + } + + public Criteria andFmtConstraintIsNull() { + addCriterion("fmt_constraint is null"); + return (Criteria) this; + } + + public Criteria andFmtConstraintIsNotNull() { + addCriterion("fmt_constraint is not null"); + return (Criteria) this; + } + + public Criteria andFmtConstraintEqualTo(String value) { + addCriterion("fmt_constraint =", value, "fmtConstraint"); + return (Criteria) this; + } + + public Criteria andFmtConstraintNotEqualTo(String value) { + addCriterion("fmt_constraint <>", value, "fmtConstraint"); + return (Criteria) this; + } + + public Criteria andFmtConstraintGreaterThan(String value) { + addCriterion("fmt_constraint >", value, "fmtConstraint"); + return (Criteria) this; + } + + public Criteria andFmtConstraintGreaterThanOrEqualTo(String value) { + addCriterion("fmt_constraint >=", value, "fmtConstraint"); + return (Criteria) this; + } + + public Criteria andFmtConstraintLessThan(String value) { + addCriterion("fmt_constraint <", value, "fmtConstraint"); + return (Criteria) this; + } + + public Criteria andFmtConstraintLessThanOrEqualTo(String value) { + addCriterion("fmt_constraint <=", value, "fmtConstraint"); + return (Criteria) this; + } + + public Criteria andFmtConstraintLike(String value) { + addCriterion("fmt_constraint like", value, "fmtConstraint"); + return (Criteria) this; + } + + public Criteria andFmtConstraintNotLike(String value) { + addCriterion("fmt_constraint not like", value, "fmtConstraint"); + return (Criteria) this; + } + + public Criteria andFmtConstraintIn(List values) { + addCriterion("fmt_constraint in", values, "fmtConstraint"); + return (Criteria) this; + } + + public Criteria andFmtConstraintNotIn(List values) { + addCriterion("fmt_constraint not in", values, "fmtConstraint"); + return (Criteria) this; + } + + public Criteria andFmtConstraintBetween(String value1, String value2) { + addCriterion("fmt_constraint between", value1, value2, "fmtConstraint"); + return (Criteria) this; + } + + public Criteria andFmtConstraintNotBetween(String value1, String value2) { + addCriterion("fmt_constraint not between", value1, value2, "fmtConstraint"); + return (Criteria) this; + } + + public Criteria andEditIsNull() { + addCriterion("edit is null"); + return (Criteria) this; + } + + public Criteria andEditIsNotNull() { + addCriterion("edit is not null"); + return (Criteria) this; + } + + public Criteria andEditEqualTo(Boolean value) { + addCriterion("edit =", value, "edit"); + return (Criteria) this; + } + + public Criteria andEditNotEqualTo(Boolean value) { + addCriterion("edit <>", value, "edit"); + return (Criteria) this; + } + + public Criteria andEditGreaterThan(Boolean value) { + addCriterion("edit >", value, "edit"); + return (Criteria) this; + } + + public Criteria andEditGreaterThanOrEqualTo(Boolean value) { + addCriterion("edit >=", value, "edit"); + return (Criteria) this; + } + + public Criteria andEditLessThan(Boolean value) { + addCriterion("edit <", value, "edit"); + return (Criteria) this; + } + + public Criteria andEditLessThanOrEqualTo(Boolean value) { + addCriterion("edit <=", value, "edit"); + return (Criteria) this; + } + + public Criteria andEditIn(List values) { + addCriterion("edit in", values, "edit"); + return (Criteria) this; + } + + public Criteria andEditNotIn(List values) { + addCriterion("edit not in", values, "edit"); + return (Criteria) this; + } + + public Criteria andEditBetween(Boolean value1, Boolean value2) { + addCriterion("edit between", value1, value2, "edit"); + return (Criteria) this; + } + + public Criteria andEditNotBetween(Boolean value1, Boolean value2) { + addCriterion("edit not between", value1, value2, "edit"); + return (Criteria) this; + } + + public Criteria andSortOrderIsNull() { + addCriterion("sort_order is null"); + return (Criteria) this; + } + + public Criteria andSortOrderIsNotNull() { + addCriterion("sort_order is not null"); + return (Criteria) this; + } + + public Criteria andSortOrderEqualTo(Integer value) { + addCriterion("sort_order =", value, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderNotEqualTo(Integer value) { + addCriterion("sort_order <>", value, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderGreaterThan(Integer value) { + addCriterion("sort_order >", value, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderGreaterThanOrEqualTo(Integer value) { + addCriterion("sort_order >=", value, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderLessThan(Integer value) { + addCriterion("sort_order <", value, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderLessThanOrEqualTo(Integer value) { + addCriterion("sort_order <=", value, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderIn(List values) { + addCriterion("sort_order in", values, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderNotIn(List values) { + addCriterion("sort_order not in", values, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderBetween(Integer value1, Integer value2) { + addCriterion("sort_order between", value1, value2, "sortOrder"); + return (Criteria) this; + } + + public Criteria andSortOrderNotBetween(Integer value1, Integer value2) { + addCriterion("sort_order not between", value1, value2, "sortOrder"); + return (Criteria) this; + } + + public Criteria andCascadeCloseIsNull() { + addCriterion("cascade_close is null"); + return (Criteria) this; + } + + public Criteria andCascadeCloseIsNotNull() { + addCriterion("cascade_close is not null"); + return (Criteria) this; + } + + public Criteria andCascadeCloseEqualTo(String value) { + addCriterion("cascade_close =", value, "cascadeClose"); + return (Criteria) this; + } + + public Criteria andCascadeCloseNotEqualTo(String value) { + addCriterion("cascade_close <>", value, "cascadeClose"); + return (Criteria) this; + } + + public Criteria andCascadeCloseGreaterThan(String value) { + addCriterion("cascade_close >", value, "cascadeClose"); + return (Criteria) this; + } + + public Criteria andCascadeCloseGreaterThanOrEqualTo(String value) { + addCriterion("cascade_close >=", value, "cascadeClose"); + return (Criteria) this; + } + + public Criteria andCascadeCloseLessThan(String value) { + addCriterion("cascade_close <", value, "cascadeClose"); + return (Criteria) this; + } + + public Criteria andCascadeCloseLessThanOrEqualTo(String value) { + addCriterion("cascade_close <=", value, "cascadeClose"); + return (Criteria) this; + } + + public Criteria andCascadeCloseLike(String value) { + addCriterion("cascade_close like", value, "cascadeClose"); + return (Criteria) this; + } + + public Criteria andCascadeCloseNotLike(String value) { + addCriterion("cascade_close not like", value, "cascadeClose"); + return (Criteria) this; + } + + public Criteria andCascadeCloseIn(List values) { + addCriterion("cascade_close in", values, "cascadeClose"); + return (Criteria) this; + } + + public Criteria andCascadeCloseNotIn(List values) { + addCriterion("cascade_close not in", values, "cascadeClose"); + return (Criteria) this; + } + + public Criteria andCascadeCloseBetween(String value1, String value2) { + addCriterion("cascade_close between", value1, value2, "cascadeClose"); + return (Criteria) this; + } + + public Criteria andCascadeCloseNotBetween(String value1, String value2) { + addCriterion("cascade_close not between", value1, value2, "cascadeClose"); + return (Criteria) this; + } + + public Criteria andCascadeOpenIsNull() { + addCriterion("cascade_open is null"); + return (Criteria) this; + } + + public Criteria andCascadeOpenIsNotNull() { + addCriterion("cascade_open is not null"); + return (Criteria) this; + } + + public Criteria andCascadeOpenEqualTo(String value) { + addCriterion("cascade_open =", value, "cascadeOpen"); + return (Criteria) this; + } + + public Criteria andCascadeOpenNotEqualTo(String value) { + addCriterion("cascade_open <>", value, "cascadeOpen"); + return (Criteria) this; + } + + public Criteria andCascadeOpenGreaterThan(String value) { + addCriterion("cascade_open >", value, "cascadeOpen"); + return (Criteria) this; + } + + public Criteria andCascadeOpenGreaterThanOrEqualTo(String value) { + addCriterion("cascade_open >=", value, "cascadeOpen"); + return (Criteria) this; + } + + public Criteria andCascadeOpenLessThan(String value) { + addCriterion("cascade_open <", value, "cascadeOpen"); + return (Criteria) this; + } + + public Criteria andCascadeOpenLessThanOrEqualTo(String value) { + addCriterion("cascade_open <=", value, "cascadeOpen"); + return (Criteria) this; + } + + public Criteria andCascadeOpenLike(String value) { + addCriterion("cascade_open like", value, "cascadeOpen"); + return (Criteria) this; + } + + public Criteria andCascadeOpenNotLike(String value) { + addCriterion("cascade_open not like", value, "cascadeOpen"); + return (Criteria) this; + } + + public Criteria andCascadeOpenIn(List values) { + addCriterion("cascade_open in", values, "cascadeOpen"); + return (Criteria) this; + } + + public Criteria andCascadeOpenNotIn(List values) { + addCriterion("cascade_open not in", values, "cascadeOpen"); + return (Criteria) this; + } + + public Criteria andCascadeOpenBetween(String value1, String value2) { + addCriterion("cascade_open between", value1, value2, "cascadeOpen"); + return (Criteria) this; + } + + public Criteria andCascadeOpenNotBetween(String value1, String value2) { + addCriterion("cascade_open not between", value1, value2, "cascadeOpen"); + return (Criteria) this; + } + + public Criteria andEditDisabledMsgIsNull() { + addCriterion("edit_disabled_msg is null"); + return (Criteria) this; + } + + public Criteria andEditDisabledMsgIsNotNull() { + addCriterion("edit_disabled_msg is not null"); + return (Criteria) this; + } + + public Criteria andEditDisabledMsgEqualTo(String value) { + addCriterion("edit_disabled_msg =", value, "editDisabledMsg"); + return (Criteria) this; + } + + public Criteria andEditDisabledMsgNotEqualTo(String value) { + addCriterion("edit_disabled_msg <>", value, "editDisabledMsg"); + return (Criteria) this; + } + + public Criteria andEditDisabledMsgGreaterThan(String value) { + addCriterion("edit_disabled_msg >", value, "editDisabledMsg"); + return (Criteria) this; + } + + public Criteria andEditDisabledMsgGreaterThanOrEqualTo(String value) { + addCriterion("edit_disabled_msg >=", value, "editDisabledMsg"); + return (Criteria) this; + } + + public Criteria andEditDisabledMsgLessThan(String value) { + addCriterion("edit_disabled_msg <", value, "editDisabledMsg"); + return (Criteria) this; + } + + public Criteria andEditDisabledMsgLessThanOrEqualTo(String value) { + addCriterion("edit_disabled_msg <=", value, "editDisabledMsg"); + return (Criteria) this; + } + + public Criteria andEditDisabledMsgLike(String value) { + addCriterion("edit_disabled_msg like", value, "editDisabledMsg"); + return (Criteria) this; + } + + public Criteria andEditDisabledMsgNotLike(String value) { + addCriterion("edit_disabled_msg not like", value, "editDisabledMsg"); + return (Criteria) this; + } + + public Criteria andEditDisabledMsgIn(List values) { + addCriterion("edit_disabled_msg in", values, "editDisabledMsg"); + return (Criteria) this; + } + + public Criteria andEditDisabledMsgNotIn(List values) { + addCriterion("edit_disabled_msg not in", values, "editDisabledMsg"); + return (Criteria) this; + } + + public Criteria andEditDisabledMsgBetween(String value1, String value2) { + addCriterion("edit_disabled_msg between", value1, value2, "editDisabledMsg"); + return (Criteria) this; + } + + public Criteria andEditDisabledMsgNotBetween(String value1, String value2) { + addCriterion("edit_disabled_msg not between", value1, value2, "editDisabledMsg"); + return (Criteria) this; + } + + public Criteria andEditDisabledIsNull() { + addCriterion("edit_disabled is null"); + return (Criteria) this; + } + + public Criteria andEditDisabledIsNotNull() { + addCriterion("edit_disabled is not null"); + return (Criteria) this; + } + + public Criteria andEditDisabledEqualTo(Boolean value) { + addCriterion("edit_disabled =", value, "editDisabled"); + return (Criteria) this; + } + + public Criteria andEditDisabledNotEqualTo(Boolean value) { + addCriterion("edit_disabled <>", value, "editDisabled"); + return (Criteria) this; + } + + public Criteria andEditDisabledGreaterThan(Boolean value) { + addCriterion("edit_disabled >", value, "editDisabled"); + return (Criteria) this; + } + + public Criteria andEditDisabledGreaterThanOrEqualTo(Boolean value) { + addCriterion("edit_disabled >=", value, "editDisabled"); + return (Criteria) this; + } + + public Criteria andEditDisabledLessThan(Boolean value) { + addCriterion("edit_disabled <", value, "editDisabled"); + return (Criteria) this; + } + + public Criteria andEditDisabledLessThanOrEqualTo(Boolean value) { + addCriterion("edit_disabled <=", value, "editDisabled"); + return (Criteria) this; + } + + public Criteria andEditDisabledIn(List values) { + addCriterion("edit_disabled in", values, "editDisabled"); + return (Criteria) this; + } + + public Criteria andEditDisabledNotIn(List values) { + addCriterion("edit_disabled not in", values, "editDisabled"); + return (Criteria) this; + } + + public Criteria andEditDisabledBetween(Boolean value1, Boolean value2) { + addCriterion("edit_disabled between", value1, value2, "editDisabled"); + return (Criteria) this; + } + + public Criteria andEditDisabledNotBetween(Boolean value1, Boolean value2) { + addCriterion("edit_disabled not between", value1, value2, "editDisabled"); + return (Criteria) this; + } + + public Criteria andShowCascadeIsNull() { + addCriterion("show_cascade is null"); + return (Criteria) this; + } + + public Criteria andShowCascadeIsNotNull() { + addCriterion("show_cascade is not null"); + return (Criteria) this; + } + + public Criteria andShowCascadeEqualTo(String value) { + addCriterion("show_cascade =", value, "showCascade"); + return (Criteria) this; + } + + public Criteria andShowCascadeNotEqualTo(String value) { + addCriterion("show_cascade <>", value, "showCascade"); + return (Criteria) this; + } + + public Criteria andShowCascadeGreaterThan(String value) { + addCriterion("show_cascade >", value, "showCascade"); + return (Criteria) this; + } + + public Criteria andShowCascadeGreaterThanOrEqualTo(String value) { + addCriterion("show_cascade >=", value, "showCascade"); + return (Criteria) this; + } + + public Criteria andShowCascadeLessThan(String value) { + addCriterion("show_cascade <", value, "showCascade"); + return (Criteria) this; + } + + public Criteria andShowCascadeLessThanOrEqualTo(String value) { + addCriterion("show_cascade <=", value, "showCascade"); + return (Criteria) this; + } + + public Criteria andShowCascadeLike(String value) { + addCriterion("show_cascade like", value, "showCascade"); + return (Criteria) this; + } + + public Criteria andShowCascadeNotLike(String value) { + addCriterion("show_cascade not like", value, "showCascade"); + return (Criteria) this; + } + + public Criteria andShowCascadeIn(List values) { + addCriterion("show_cascade in", values, "showCascade"); + return (Criteria) this; + } + + public Criteria andShowCascadeNotIn(List values) { + addCriterion("show_cascade not in", values, "showCascade"); + return (Criteria) this; + } + + public Criteria andShowCascadeBetween(String value1, String value2) { + addCriterion("show_cascade between", value1, value2, "showCascade"); + return (Criteria) this; + } + + public Criteria andShowCascadeNotBetween(String value1, String value2) { + addCriterion("show_cascade not between", value1, value2, "showCascade"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNull() { + addCriterion("created_by is null"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNotNull() { + addCriterion("created_by is not null"); + return (Criteria) this; + } + + public Criteria andCreatedByEqualTo(Long value) { + addCriterion("created_by =", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotEqualTo(Long value) { + addCriterion("created_by <>", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThan(Long value) { + addCriterion("created_by >", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThanOrEqualTo(Long value) { + addCriterion("created_by >=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThan(Long value) { + addCriterion("created_by <", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThanOrEqualTo(Long value) { + addCriterion("created_by <=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByIn(List values) { + addCriterion("created_by in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotIn(List values) { + addCriterion("created_by not in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByBetween(Long value1, Long value2) { + addCriterion("created_by between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotBetween(Long value1, Long value2) { + addCriterion("created_by not between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNull() { + addCriterion("updated_by is null"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNotNull() { + addCriterion("updated_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedByEqualTo(Long value) { + addCriterion("updated_by =", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotEqualTo(Long value) { + addCriterion("updated_by <>", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThan(Long value) { + addCriterion("updated_by >", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThanOrEqualTo(Long value) { + addCriterion("updated_by >=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThan(Long value) { + addCriterion("updated_by <", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThanOrEqualTo(Long value) { + addCriterion("updated_by <=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByIn(List values) { + addCriterion("updated_by in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotIn(List values) { + addCriterion("updated_by not in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByBetween(Long value1, Long value2) { + addCriterion("updated_by between", value1, value2, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotBetween(Long value1, Long value2) { + addCriterion("updated_by not between", value1, value2, "updatedBy"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_template_field + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table form_template_field + * + * @mbg.generated + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/ModifyLogRecord.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/ModifyLogRecord.java new file mode 100644 index 000000000..1de0a359d --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/ModifyLogRecord.java @@ -0,0 +1,207 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.io.Serializable; +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +/** + * + * This class was generated by MyBatis Generator. + * This class corresponds to the database table modify_log_record + */ +@Getter +@Setter +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class ModifyLogRecord implements Serializable { + /** + * Database Column Remarks: + * 主键ID + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.id + * + * @mbg.generated + */ + private Long id; + + /** + * Database Column Remarks: + * 实体类型,如:FormFieldDict, FormTemplate, FormTemplateField等 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.entity_type + * + * @mbg.generated + */ + private String entityType; + + /** + * Database Column Remarks: + * 实体ID + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.entity_id + * + * @mbg.generated + */ + private String entityId; + + /** + * Database Column Remarks: + * form_code + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.form_code + * + * @mbg.generated + */ + private String formCode; + + /** + * Database Column Remarks: + * 描述 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.description + * + * @mbg.generated + */ + private String description; + + /** + * Database Column Remarks: + * 字段中文名 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.field_chinese_name + * + * @mbg.generated + */ + private String fieldChineseName; + + /** + * Database Column Remarks: + * 字段英文名 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.field_english_name + * + * @mbg.generated + */ + private String fieldEnglishName; + + /** + * Database Column Remarks: + * 修改前值 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.old_value + * + * @mbg.generated + */ + private String oldValue; + + /** + * Database Column Remarks: + * 修改后值 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.new_value + * + * @mbg.generated + */ + private String newValue; + + /** + * Database Column Remarks: + * 操作人ID + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.operator + * + * @mbg.generated + */ + private Long operator; + + /** + * Database Column Remarks: + * 操作人ID + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.operator_name + * + * @mbg.generated + */ + private String operatorName; + + /** + * Database Column Remarks: + * 操作时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.operation_time + * + * @mbg.generated + */ + private Date operationTime; + + /** + * Database Column Remarks: + * 创建时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.create_time + * + * @mbg.generated + */ + private Date createTime; + + /** + * Database Column Remarks: + * 更新时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.update_time + * + * @mbg.generated + */ + private Date updateTime; + + /** + * Database Column Remarks: + * 服务名称 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.service_name + * + * @mbg.generated + */ + private String serviceName; + + /** + * Database Column Remarks: + * 是否删除(0:否,1:是) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column modify_log_record.deleted + * + * @mbg.generated + */ + private Integer deleted; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table modify_log_record + * + * @mbg.generated + */ + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/ModifyLogRecordExample.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/ModifyLogRecordExample.java new file mode 100644 index 000000000..6bb5e50ed --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/ModifyLogRecordExample.java @@ -0,0 +1,1362 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ModifyLogRecordExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table modify_log_record + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table modify_log_record + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table modify_log_record + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + public ModifyLogRecordExample() { + oredCriteria = new ArrayList<>(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table modify_log_record + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andEntityTypeIsNull() { + addCriterion("entity_type is null"); + return (Criteria) this; + } + + public Criteria andEntityTypeIsNotNull() { + addCriterion("entity_type is not null"); + return (Criteria) this; + } + + public Criteria andEntityTypeEqualTo(String value) { + addCriterion("entity_type =", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeNotEqualTo(String value) { + addCriterion("entity_type <>", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeGreaterThan(String value) { + addCriterion("entity_type >", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeGreaterThanOrEqualTo(String value) { + addCriterion("entity_type >=", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeLessThan(String value) { + addCriterion("entity_type <", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeLessThanOrEqualTo(String value) { + addCriterion("entity_type <=", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeLike(String value) { + addCriterion("entity_type like", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeNotLike(String value) { + addCriterion("entity_type not like", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeIn(List values) { + addCriterion("entity_type in", values, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeNotIn(List values) { + addCriterion("entity_type not in", values, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeBetween(String value1, String value2) { + addCriterion("entity_type between", value1, value2, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeNotBetween(String value1, String value2) { + addCriterion("entity_type not between", value1, value2, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityIdIsNull() { + addCriterion("entity_id is null"); + return (Criteria) this; + } + + public Criteria andEntityIdIsNotNull() { + addCriterion("entity_id is not null"); + return (Criteria) this; + } + + public Criteria andEntityIdEqualTo(String value) { + addCriterion("entity_id =", value, "entityId"); + return (Criteria) this; + } + + public Criteria andEntityIdNotEqualTo(String value) { + addCriterion("entity_id <>", value, "entityId"); + return (Criteria) this; + } + + public Criteria andEntityIdGreaterThan(String value) { + addCriterion("entity_id >", value, "entityId"); + return (Criteria) this; + } + + public Criteria andEntityIdGreaterThanOrEqualTo(String value) { + addCriterion("entity_id >=", value, "entityId"); + return (Criteria) this; + } + + public Criteria andEntityIdLessThan(String value) { + addCriterion("entity_id <", value, "entityId"); + return (Criteria) this; + } + + public Criteria andEntityIdLessThanOrEqualTo(String value) { + addCriterion("entity_id <=", value, "entityId"); + return (Criteria) this; + } + + public Criteria andEntityIdLike(String value) { + addCriterion("entity_id like", value, "entityId"); + return (Criteria) this; + } + + public Criteria andEntityIdNotLike(String value) { + addCriterion("entity_id not like", value, "entityId"); + return (Criteria) this; + } + + public Criteria andEntityIdIn(List values) { + addCriterion("entity_id in", values, "entityId"); + return (Criteria) this; + } + + public Criteria andEntityIdNotIn(List values) { + addCriterion("entity_id not in", values, "entityId"); + return (Criteria) this; + } + + public Criteria andEntityIdBetween(String value1, String value2) { + addCriterion("entity_id between", value1, value2, "entityId"); + return (Criteria) this; + } + + public Criteria andEntityIdNotBetween(String value1, String value2) { + addCriterion("entity_id not between", value1, value2, "entityId"); + return (Criteria) this; + } + + public Criteria andFormCodeIsNull() { + addCriterion("form_code is null"); + return (Criteria) this; + } + + public Criteria andFormCodeIsNotNull() { + addCriterion("form_code is not null"); + return (Criteria) this; + } + + public Criteria andFormCodeEqualTo(String value) { + addCriterion("form_code =", value, "formCode"); + return (Criteria) this; + } + + public Criteria andFormCodeNotEqualTo(String value) { + addCriterion("form_code <>", value, "formCode"); + return (Criteria) this; + } + + public Criteria andFormCodeGreaterThan(String value) { + addCriterion("form_code >", value, "formCode"); + return (Criteria) this; + } + + public Criteria andFormCodeGreaterThanOrEqualTo(String value) { + addCriterion("form_code >=", value, "formCode"); + return (Criteria) this; + } + + public Criteria andFormCodeLessThan(String value) { + addCriterion("form_code <", value, "formCode"); + return (Criteria) this; + } + + public Criteria andFormCodeLessThanOrEqualTo(String value) { + addCriterion("form_code <=", value, "formCode"); + return (Criteria) this; + } + + public Criteria andFormCodeLike(String value) { + addCriterion("form_code like", value, "formCode"); + return (Criteria) this; + } + + public Criteria andFormCodeNotLike(String value) { + addCriterion("form_code not like", value, "formCode"); + return (Criteria) this; + } + + public Criteria andFormCodeIn(List values) { + addCriterion("form_code in", values, "formCode"); + return (Criteria) this; + } + + public Criteria andFormCodeNotIn(List values) { + addCriterion("form_code not in", values, "formCode"); + return (Criteria) this; + } + + public Criteria andFormCodeBetween(String value1, String value2) { + addCriterion("form_code between", value1, value2, "formCode"); + return (Criteria) this; + } + + public Criteria andFormCodeNotBetween(String value1, String value2) { + addCriterion("form_code not between", value1, value2, "formCode"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andFieldChineseNameIsNull() { + addCriterion("field_chinese_name is null"); + return (Criteria) this; + } + + public Criteria andFieldChineseNameIsNotNull() { + addCriterion("field_chinese_name is not null"); + return (Criteria) this; + } + + public Criteria andFieldChineseNameEqualTo(String value) { + addCriterion("field_chinese_name =", value, "fieldChineseName"); + return (Criteria) this; + } + + public Criteria andFieldChineseNameNotEqualTo(String value) { + addCriterion("field_chinese_name <>", value, "fieldChineseName"); + return (Criteria) this; + } + + public Criteria andFieldChineseNameGreaterThan(String value) { + addCriterion("field_chinese_name >", value, "fieldChineseName"); + return (Criteria) this; + } + + public Criteria andFieldChineseNameGreaterThanOrEqualTo(String value) { + addCriterion("field_chinese_name >=", value, "fieldChineseName"); + return (Criteria) this; + } + + public Criteria andFieldChineseNameLessThan(String value) { + addCriterion("field_chinese_name <", value, "fieldChineseName"); + return (Criteria) this; + } + + public Criteria andFieldChineseNameLessThanOrEqualTo(String value) { + addCriterion("field_chinese_name <=", value, "fieldChineseName"); + return (Criteria) this; + } + + public Criteria andFieldChineseNameLike(String value) { + addCriterion("field_chinese_name like", value, "fieldChineseName"); + return (Criteria) this; + } + + public Criteria andFieldChineseNameNotLike(String value) { + addCriterion("field_chinese_name not like", value, "fieldChineseName"); + return (Criteria) this; + } + + public Criteria andFieldChineseNameIn(List values) { + addCriterion("field_chinese_name in", values, "fieldChineseName"); + return (Criteria) this; + } + + public Criteria andFieldChineseNameNotIn(List values) { + addCriterion("field_chinese_name not in", values, "fieldChineseName"); + return (Criteria) this; + } + + public Criteria andFieldChineseNameBetween(String value1, String value2) { + addCriterion("field_chinese_name between", value1, value2, "fieldChineseName"); + return (Criteria) this; + } + + public Criteria andFieldChineseNameNotBetween(String value1, String value2) { + addCriterion("field_chinese_name not between", value1, value2, "fieldChineseName"); + return (Criteria) this; + } + + public Criteria andFieldEnglishNameIsNull() { + addCriterion("field_english_name is null"); + return (Criteria) this; + } + + public Criteria andFieldEnglishNameIsNotNull() { + addCriterion("field_english_name is not null"); + return (Criteria) this; + } + + public Criteria andFieldEnglishNameEqualTo(String value) { + addCriterion("field_english_name =", value, "fieldEnglishName"); + return (Criteria) this; + } + + public Criteria andFieldEnglishNameNotEqualTo(String value) { + addCriterion("field_english_name <>", value, "fieldEnglishName"); + return (Criteria) this; + } + + public Criteria andFieldEnglishNameGreaterThan(String value) { + addCriterion("field_english_name >", value, "fieldEnglishName"); + return (Criteria) this; + } + + public Criteria andFieldEnglishNameGreaterThanOrEqualTo(String value) { + addCriterion("field_english_name >=", value, "fieldEnglishName"); + return (Criteria) this; + } + + public Criteria andFieldEnglishNameLessThan(String value) { + addCriterion("field_english_name <", value, "fieldEnglishName"); + return (Criteria) this; + } + + public Criteria andFieldEnglishNameLessThanOrEqualTo(String value) { + addCriterion("field_english_name <=", value, "fieldEnglishName"); + return (Criteria) this; + } + + public Criteria andFieldEnglishNameLike(String value) { + addCriterion("field_english_name like", value, "fieldEnglishName"); + return (Criteria) this; + } + + public Criteria andFieldEnglishNameNotLike(String value) { + addCriterion("field_english_name not like", value, "fieldEnglishName"); + return (Criteria) this; + } + + public Criteria andFieldEnglishNameIn(List values) { + addCriterion("field_english_name in", values, "fieldEnglishName"); + return (Criteria) this; + } + + public Criteria andFieldEnglishNameNotIn(List values) { + addCriterion("field_english_name not in", values, "fieldEnglishName"); + return (Criteria) this; + } + + public Criteria andFieldEnglishNameBetween(String value1, String value2) { + addCriterion("field_english_name between", value1, value2, "fieldEnglishName"); + return (Criteria) this; + } + + public Criteria andFieldEnglishNameNotBetween(String value1, String value2) { + addCriterion("field_english_name not between", value1, value2, "fieldEnglishName"); + return (Criteria) this; + } + + public Criteria andOldValueIsNull() { + addCriterion("old_value is null"); + return (Criteria) this; + } + + public Criteria andOldValueIsNotNull() { + addCriterion("old_value is not null"); + return (Criteria) this; + } + + public Criteria andOldValueEqualTo(String value) { + addCriterion("old_value =", value, "oldValue"); + return (Criteria) this; + } + + public Criteria andOldValueNotEqualTo(String value) { + addCriterion("old_value <>", value, "oldValue"); + return (Criteria) this; + } + + public Criteria andOldValueGreaterThan(String value) { + addCriterion("old_value >", value, "oldValue"); + return (Criteria) this; + } + + public Criteria andOldValueGreaterThanOrEqualTo(String value) { + addCriterion("old_value >=", value, "oldValue"); + return (Criteria) this; + } + + public Criteria andOldValueLessThan(String value) { + addCriterion("old_value <", value, "oldValue"); + return (Criteria) this; + } + + public Criteria andOldValueLessThanOrEqualTo(String value) { + addCriterion("old_value <=", value, "oldValue"); + return (Criteria) this; + } + + public Criteria andOldValueLike(String value) { + addCriterion("old_value like", value, "oldValue"); + return (Criteria) this; + } + + public Criteria andOldValueNotLike(String value) { + addCriterion("old_value not like", value, "oldValue"); + return (Criteria) this; + } + + public Criteria andOldValueIn(List values) { + addCriterion("old_value in", values, "oldValue"); + return (Criteria) this; + } + + public Criteria andOldValueNotIn(List values) { + addCriterion("old_value not in", values, "oldValue"); + return (Criteria) this; + } + + public Criteria andOldValueBetween(String value1, String value2) { + addCriterion("old_value between", value1, value2, "oldValue"); + return (Criteria) this; + } + + public Criteria andOldValueNotBetween(String value1, String value2) { + addCriterion("old_value not between", value1, value2, "oldValue"); + return (Criteria) this; + } + + public Criteria andNewValueIsNull() { + addCriterion("new_value is null"); + return (Criteria) this; + } + + public Criteria andNewValueIsNotNull() { + addCriterion("new_value is not null"); + return (Criteria) this; + } + + public Criteria andNewValueEqualTo(String value) { + addCriterion("new_value =", value, "newValue"); + return (Criteria) this; + } + + public Criteria andNewValueNotEqualTo(String value) { + addCriterion("new_value <>", value, "newValue"); + return (Criteria) this; + } + + public Criteria andNewValueGreaterThan(String value) { + addCriterion("new_value >", value, "newValue"); + return (Criteria) this; + } + + public Criteria andNewValueGreaterThanOrEqualTo(String value) { + addCriterion("new_value >=", value, "newValue"); + return (Criteria) this; + } + + public Criteria andNewValueLessThan(String value) { + addCriterion("new_value <", value, "newValue"); + return (Criteria) this; + } + + public Criteria andNewValueLessThanOrEqualTo(String value) { + addCriterion("new_value <=", value, "newValue"); + return (Criteria) this; + } + + public Criteria andNewValueLike(String value) { + addCriterion("new_value like", value, "newValue"); + return (Criteria) this; + } + + public Criteria andNewValueNotLike(String value) { + addCriterion("new_value not like", value, "newValue"); + return (Criteria) this; + } + + public Criteria andNewValueIn(List values) { + addCriterion("new_value in", values, "newValue"); + return (Criteria) this; + } + + public Criteria andNewValueNotIn(List values) { + addCriterion("new_value not in", values, "newValue"); + return (Criteria) this; + } + + public Criteria andNewValueBetween(String value1, String value2) { + addCriterion("new_value between", value1, value2, "newValue"); + return (Criteria) this; + } + + public Criteria andNewValueNotBetween(String value1, String value2) { + addCriterion("new_value not between", value1, value2, "newValue"); + return (Criteria) this; + } + + public Criteria andOperatorIsNull() { + addCriterion("`operator` is null"); + return (Criteria) this; + } + + public Criteria andOperatorIsNotNull() { + addCriterion("`operator` is not null"); + return (Criteria) this; + } + + public Criteria andOperatorEqualTo(Long value) { + addCriterion("`operator` =", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotEqualTo(Long value) { + addCriterion("`operator` <>", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThan(Long value) { + addCriterion("`operator` >", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThanOrEqualTo(Long value) { + addCriterion("`operator` >=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThan(Long value) { + addCriterion("`operator` <", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThanOrEqualTo(Long value) { + addCriterion("`operator` <=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorIn(List values) { + addCriterion("`operator` in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotIn(List values) { + addCriterion("`operator` not in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorBetween(Long value1, Long value2) { + addCriterion("`operator` between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotBetween(Long value1, Long value2) { + addCriterion("`operator` not between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNameIsNull() { + addCriterion("operator_name is null"); + return (Criteria) this; + } + + public Criteria andOperatorNameIsNotNull() { + addCriterion("operator_name is not null"); + return (Criteria) this; + } + + public Criteria andOperatorNameEqualTo(String value) { + addCriterion("operator_name =", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotEqualTo(String value) { + addCriterion("operator_name <>", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameGreaterThan(String value) { + addCriterion("operator_name >", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameGreaterThanOrEqualTo(String value) { + addCriterion("operator_name >=", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLessThan(String value) { + addCriterion("operator_name <", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLessThanOrEqualTo(String value) { + addCriterion("operator_name <=", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLike(String value) { + addCriterion("operator_name like", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotLike(String value) { + addCriterion("operator_name not like", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameIn(List values) { + addCriterion("operator_name in", values, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotIn(List values) { + addCriterion("operator_name not in", values, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameBetween(String value1, String value2) { + addCriterion("operator_name between", value1, value2, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotBetween(String value1, String value2) { + addCriterion("operator_name not between", value1, value2, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperationTimeIsNull() { + addCriterion("operation_time is null"); + return (Criteria) this; + } + + public Criteria andOperationTimeIsNotNull() { + addCriterion("operation_time is not null"); + return (Criteria) this; + } + + public Criteria andOperationTimeEqualTo(Date value) { + addCriterion("operation_time =", value, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeNotEqualTo(Date value) { + addCriterion("operation_time <>", value, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeGreaterThan(Date value) { + addCriterion("operation_time >", value, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeGreaterThanOrEqualTo(Date value) { + addCriterion("operation_time >=", value, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeLessThan(Date value) { + addCriterion("operation_time <", value, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeLessThanOrEqualTo(Date value) { + addCriterion("operation_time <=", value, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeIn(List values) { + addCriterion("operation_time in", values, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeNotIn(List values) { + addCriterion("operation_time not in", values, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeBetween(Date value1, Date value2) { + addCriterion("operation_time between", value1, value2, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeNotBetween(Date value1, Date value2) { + addCriterion("operation_time not between", value1, value2, "operationTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andServiceNameIsNull() { + addCriterion("service_name is null"); + return (Criteria) this; + } + + public Criteria andServiceNameIsNotNull() { + addCriterion("service_name is not null"); + return (Criteria) this; + } + + public Criteria andServiceNameEqualTo(String value) { + addCriterion("service_name =", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameNotEqualTo(String value) { + addCriterion("service_name <>", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameGreaterThan(String value) { + addCriterion("service_name >", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameGreaterThanOrEqualTo(String value) { + addCriterion("service_name >=", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameLessThan(String value) { + addCriterion("service_name <", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameLessThanOrEqualTo(String value) { + addCriterion("service_name <=", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameLike(String value) { + addCriterion("service_name like", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameNotLike(String value) { + addCriterion("service_name not like", value, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameIn(List values) { + addCriterion("service_name in", values, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameNotIn(List values) { + addCriterion("service_name not in", values, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameBetween(String value1, String value2) { + addCriterion("service_name between", value1, value2, "serviceName"); + return (Criteria) this; + } + + public Criteria andServiceNameNotBetween(String value1, String value2) { + addCriterion("service_name not between", value1, value2, "serviceName"); + return (Criteria) this; + } + + public Criteria andDeletedIsNull() { + addCriterion("deleted is null"); + return (Criteria) this; + } + + public Criteria andDeletedIsNotNull() { + addCriterion("deleted is not null"); + return (Criteria) this; + } + + public Criteria andDeletedEqualTo(Integer value) { + addCriterion("deleted =", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotEqualTo(Integer value) { + addCriterion("deleted <>", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedGreaterThan(Integer value) { + addCriterion("deleted >", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedGreaterThanOrEqualTo(Integer value) { + addCriterion("deleted >=", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedLessThan(Integer value) { + addCriterion("deleted <", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedLessThanOrEqualTo(Integer value) { + addCriterion("deleted <=", value, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedIn(List values) { + addCriterion("deleted in", values, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotIn(List values) { + addCriterion("deleted not in", values, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedBetween(Integer value1, Integer value2) { + addCriterion("deleted between", value1, value2, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotBetween(Integer value1, Integer value2) { + addCriterion("deleted not between", value1, value2, "deleted"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table modify_log_record + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table modify_log_record + * + * @mbg.generated + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/TenantInitStatus.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/TenantInitStatus.java new file mode 100644 index 000000000..92d73c217 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/TenantInitStatus.java @@ -0,0 +1,86 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.io.Serializable; +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +/** + * + * This class was generated by MyBatis Generator. + * This class corresponds to the database table tenant_init_status + */ +@Getter +@Setter +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class TenantInitStatus implements Serializable { + /** + * Database Column Remarks: + * 主键ID + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column tenant_init_status.id + * + * @mbg.generated + */ + private Long id; + + /** + * Database Column Remarks: + * 初始化状态(0:未初始化,1:已初始化) + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column tenant_init_status.initialized + * + * @mbg.generated + */ + private Integer initialized; + + /** + * Database Column Remarks: + * 创建时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column tenant_init_status.create_time + * + * @mbg.generated + */ + private Date createTime; + + /** + * Database Column Remarks: + * 更新时间 + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column tenant_init_status.update_time + * + * @mbg.generated + */ + private Date updateTime; + + /** + * Database Column Remarks: + * 租户ID + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column tenant_init_status.agent_id + * + * @mbg.generated + */ + private Long agentId; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/TenantInitStatusExample.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/TenantInitStatusExample.java new file mode 100644 index 000000000..819f95d80 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/entity/TenantInitStatusExample.java @@ -0,0 +1,602 @@ +package com.pcloud.booksflow.form.mybatis.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class TenantInitStatusExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + public TenantInitStatusExample() { + oredCriteria = new ArrayList<>(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andInitializedIsNull() { + addCriterion("initialized is null"); + return (Criteria) this; + } + + public Criteria andInitializedIsNotNull() { + addCriterion("initialized is not null"); + return (Criteria) this; + } + + public Criteria andInitializedEqualTo(Integer value) { + addCriterion("initialized =", value, "initialized"); + return (Criteria) this; + } + + public Criteria andInitializedNotEqualTo(Integer value) { + addCriterion("initialized <>", value, "initialized"); + return (Criteria) this; + } + + public Criteria andInitializedGreaterThan(Integer value) { + addCriterion("initialized >", value, "initialized"); + return (Criteria) this; + } + + public Criteria andInitializedGreaterThanOrEqualTo(Integer value) { + addCriterion("initialized >=", value, "initialized"); + return (Criteria) this; + } + + public Criteria andInitializedLessThan(Integer value) { + addCriterion("initialized <", value, "initialized"); + return (Criteria) this; + } + + public Criteria andInitializedLessThanOrEqualTo(Integer value) { + addCriterion("initialized <=", value, "initialized"); + return (Criteria) this; + } + + public Criteria andInitializedIn(List values) { + addCriterion("initialized in", values, "initialized"); + return (Criteria) this; + } + + public Criteria andInitializedNotIn(List values) { + addCriterion("initialized not in", values, "initialized"); + return (Criteria) this; + } + + public Criteria andInitializedBetween(Integer value1, Integer value2) { + addCriterion("initialized between", value1, value2, "initialized"); + return (Criteria) this; + } + + public Criteria andInitializedNotBetween(Integer value1, Integer value2) { + addCriterion("initialized not between", value1, value2, "initialized"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNull() { + addCriterion("agent_id is null"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNotNull() { + addCriterion("agent_id is not null"); + return (Criteria) this; + } + + public Criteria andAgentIdEqualTo(Long value) { + addCriterion("agent_id =", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotEqualTo(Long value) { + addCriterion("agent_id <>", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThan(Long value) { + addCriterion("agent_id >", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThanOrEqualTo(Long value) { + addCriterion("agent_id >=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThan(Long value) { + addCriterion("agent_id <", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThanOrEqualTo(Long value) { + addCriterion("agent_id <=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdIn(List values) { + addCriterion("agent_id in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotIn(List values) { + addCriterion("agent_id not in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdBetween(Long value1, Long value2) { + addCriterion("agent_id between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotBetween(Long value1, Long value2) { + addCriterion("agent_id not between", value1, value2, "agentId"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table tenant_init_status + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormDictMapper.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormDictMapper.java new file mode 100644 index 000000000..1abb43ac5 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormDictMapper.java @@ -0,0 +1,121 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +import com.pcloud.booksflow.form.mybatis.entity.FormDict; +import com.pcloud.booksflow.form.mybatis.entity.FormDictExample; +import com.pcloud.universe.commons.paging.PaginationMapper; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FormDictMapper extends PaginationMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + long countByExample(FormDictExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + int deleteByExample(FormDictExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + int insert(FormDict record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + int insertSelective(FormDict record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + List selectByExample(FormDictExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + FormDict selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") FormDict record, @Param("example") FormDictExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + int updateByExample(@Param("record") FormDict record, @Param("example") FormDictExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(FormDict record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + int updateByPrimaryKey(FormDict record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + List selectByExampleWithPaging(@Param("example") FormDictExample example, @Param("offset") int offset, @Param("limit") int limit); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + FormDict selectOneByExample(FormDictExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_dict + * + * @mbg.generated + */ + int batchInsert(@Param("list") List list); +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormDictMapperExt.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormDictMapperExt.java new file mode 100644 index 000000000..bbb3a9e70 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormDictMapperExt.java @@ -0,0 +1,4 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +public interface FormDictMapperExt extends FormDictMapper { +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormFieldDictMapper.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormFieldDictMapper.java new file mode 100644 index 000000000..cb334934b --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormFieldDictMapper.java @@ -0,0 +1,145 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +import com.pcloud.booksflow.form.mybatis.entity.FormFieldDict; +import com.pcloud.booksflow.form.mybatis.entity.FormFieldDictExample; +import com.pcloud.universe.commons.paging.PaginationMapper; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FormFieldDictMapper extends PaginationMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + long countByExample(FormFieldDictExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + int deleteByExample(FormFieldDictExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + int insert(FormFieldDict record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + int insertSelective(FormFieldDict record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + List selectByExampleWithBLOBs(FormFieldDictExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + List selectByExample(FormFieldDictExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + FormFieldDict selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") FormFieldDict record, @Param("example") FormFieldDictExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + int updateByExampleWithBLOBs(@Param("record") FormFieldDict record, @Param("example") FormFieldDictExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + int updateByExample(@Param("record") FormFieldDict record, @Param("example") FormFieldDictExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(FormFieldDict record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + int updateByPrimaryKeyWithBLOBs(FormFieldDict record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + int updateByPrimaryKey(FormFieldDict record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + List selectByExampleWithPaging(@Param("example") FormFieldDictExample example, @Param("offset") int offset, @Param("limit") int limit); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + FormFieldDict selectOneByExample(FormFieldDictExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_field_dict + * + * @mbg.generated + */ + int batchInsert(@Param("list") List list); +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormFieldDictMapperExt.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormFieldDictMapperExt.java new file mode 100644 index 000000000..2528f4fad --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormFieldDictMapperExt.java @@ -0,0 +1,21 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +import com.pcloud.booksflow.form.api.dto.DictCodesDTO; +import com.pcloud.booksflow.form.mybatis.entity.FormFieldDict; +import com.pcloud.booksflow.form.mybatis.entity.FormFieldDictExample; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface FormFieldDictMapperExt extends FormFieldDictMapper { + + List selectByExampleWithPagingBLOBs(@Param("example") FormFieldDictExample example, + @Param("offset") int offset, + @Param("limit") int limit, + @Param("queryStr") String queryStr); + + long countByExampleExt(@Param("example") FormFieldDictExample example, @Param("queryStr") String queryStr); + + List getByCodes(@Param("list") List dtos); + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormMapper.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormMapper.java new file mode 100644 index 000000000..60303861b --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormMapper.java @@ -0,0 +1,121 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +import com.pcloud.booksflow.form.mybatis.entity.Form; +import com.pcloud.booksflow.form.mybatis.entity.FormExample; +import com.pcloud.universe.commons.paging.PaginationMapper; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FormMapper extends PaginationMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + long countByExample(FormExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + int deleteByExample(FormExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + int insert(Form record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + int insertSelective(Form record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + List
selectByExample(FormExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + Form selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") Form record, @Param("example") FormExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + int updateByExample(@Param("record") Form record, @Param("example") FormExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(Form record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + int updateByPrimaryKey(Form record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + List selectByExampleWithPaging(@Param("example") FormExample example, @Param("offset") int offset, @Param("limit") int limit); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + Form selectOneByExample(FormExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form + * + * @mbg.generated + */ + int batchInsert(@Param("list") List list); +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormMapperExt.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormMapperExt.java new file mode 100644 index 000000000..679b6e53f --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormMapperExt.java @@ -0,0 +1,4 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +public interface FormMapperExt extends FormMapper { +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigMapper.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigMapper.java new file mode 100644 index 000000000..494c8d74e --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigMapper.java @@ -0,0 +1,146 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +import com.pcloud.booksflow.form.mybatis.entity.FormPrintConfig; +import com.pcloud.booksflow.form.mybatis.entity.FormPrintConfigExample; +import com.pcloud.booksflow.form.mybatis.entity.FormPrintConfigWithBLOBs; +import com.pcloud.universe.commons.paging.PaginationMapper; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FormPrintConfigMapper extends PaginationMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + long countByExample(FormPrintConfigExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + int deleteByExample(FormPrintConfigExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + int insert(FormPrintConfigWithBLOBs record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + int insertSelective(FormPrintConfigWithBLOBs record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + List selectByExampleWithBLOBs(FormPrintConfigExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + List selectByExample(FormPrintConfigExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + FormPrintConfigWithBLOBs selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") FormPrintConfigWithBLOBs record, @Param("example") FormPrintConfigExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + int updateByExampleWithBLOBs(@Param("record") FormPrintConfigWithBLOBs record, @Param("example") FormPrintConfigExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + int updateByExample(@Param("record") FormPrintConfig record, @Param("example") FormPrintConfigExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(FormPrintConfigWithBLOBs record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + int updateByPrimaryKeyWithBLOBs(FormPrintConfigWithBLOBs record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + int updateByPrimaryKey(FormPrintConfig record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + List selectByExampleWithPaging(@Param("example") FormPrintConfigExample example, @Param("offset") int offset, @Param("limit") int limit); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + FormPrintConfig selectOneByExample(FormPrintConfigExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config + * + * @mbg.generated + */ + int batchInsert(@Param("list") List list); +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigMapperExt.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigMapperExt.java new file mode 100644 index 000000000..2d01fb49d --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigMapperExt.java @@ -0,0 +1,4 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +public interface FormPrintConfigMapperExt extends FormPrintConfigMapper { +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigTplMapper.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigTplMapper.java new file mode 100644 index 000000000..03f9c68c1 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigTplMapper.java @@ -0,0 +1,121 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +import com.pcloud.booksflow.form.mybatis.entity.FormPrintConfigTpl; +import com.pcloud.booksflow.form.mybatis.entity.FormPrintConfigTplExample; +import com.pcloud.universe.commons.paging.PaginationMapper; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FormPrintConfigTplMapper extends PaginationMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + long countByExample(FormPrintConfigTplExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + int deleteByExample(FormPrintConfigTplExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + int insert(FormPrintConfigTpl record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + int insertSelective(FormPrintConfigTpl record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + List selectByExample(FormPrintConfigTplExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + FormPrintConfigTpl selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") FormPrintConfigTpl record, @Param("example") FormPrintConfigTplExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + int updateByExample(@Param("record") FormPrintConfigTpl record, @Param("example") FormPrintConfigTplExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(FormPrintConfigTpl record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + int updateByPrimaryKey(FormPrintConfigTpl record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + List selectByExampleWithPaging(@Param("example") FormPrintConfigTplExample example, @Param("offset") int offset, @Param("limit") int limit); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + FormPrintConfigTpl selectOneByExample(FormPrintConfigTplExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_print_config_tpl + * + * @mbg.generated + */ + int batchInsert(@Param("list") List list); +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigTplMapperExt.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigTplMapperExt.java new file mode 100644 index 000000000..ddfd98d34 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormPrintConfigTplMapperExt.java @@ -0,0 +1,4 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +public interface FormPrintConfigTplMapperExt extends FormPrintConfigTplMapper { +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateFieldMapper.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateFieldMapper.java new file mode 100644 index 000000000..f57f883ea --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateFieldMapper.java @@ -0,0 +1,145 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +import com.pcloud.booksflow.form.mybatis.entity.FormTemplateField; +import com.pcloud.booksflow.form.mybatis.entity.FormTemplateFieldExample; +import com.pcloud.universe.commons.paging.PaginationMapper; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FormTemplateFieldMapper extends PaginationMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + long countByExample(FormTemplateFieldExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + int deleteByExample(FormTemplateFieldExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + int insert(FormTemplateField record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + int insertSelective(FormTemplateField record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + List selectByExampleWithBLOBs(FormTemplateFieldExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + List selectByExample(FormTemplateFieldExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + FormTemplateField selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") FormTemplateField record, @Param("example") FormTemplateFieldExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + int updateByExampleWithBLOBs(@Param("record") FormTemplateField record, @Param("example") FormTemplateFieldExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + int updateByExample(@Param("record") FormTemplateField record, @Param("example") FormTemplateFieldExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(FormTemplateField record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + int updateByPrimaryKeyWithBLOBs(FormTemplateField record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + int updateByPrimaryKey(FormTemplateField record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + List selectByExampleWithPaging(@Param("example") FormTemplateFieldExample example, @Param("offset") int offset, @Param("limit") int limit); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + FormTemplateField selectOneByExample(FormTemplateFieldExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template_field + * + * @mbg.generated + */ + int batchInsert(@Param("list") List list); +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateFieldMapperExt.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateFieldMapperExt.java new file mode 100644 index 000000000..4715f0ddd --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateFieldMapperExt.java @@ -0,0 +1,4 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +public interface FormTemplateFieldMapperExt extends FormTemplateFieldMapper { +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateMapper.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateMapper.java new file mode 100644 index 000000000..5b24bb810 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateMapper.java @@ -0,0 +1,121 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +import com.pcloud.booksflow.form.mybatis.entity.FormTemplate; +import com.pcloud.booksflow.form.mybatis.entity.FormTemplateExample; +import com.pcloud.universe.commons.paging.PaginationMapper; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FormTemplateMapper extends PaginationMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + long countByExample(FormTemplateExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + int deleteByExample(FormTemplateExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + int insert(FormTemplate record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + int insertSelective(FormTemplate record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + List selectByExample(FormTemplateExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + FormTemplate selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") FormTemplate record, @Param("example") FormTemplateExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + int updateByExample(@Param("record") FormTemplate record, @Param("example") FormTemplateExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(FormTemplate record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + int updateByPrimaryKey(FormTemplate record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + List selectByExampleWithPaging(@Param("example") FormTemplateExample example, @Param("offset") int offset, @Param("limit") int limit); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + FormTemplate selectOneByExample(FormTemplateExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table form_template + * + * @mbg.generated + */ + int batchInsert(@Param("list") List list); +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateMapperExt.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateMapperExt.java new file mode 100644 index 000000000..c7bdc4cd4 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/FormTemplateMapperExt.java @@ -0,0 +1,4 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +public interface FormTemplateMapperExt extends FormTemplateMapper { +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/ModifyLogRecordMapper.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/ModifyLogRecordMapper.java new file mode 100644 index 000000000..5be9e2407 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/ModifyLogRecordMapper.java @@ -0,0 +1,121 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +import com.pcloud.booksflow.form.mybatis.entity.ModifyLogRecord; +import com.pcloud.booksflow.form.mybatis.entity.ModifyLogRecordExample; +import com.pcloud.universe.commons.paging.PaginationMapper; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ModifyLogRecordMapper extends PaginationMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + long countByExample(ModifyLogRecordExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + int deleteByExample(ModifyLogRecordExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + int insert(ModifyLogRecord record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + int insertSelective(ModifyLogRecord record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + List selectByExample(ModifyLogRecordExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + ModifyLogRecord selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") ModifyLogRecord record, @Param("example") ModifyLogRecordExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + int updateByExample(@Param("record") ModifyLogRecord record, @Param("example") ModifyLogRecordExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(ModifyLogRecord record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + int updateByPrimaryKey(ModifyLogRecord record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + List selectByExampleWithPaging(@Param("example") ModifyLogRecordExample example, @Param("offset") int offset, @Param("limit") int limit); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + ModifyLogRecord selectOneByExample(ModifyLogRecordExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table modify_log_record + * + * @mbg.generated + */ + int batchInsert(@Param("list") List list); +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/ModifyLogRecordMapperExt.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/ModifyLogRecordMapperExt.java new file mode 100644 index 000000000..94310ec5f --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/ModifyLogRecordMapperExt.java @@ -0,0 +1,4 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +public interface ModifyLogRecordMapperExt extends ModifyLogRecordMapper { +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/TenantInitStatusMapper.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/TenantInitStatusMapper.java new file mode 100644 index 000000000..4766d8b87 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/TenantInitStatusMapper.java @@ -0,0 +1,121 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +import com.pcloud.booksflow.form.mybatis.entity.TenantInitStatus; +import com.pcloud.booksflow.form.mybatis.entity.TenantInitStatusExample; +import com.pcloud.universe.commons.paging.PaginationMapper; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TenantInitStatusMapper extends PaginationMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + long countByExample(TenantInitStatusExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + int deleteByExample(TenantInitStatusExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + int insert(TenantInitStatus record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + int insertSelective(TenantInitStatus record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + List selectByExample(TenantInitStatusExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + TenantInitStatus selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") TenantInitStatus record, @Param("example") TenantInitStatusExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + int updateByExample(@Param("record") TenantInitStatus record, @Param("example") TenantInitStatusExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(TenantInitStatus record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + int updateByPrimaryKey(TenantInitStatus record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + List selectByExampleWithPaging(@Param("example") TenantInitStatusExample example, @Param("offset") int offset, @Param("limit") int limit); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + TenantInitStatus selectOneByExample(TenantInitStatusExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table tenant_init_status + * + * @mbg.generated + */ + int batchInsert(@Param("list") List list); +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/TenantInitStatusMapperExt.java b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/TenantInitStatusMapperExt.java new file mode 100644 index 000000000..6963be845 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/java/com/pcloud/booksflow/form/mybatis/mapper/TenantInitStatusMapperExt.java @@ -0,0 +1,4 @@ +package com.pcloud.booksflow.form.mybatis.mapper; + +public interface TenantInitStatusMapperExt extends TenantInitStatusMapper { +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormDictMapper.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormDictMapper.xml new file mode 100644 index 000000000..57dc80944 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormDictMapper.xml @@ -0,0 +1,385 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, `name`, code, remarks, created_by, updated_by, create_time, update_time, deleted + + + + + + delete from form_dict + where id = #{id,jdbcType=BIGINT} + + + + delete from form_dict + + + + + + + + SELECT LAST_INSERT_ID() + + insert into form_dict (`name`, code, remarks, + created_by, updated_by, create_time, + update_time, deleted) + values (#{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, + #{createdBy,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, + #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT}) + + + + + SELECT LAST_INSERT_ID() + + insert into form_dict + + + `name`, + + + code, + + + remarks, + + + created_by, + + + updated_by, + + + create_time, + + + update_time, + + + deleted, + + + + + #{name,jdbcType=VARCHAR}, + + + #{code,jdbcType=VARCHAR}, + + + #{remarks,jdbcType=VARCHAR}, + + + #{createdBy,jdbcType=BIGINT}, + + + #{updatedBy,jdbcType=BIGINT}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{deleted,jdbcType=TINYINT}, + + + + + + + update form_dict + + + id = #{record.id,jdbcType=BIGINT}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + code = #{record.code,jdbcType=VARCHAR}, + + + remarks = #{record.remarks,jdbcType=VARCHAR}, + + + created_by = #{record.createdBy,jdbcType=BIGINT}, + + + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + deleted = #{record.deleted,jdbcType=TINYINT}, + + + + + + + + + update form_dict + set id = #{record.id,jdbcType=BIGINT}, + `name` = #{record.name,jdbcType=VARCHAR}, + code = #{record.code,jdbcType=VARCHAR}, + remarks = #{record.remarks,jdbcType=VARCHAR}, + created_by = #{record.createdBy,jdbcType=BIGINT}, + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + deleted = #{record.deleted,jdbcType=TINYINT} + + + + + + + update form_dict + + + `name` = #{name,jdbcType=VARCHAR}, + + + code = #{code,jdbcType=VARCHAR}, + + + remarks = #{remarks,jdbcType=VARCHAR}, + + + created_by = #{createdBy,jdbcType=BIGINT}, + + + updated_by = #{updatedBy,jdbcType=BIGINT}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + deleted = #{deleted,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + + update form_dict + set `name` = #{name,jdbcType=VARCHAR}, + code = #{code,jdbcType=VARCHAR}, + remarks = #{remarks,jdbcType=VARCHAR}, + created_by = #{createdBy,jdbcType=BIGINT}, + updated_by = #{updatedBy,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + deleted = #{deleted,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + + + + + insert into form_dict (`name`, + code, remarks, created_by, + updated_by, create_time, update_time, + deleted) + values (#{item.name,jdbcType=VARCHAR}, + #{item.code,jdbcType=VARCHAR}, #{item.remarks,jdbcType=VARCHAR}, #{item.createdBy,jdbcType=BIGINT}, + #{item.updatedBy,jdbcType=BIGINT}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, + #{item.deleted,jdbcType=TINYINT}) + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormDictMapperExt.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormDictMapperExt.xml new file mode 100644 index 000000000..39a5e7e6b --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormDictMapperExt.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormFieldDictMapper.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormFieldDictMapper.xml new file mode 100644 index 000000000..9ed1a99e1 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormFieldDictMapper.xml @@ -0,0 +1,547 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, config_type, `name`, code, parent_id, check_ids, sort_order, `status`, created_by, + updated_by, create_time, update_time, deleted + + + + other_fields + + + + + + + delete from form_field_dict + where id = #{id,jdbcType=BIGINT} + + + + delete from form_field_dict + + + + + + + + SELECT LAST_INSERT_ID() + + insert into form_field_dict (config_type, `name`, code, + parent_id, check_ids, sort_order, + `status`, created_by, updated_by, + create_time, update_time, deleted, + other_fields) + values (#{configType,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, + #{parentId,jdbcType=BIGINT}, #{checkIds,jdbcType=VARCHAR}, #{sortOrder,jdbcType=INTEGER}, + #{status,jdbcType=TINYINT}, #{createdBy,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT}, + #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT}, + #{otherFields,jdbcType=LONGVARCHAR}) + + + + + SELECT LAST_INSERT_ID() + + insert into form_field_dict + + + config_type, + + + `name`, + + + code, + + + parent_id, + + + check_ids, + + + sort_order, + + + `status`, + + + created_by, + + + updated_by, + + + create_time, + + + update_time, + + + deleted, + + + other_fields, + + + + + #{configType,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{code,jdbcType=VARCHAR}, + + + #{parentId,jdbcType=BIGINT}, + + + #{checkIds,jdbcType=VARCHAR}, + + + #{sortOrder,jdbcType=INTEGER}, + + + #{status,jdbcType=TINYINT}, + + + #{createdBy,jdbcType=BIGINT}, + + + #{updatedBy,jdbcType=BIGINT}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{deleted,jdbcType=TINYINT}, + + + #{otherFields,jdbcType=LONGVARCHAR}, + + + + + + + update form_field_dict + + + id = #{record.id,jdbcType=BIGINT}, + + + config_type = #{record.configType,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + code = #{record.code,jdbcType=VARCHAR}, + + + parent_id = #{record.parentId,jdbcType=BIGINT}, + + + check_ids = #{record.checkIds,jdbcType=VARCHAR}, + + + sort_order = #{record.sortOrder,jdbcType=INTEGER}, + + + `status` = #{record.status,jdbcType=TINYINT}, + + + created_by = #{record.createdBy,jdbcType=BIGINT}, + + + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + deleted = #{record.deleted,jdbcType=TINYINT}, + + + other_fields = #{record.otherFields,jdbcType=LONGVARCHAR}, + + + + + + + + + update form_field_dict + set id = #{record.id,jdbcType=BIGINT}, + config_type = #{record.configType,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + code = #{record.code,jdbcType=VARCHAR}, + parent_id = #{record.parentId,jdbcType=BIGINT}, + check_ids = #{record.checkIds,jdbcType=VARCHAR}, + sort_order = #{record.sortOrder,jdbcType=INTEGER}, + `status` = #{record.status,jdbcType=TINYINT}, + created_by = #{record.createdBy,jdbcType=BIGINT}, + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + deleted = #{record.deleted,jdbcType=TINYINT}, + other_fields = #{record.otherFields,jdbcType=LONGVARCHAR} + + + + + + + update form_field_dict + set id = #{record.id,jdbcType=BIGINT}, + config_type = #{record.configType,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + code = #{record.code,jdbcType=VARCHAR}, + parent_id = #{record.parentId,jdbcType=BIGINT}, + check_ids = #{record.checkIds,jdbcType=VARCHAR}, + sort_order = #{record.sortOrder,jdbcType=INTEGER}, + `status` = #{record.status,jdbcType=TINYINT}, + created_by = #{record.createdBy,jdbcType=BIGINT}, + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + deleted = #{record.deleted,jdbcType=TINYINT} + + + + + + + update form_field_dict + + + config_type = #{configType,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + code = #{code,jdbcType=VARCHAR}, + + + parent_id = #{parentId,jdbcType=BIGINT}, + + + check_ids = #{checkIds,jdbcType=VARCHAR}, + + + sort_order = #{sortOrder,jdbcType=INTEGER}, + + + `status` = #{status,jdbcType=TINYINT}, + + + created_by = #{createdBy,jdbcType=BIGINT}, + + + updated_by = #{updatedBy,jdbcType=BIGINT}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + deleted = #{deleted,jdbcType=TINYINT}, + + + other_fields = #{otherFields,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + + update form_field_dict + set config_type = #{configType,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + code = #{code,jdbcType=VARCHAR}, + parent_id = #{parentId,jdbcType=BIGINT}, + check_ids = #{checkIds,jdbcType=VARCHAR}, + sort_order = #{sortOrder,jdbcType=INTEGER}, + `status` = #{status,jdbcType=TINYINT}, + created_by = #{createdBy,jdbcType=BIGINT}, + updated_by = #{updatedBy,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + deleted = #{deleted,jdbcType=TINYINT}, + other_fields = #{otherFields,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=BIGINT} + + + + update form_field_dict + set config_type = #{configType,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + code = #{code,jdbcType=VARCHAR}, + parent_id = #{parentId,jdbcType=BIGINT}, + check_ids = #{checkIds,jdbcType=VARCHAR}, + sort_order = #{sortOrder,jdbcType=INTEGER}, + `status` = #{status,jdbcType=TINYINT}, + created_by = #{createdBy,jdbcType=BIGINT}, + updated_by = #{updatedBy,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + deleted = #{deleted,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + + + + + insert into form_field_dict (config_type, + `name`, code, parent_id, + check_ids, sort_order, `status`, + created_by, updated_by, create_time, + update_time, deleted, other_fields + ) + values (#{item.configType,jdbcType=VARCHAR}, + #{item.name,jdbcType=VARCHAR}, #{item.code,jdbcType=VARCHAR}, #{item.parentId,jdbcType=BIGINT}, + #{item.checkIds,jdbcType=VARCHAR}, #{item.sortOrder,jdbcType=INTEGER}, #{item.status,jdbcType=TINYINT}, + #{item.createdBy,jdbcType=BIGINT}, #{item.updatedBy,jdbcType=BIGINT}, #{item.createTime,jdbcType=TIMESTAMP}, + #{item.updateTime,jdbcType=TIMESTAMP}, #{item.deleted,jdbcType=TINYINT}, #{item.otherFields,jdbcType=LONGVARCHAR} + ) + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormFieldDictMapperExt.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormFieldDictMapperExt.xml new file mode 100644 index 000000000..95e33584a --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormFieldDictMapperExt.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormMapper.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormMapper.xml new file mode 100644 index 000000000..03cb2c4e9 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormMapper.xml @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, `name`, code + + + + + + delete from form + where id = #{id,jdbcType=BIGINT} + + + + delete from form + + + + + + + + SELECT LAST_INSERT_ID() + + insert into form (`name`, code) + values (#{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}) + + + + + SELECT LAST_INSERT_ID() + + insert into form + + + `name`, + + + code, + + + + + #{name,jdbcType=VARCHAR}, + + + #{code,jdbcType=VARCHAR}, + + + + + + + update form + + + id = #{record.id,jdbcType=BIGINT}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + code = #{record.code,jdbcType=VARCHAR}, + + + + + + + + + update form + set id = #{record.id,jdbcType=BIGINT}, + `name` = #{record.name,jdbcType=VARCHAR}, + code = #{record.code,jdbcType=VARCHAR} + + + + + + + update form + + + `name` = #{name,jdbcType=VARCHAR}, + + + code = #{code,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + + update form + set `name` = #{name,jdbcType=VARCHAR}, + code = #{code,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + + + + + insert into form (`name`, + code) + values (#{item.name,jdbcType=VARCHAR}, + #{item.code,jdbcType=VARCHAR}) + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormMapperExt.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormMapperExt.xml new file mode 100644 index 000000000..37f4ad665 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormMapperExt.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigMapper.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigMapper.xml new file mode 100644 index 000000000..e77ae7b4a --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigMapper.xml @@ -0,0 +1,767 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, form_id, main_title, sub_title, display_format, document_no_prefix, show_document_no, + print_date_format, show_print_date, show_page_number, column_width_mode, table_style, + row_height, file_size, file_name, file_type, file_wps_id, file_url_ai, file_url, + `mode`, created_by, updated_by, create_time, update_time + + + + print_fields, ext + + + + + + + delete from form_print_config + where id = #{id,jdbcType=BIGINT} + + + + delete from form_print_config + + + + + + + + SELECT LAST_INSERT_ID() + + insert into form_print_config (form_id, main_title, sub_title, + display_format, document_no_prefix, show_document_no, + print_date_format, show_print_date, show_page_number, + column_width_mode, table_style, row_height, + file_size, file_name, file_type, + file_wps_id, file_url_ai, file_url, + `mode`, created_by, updated_by, + create_time, update_time, print_fields, + ext) + values (#{formId,jdbcType=BIGINT}, #{mainTitle,jdbcType=VARCHAR}, #{subTitle,jdbcType=VARCHAR}, + #{displayFormat,jdbcType=VARCHAR}, #{documentNoPrefix,jdbcType=VARCHAR}, #{showDocumentNo,jdbcType=BIT}, + #{printDateFormat,jdbcType=VARCHAR}, #{showPrintDate,jdbcType=BIT}, #{showPageNumber,jdbcType=BIT}, + #{columnWidthMode,jdbcType=VARCHAR}, #{tableStyle,jdbcType=VARCHAR}, #{rowHeight,jdbcType=VARCHAR}, + #{fileSize,jdbcType=INTEGER}, #{fileName,jdbcType=VARCHAR}, #{fileType,jdbcType=VARCHAR}, + #{fileWpsId,jdbcType=VARCHAR}, #{fileUrlAi,jdbcType=VARCHAR}, #{fileUrl,jdbcType=VARCHAR}, + #{mode,jdbcType=INTEGER}, #{createdBy,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT}, + #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{printFields,jdbcType=LONGVARCHAR}, + #{ext,jdbcType=LONGVARCHAR}) + + + + + SELECT LAST_INSERT_ID() + + insert into form_print_config + + + form_id, + + + main_title, + + + sub_title, + + + display_format, + + + document_no_prefix, + + + show_document_no, + + + print_date_format, + + + show_print_date, + + + show_page_number, + + + column_width_mode, + + + table_style, + + + row_height, + + + file_size, + + + file_name, + + + file_type, + + + file_wps_id, + + + file_url_ai, + + + file_url, + + + `mode`, + + + created_by, + + + updated_by, + + + create_time, + + + update_time, + + + print_fields, + + + ext, + + + + + #{formId,jdbcType=BIGINT}, + + + #{mainTitle,jdbcType=VARCHAR}, + + + #{subTitle,jdbcType=VARCHAR}, + + + #{displayFormat,jdbcType=VARCHAR}, + + + #{documentNoPrefix,jdbcType=VARCHAR}, + + + #{showDocumentNo,jdbcType=BIT}, + + + #{printDateFormat,jdbcType=VARCHAR}, + + + #{showPrintDate,jdbcType=BIT}, + + + #{showPageNumber,jdbcType=BIT}, + + + #{columnWidthMode,jdbcType=VARCHAR}, + + + #{tableStyle,jdbcType=VARCHAR}, + + + #{rowHeight,jdbcType=VARCHAR}, + + + #{fileSize,jdbcType=INTEGER}, + + + #{fileName,jdbcType=VARCHAR}, + + + #{fileType,jdbcType=VARCHAR}, + + + #{fileWpsId,jdbcType=VARCHAR}, + + + #{fileUrlAi,jdbcType=VARCHAR}, + + + #{fileUrl,jdbcType=VARCHAR}, + + + #{mode,jdbcType=INTEGER}, + + + #{createdBy,jdbcType=BIGINT}, + + + #{updatedBy,jdbcType=BIGINT}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{printFields,jdbcType=LONGVARCHAR}, + + + #{ext,jdbcType=LONGVARCHAR}, + + + + + + + update form_print_config + + + id = #{record.id,jdbcType=BIGINT}, + + + form_id = #{record.formId,jdbcType=BIGINT}, + + + main_title = #{record.mainTitle,jdbcType=VARCHAR}, + + + sub_title = #{record.subTitle,jdbcType=VARCHAR}, + + + display_format = #{record.displayFormat,jdbcType=VARCHAR}, + + + document_no_prefix = #{record.documentNoPrefix,jdbcType=VARCHAR}, + + + show_document_no = #{record.showDocumentNo,jdbcType=BIT}, + + + print_date_format = #{record.printDateFormat,jdbcType=VARCHAR}, + + + show_print_date = #{record.showPrintDate,jdbcType=BIT}, + + + show_page_number = #{record.showPageNumber,jdbcType=BIT}, + + + column_width_mode = #{record.columnWidthMode,jdbcType=VARCHAR}, + + + table_style = #{record.tableStyle,jdbcType=VARCHAR}, + + + row_height = #{record.rowHeight,jdbcType=VARCHAR}, + + + file_size = #{record.fileSize,jdbcType=INTEGER}, + + + file_name = #{record.fileName,jdbcType=VARCHAR}, + + + file_type = #{record.fileType,jdbcType=VARCHAR}, + + + file_wps_id = #{record.fileWpsId,jdbcType=VARCHAR}, + + + file_url_ai = #{record.fileUrlAi,jdbcType=VARCHAR}, + + + file_url = #{record.fileUrl,jdbcType=VARCHAR}, + + + `mode` = #{record.mode,jdbcType=INTEGER}, + + + created_by = #{record.createdBy,jdbcType=BIGINT}, + + + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + print_fields = #{record.printFields,jdbcType=LONGVARCHAR}, + + + ext = #{record.ext,jdbcType=LONGVARCHAR}, + + + + + + + + + update form_print_config + set id = #{record.id,jdbcType=BIGINT}, + form_id = #{record.formId,jdbcType=BIGINT}, + main_title = #{record.mainTitle,jdbcType=VARCHAR}, + sub_title = #{record.subTitle,jdbcType=VARCHAR}, + display_format = #{record.displayFormat,jdbcType=VARCHAR}, + document_no_prefix = #{record.documentNoPrefix,jdbcType=VARCHAR}, + show_document_no = #{record.showDocumentNo,jdbcType=BIT}, + print_date_format = #{record.printDateFormat,jdbcType=VARCHAR}, + show_print_date = #{record.showPrintDate,jdbcType=BIT}, + show_page_number = #{record.showPageNumber,jdbcType=BIT}, + column_width_mode = #{record.columnWidthMode,jdbcType=VARCHAR}, + table_style = #{record.tableStyle,jdbcType=VARCHAR}, + row_height = #{record.rowHeight,jdbcType=VARCHAR}, + file_size = #{record.fileSize,jdbcType=INTEGER}, + file_name = #{record.fileName,jdbcType=VARCHAR}, + file_type = #{record.fileType,jdbcType=VARCHAR}, + file_wps_id = #{record.fileWpsId,jdbcType=VARCHAR}, + file_url_ai = #{record.fileUrlAi,jdbcType=VARCHAR}, + file_url = #{record.fileUrl,jdbcType=VARCHAR}, + `mode` = #{record.mode,jdbcType=INTEGER}, + created_by = #{record.createdBy,jdbcType=BIGINT}, + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + print_fields = #{record.printFields,jdbcType=LONGVARCHAR}, + ext = #{record.ext,jdbcType=LONGVARCHAR} + + + + + + + update form_print_config + set id = #{record.id,jdbcType=BIGINT}, + form_id = #{record.formId,jdbcType=BIGINT}, + main_title = #{record.mainTitle,jdbcType=VARCHAR}, + sub_title = #{record.subTitle,jdbcType=VARCHAR}, + display_format = #{record.displayFormat,jdbcType=VARCHAR}, + document_no_prefix = #{record.documentNoPrefix,jdbcType=VARCHAR}, + show_document_no = #{record.showDocumentNo,jdbcType=BIT}, + print_date_format = #{record.printDateFormat,jdbcType=VARCHAR}, + show_print_date = #{record.showPrintDate,jdbcType=BIT}, + show_page_number = #{record.showPageNumber,jdbcType=BIT}, + column_width_mode = #{record.columnWidthMode,jdbcType=VARCHAR}, + table_style = #{record.tableStyle,jdbcType=VARCHAR}, + row_height = #{record.rowHeight,jdbcType=VARCHAR}, + file_size = #{record.fileSize,jdbcType=INTEGER}, + file_name = #{record.fileName,jdbcType=VARCHAR}, + file_type = #{record.fileType,jdbcType=VARCHAR}, + file_wps_id = #{record.fileWpsId,jdbcType=VARCHAR}, + file_url_ai = #{record.fileUrlAi,jdbcType=VARCHAR}, + file_url = #{record.fileUrl,jdbcType=VARCHAR}, + `mode` = #{record.mode,jdbcType=INTEGER}, + created_by = #{record.createdBy,jdbcType=BIGINT}, + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP} + + + + + + + update form_print_config + + + form_id = #{formId,jdbcType=BIGINT}, + + + main_title = #{mainTitle,jdbcType=VARCHAR}, + + + sub_title = #{subTitle,jdbcType=VARCHAR}, + + + display_format = #{displayFormat,jdbcType=VARCHAR}, + + + document_no_prefix = #{documentNoPrefix,jdbcType=VARCHAR}, + + + show_document_no = #{showDocumentNo,jdbcType=BIT}, + + + print_date_format = #{printDateFormat,jdbcType=VARCHAR}, + + + show_print_date = #{showPrintDate,jdbcType=BIT}, + + + show_page_number = #{showPageNumber,jdbcType=BIT}, + + + column_width_mode = #{columnWidthMode,jdbcType=VARCHAR}, + + + table_style = #{tableStyle,jdbcType=VARCHAR}, + + + row_height = #{rowHeight,jdbcType=VARCHAR}, + + + file_size = #{fileSize,jdbcType=INTEGER}, + + + file_name = #{fileName,jdbcType=VARCHAR}, + + + file_type = #{fileType,jdbcType=VARCHAR}, + + + file_wps_id = #{fileWpsId,jdbcType=VARCHAR}, + + + file_url_ai = #{fileUrlAi,jdbcType=VARCHAR}, + + + file_url = #{fileUrl,jdbcType=VARCHAR}, + + + `mode` = #{mode,jdbcType=INTEGER}, + + + created_by = #{createdBy,jdbcType=BIGINT}, + + + updated_by = #{updatedBy,jdbcType=BIGINT}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + print_fields = #{printFields,jdbcType=LONGVARCHAR}, + + + ext = #{ext,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + + update form_print_config + set form_id = #{formId,jdbcType=BIGINT}, + main_title = #{mainTitle,jdbcType=VARCHAR}, + sub_title = #{subTitle,jdbcType=VARCHAR}, + display_format = #{displayFormat,jdbcType=VARCHAR}, + document_no_prefix = #{documentNoPrefix,jdbcType=VARCHAR}, + show_document_no = #{showDocumentNo,jdbcType=BIT}, + print_date_format = #{printDateFormat,jdbcType=VARCHAR}, + show_print_date = #{showPrintDate,jdbcType=BIT}, + show_page_number = #{showPageNumber,jdbcType=BIT}, + column_width_mode = #{columnWidthMode,jdbcType=VARCHAR}, + table_style = #{tableStyle,jdbcType=VARCHAR}, + row_height = #{rowHeight,jdbcType=VARCHAR}, + file_size = #{fileSize,jdbcType=INTEGER}, + file_name = #{fileName,jdbcType=VARCHAR}, + file_type = #{fileType,jdbcType=VARCHAR}, + file_wps_id = #{fileWpsId,jdbcType=VARCHAR}, + file_url_ai = #{fileUrlAi,jdbcType=VARCHAR}, + file_url = #{fileUrl,jdbcType=VARCHAR}, + `mode` = #{mode,jdbcType=INTEGER}, + created_by = #{createdBy,jdbcType=BIGINT}, + updated_by = #{updatedBy,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + print_fields = #{printFields,jdbcType=LONGVARCHAR}, + ext = #{ext,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=BIGINT} + + + + update form_print_config + set form_id = #{formId,jdbcType=BIGINT}, + main_title = #{mainTitle,jdbcType=VARCHAR}, + sub_title = #{subTitle,jdbcType=VARCHAR}, + display_format = #{displayFormat,jdbcType=VARCHAR}, + document_no_prefix = #{documentNoPrefix,jdbcType=VARCHAR}, + show_document_no = #{showDocumentNo,jdbcType=BIT}, + print_date_format = #{printDateFormat,jdbcType=VARCHAR}, + show_print_date = #{showPrintDate,jdbcType=BIT}, + show_page_number = #{showPageNumber,jdbcType=BIT}, + column_width_mode = #{columnWidthMode,jdbcType=VARCHAR}, + table_style = #{tableStyle,jdbcType=VARCHAR}, + row_height = #{rowHeight,jdbcType=VARCHAR}, + file_size = #{fileSize,jdbcType=INTEGER}, + file_name = #{fileName,jdbcType=VARCHAR}, + file_type = #{fileType,jdbcType=VARCHAR}, + file_wps_id = #{fileWpsId,jdbcType=VARCHAR}, + file_url_ai = #{fileUrlAi,jdbcType=VARCHAR}, + file_url = #{fileUrl,jdbcType=VARCHAR}, + `mode` = #{mode,jdbcType=INTEGER}, + created_by = #{createdBy,jdbcType=BIGINT}, + updated_by = #{updatedBy,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=BIGINT} + + + + + + insert into form_print_config (form_id, + main_title, sub_title, display_format, + document_no_prefix, show_document_no, + print_date_format, show_print_date, show_page_number, + column_width_mode, table_style, + row_height, file_size, file_name, + file_type, file_wps_id, file_url_ai, + file_url, `mode`, created_by, + updated_by, create_time, update_time, + print_fields, ext) + values (#{item.formId,jdbcType=BIGINT}, + #{item.mainTitle,jdbcType=VARCHAR}, #{item.subTitle,jdbcType=VARCHAR}, #{item.displayFormat,jdbcType=VARCHAR}, + #{item.documentNoPrefix,jdbcType=VARCHAR}, #{item.showDocumentNo,jdbcType=BIT}, + #{item.printDateFormat,jdbcType=VARCHAR}, #{item.showPrintDate,jdbcType=BIT}, #{item.showPageNumber,jdbcType=BIT}, + #{item.columnWidthMode,jdbcType=VARCHAR}, #{item.tableStyle,jdbcType=VARCHAR}, + #{item.rowHeight,jdbcType=VARCHAR}, #{item.fileSize,jdbcType=INTEGER}, #{item.fileName,jdbcType=VARCHAR}, + #{item.fileType,jdbcType=VARCHAR}, #{item.fileWpsId,jdbcType=VARCHAR}, #{item.fileUrlAi,jdbcType=VARCHAR}, + #{item.fileUrl,jdbcType=VARCHAR}, #{item.mode,jdbcType=INTEGER}, #{item.createdBy,jdbcType=BIGINT}, + #{item.updatedBy,jdbcType=BIGINT}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, + #{item.printFields,jdbcType=LONGVARCHAR}, #{item.ext,jdbcType=LONGVARCHAR}) + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigMapperExt.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigMapperExt.xml new file mode 100644 index 000000000..6a171737c --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigMapperExt.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigTplMapper.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigTplMapper.xml new file mode 100644 index 000000000..eae5ff34d --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigTplMapper.xml @@ -0,0 +1,403 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, form_print_config_id, file_url, file_type, file_wps_id, created_by, updated_by, + create_time, update_time, deleted + + + + + + delete from form_print_config_tpl + where id = #{id,jdbcType=BIGINT} + + + + delete from form_print_config_tpl + + + + + + + + SELECT LAST_INSERT_ID() + + insert into form_print_config_tpl (form_print_config_id, file_url, file_type, + file_wps_id, created_by, updated_by, + create_time, update_time, deleted + ) + values (#{formPrintConfigId,jdbcType=BIGINT}, #{fileUrl,jdbcType=VARCHAR}, #{fileType,jdbcType=VARCHAR}, + #{fileWpsId,jdbcType=VARCHAR}, #{createdBy,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT}, + #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT} + ) + + + + + SELECT LAST_INSERT_ID() + + insert into form_print_config_tpl + + + form_print_config_id, + + + file_url, + + + file_type, + + + file_wps_id, + + + created_by, + + + updated_by, + + + create_time, + + + update_time, + + + deleted, + + + + + #{formPrintConfigId,jdbcType=BIGINT}, + + + #{fileUrl,jdbcType=VARCHAR}, + + + #{fileType,jdbcType=VARCHAR}, + + + #{fileWpsId,jdbcType=VARCHAR}, + + + #{createdBy,jdbcType=BIGINT}, + + + #{updatedBy,jdbcType=BIGINT}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{deleted,jdbcType=TINYINT}, + + + + + + + update form_print_config_tpl + + + id = #{record.id,jdbcType=BIGINT}, + + + form_print_config_id = #{record.formPrintConfigId,jdbcType=BIGINT}, + + + file_url = #{record.fileUrl,jdbcType=VARCHAR}, + + + file_type = #{record.fileType,jdbcType=VARCHAR}, + + + file_wps_id = #{record.fileWpsId,jdbcType=VARCHAR}, + + + created_by = #{record.createdBy,jdbcType=BIGINT}, + + + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + deleted = #{record.deleted,jdbcType=TINYINT}, + + + + + + + + + update form_print_config_tpl + set id = #{record.id,jdbcType=BIGINT}, + form_print_config_id = #{record.formPrintConfigId,jdbcType=BIGINT}, + file_url = #{record.fileUrl,jdbcType=VARCHAR}, + file_type = #{record.fileType,jdbcType=VARCHAR}, + file_wps_id = #{record.fileWpsId,jdbcType=VARCHAR}, + created_by = #{record.createdBy,jdbcType=BIGINT}, + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + deleted = #{record.deleted,jdbcType=TINYINT} + + + + + + + update form_print_config_tpl + + + form_print_config_id = #{formPrintConfigId,jdbcType=BIGINT}, + + + file_url = #{fileUrl,jdbcType=VARCHAR}, + + + file_type = #{fileType,jdbcType=VARCHAR}, + + + file_wps_id = #{fileWpsId,jdbcType=VARCHAR}, + + + created_by = #{createdBy,jdbcType=BIGINT}, + + + updated_by = #{updatedBy,jdbcType=BIGINT}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + deleted = #{deleted,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + + update form_print_config_tpl + set form_print_config_id = #{formPrintConfigId,jdbcType=BIGINT}, + file_url = #{fileUrl,jdbcType=VARCHAR}, + file_type = #{fileType,jdbcType=VARCHAR}, + file_wps_id = #{fileWpsId,jdbcType=VARCHAR}, + created_by = #{createdBy,jdbcType=BIGINT}, + updated_by = #{updatedBy,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + deleted = #{deleted,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + + + + + insert into form_print_config_tpl (form_print_config_id, + file_url, file_type, file_wps_id, + created_by, updated_by, create_time, + update_time, deleted) + values (#{item.formPrintConfigId,jdbcType=BIGINT}, + #{item.fileUrl,jdbcType=VARCHAR}, #{item.fileType,jdbcType=VARCHAR}, #{item.fileWpsId,jdbcType=VARCHAR}, + #{item.createdBy,jdbcType=BIGINT}, #{item.updatedBy,jdbcType=BIGINT}, #{item.createTime,jdbcType=TIMESTAMP}, + #{item.updateTime,jdbcType=TIMESTAMP}, #{item.deleted,jdbcType=TINYINT}) + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigTplMapperExt.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigTplMapperExt.xml new file mode 100644 index 000000000..e54f51930 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormPrintConfigTplMapperExt.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateFieldMapper.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateFieldMapper.xml new file mode 100644 index 000000000..b4f8d6408 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateFieldMapper.xml @@ -0,0 +1,769 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, template_id, code, parent_id, title, show_title, db_field, required, `show`, + dcode, line, `type`, fixed, fmt_constraint, edit, sort_order, cascade_close, cascade_open, + edit_disabled_msg, edit_disabled, show_cascade, created_by, updated_by, create_time, + update_time + + + + ext + + + + + + + delete from form_template_field + where id = #{id,jdbcType=BIGINT} + + + + delete from form_template_field + + + + + + + + SELECT LAST_INSERT_ID() + + insert into form_template_field (template_id, code, parent_id, + title, show_title, db_field, + required, `show`, dcode, line, + `type`, fixed, fmt_constraint, + edit, sort_order, cascade_close, + cascade_open, edit_disabled_msg, edit_disabled, + show_cascade, created_by, updated_by, + create_time, update_time, ext + ) + values (#{templateId,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{parentId,jdbcType=BIGINT}, + #{title,jdbcType=VARCHAR}, #{showTitle,jdbcType=VARCHAR}, #{dbField,jdbcType=VARCHAR}, + #{required,jdbcType=BIT}, #{show,jdbcType=BIT}, #{dcode,jdbcType=VARCHAR}, #{line,jdbcType=TINYINT}, + #{type,jdbcType=VARCHAR}, #{fixed,jdbcType=BIT}, #{fmtConstraint,jdbcType=VARCHAR}, + #{edit,jdbcType=BIT}, #{sortOrder,jdbcType=INTEGER}, #{cascadeClose,jdbcType=VARCHAR}, + #{cascadeOpen,jdbcType=VARCHAR}, #{editDisabledMsg,jdbcType=VARCHAR}, #{editDisabled,jdbcType=BIT}, + #{showCascade,jdbcType=VARCHAR}, #{createdBy,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT}, + #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{ext,jdbcType=LONGVARCHAR} + ) + + + + + SELECT LAST_INSERT_ID() + + insert into form_template_field + + + template_id, + + + code, + + + parent_id, + + + title, + + + show_title, + + + db_field, + + + required, + + + `show`, + + + dcode, + + + line, + + + `type`, + + + fixed, + + + fmt_constraint, + + + edit, + + + sort_order, + + + cascade_close, + + + cascade_open, + + + edit_disabled_msg, + + + edit_disabled, + + + show_cascade, + + + created_by, + + + updated_by, + + + create_time, + + + update_time, + + + ext, + + + + + #{templateId,jdbcType=BIGINT}, + + + #{code,jdbcType=VARCHAR}, + + + #{parentId,jdbcType=BIGINT}, + + + #{title,jdbcType=VARCHAR}, + + + #{showTitle,jdbcType=VARCHAR}, + + + #{dbField,jdbcType=VARCHAR}, + + + #{required,jdbcType=BIT}, + + + #{show,jdbcType=BIT}, + + + #{dcode,jdbcType=VARCHAR}, + + + #{line,jdbcType=TINYINT}, + + + #{type,jdbcType=VARCHAR}, + + + #{fixed,jdbcType=BIT}, + + + #{fmtConstraint,jdbcType=VARCHAR}, + + + #{edit,jdbcType=BIT}, + + + #{sortOrder,jdbcType=INTEGER}, + + + #{cascadeClose,jdbcType=VARCHAR}, + + + #{cascadeOpen,jdbcType=VARCHAR}, + + + #{editDisabledMsg,jdbcType=VARCHAR}, + + + #{editDisabled,jdbcType=BIT}, + + + #{showCascade,jdbcType=VARCHAR}, + + + #{createdBy,jdbcType=BIGINT}, + + + #{updatedBy,jdbcType=BIGINT}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{ext,jdbcType=LONGVARCHAR}, + + + + + + + update form_template_field + + + id = #{record.id,jdbcType=BIGINT}, + + + template_id = #{record.templateId,jdbcType=BIGINT}, + + + code = #{record.code,jdbcType=VARCHAR}, + + + parent_id = #{record.parentId,jdbcType=BIGINT}, + + + title = #{record.title,jdbcType=VARCHAR}, + + + show_title = #{record.showTitle,jdbcType=VARCHAR}, + + + db_field = #{record.dbField,jdbcType=VARCHAR}, + + + required = #{record.required,jdbcType=BIT}, + + + `show` = #{record.show,jdbcType=BIT}, + + + dcode = #{record.dcode,jdbcType=VARCHAR}, + + + line = #{record.line,jdbcType=TINYINT}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + fixed = #{record.fixed,jdbcType=BIT}, + + + fmt_constraint = #{record.fmtConstraint,jdbcType=VARCHAR}, + + + edit = #{record.edit,jdbcType=BIT}, + + + sort_order = #{record.sortOrder,jdbcType=INTEGER}, + + + cascade_close = #{record.cascadeClose,jdbcType=VARCHAR}, + + + cascade_open = #{record.cascadeOpen,jdbcType=VARCHAR}, + + + edit_disabled_msg = #{record.editDisabledMsg,jdbcType=VARCHAR}, + + + edit_disabled = #{record.editDisabled,jdbcType=BIT}, + + + show_cascade = #{record.showCascade,jdbcType=VARCHAR}, + + + created_by = #{record.createdBy,jdbcType=BIGINT}, + + + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + ext = #{record.ext,jdbcType=LONGVARCHAR}, + + + + + + + + + update form_template_field + set id = #{record.id,jdbcType=BIGINT}, + template_id = #{record.templateId,jdbcType=BIGINT}, + code = #{record.code,jdbcType=VARCHAR}, + parent_id = #{record.parentId,jdbcType=BIGINT}, + title = #{record.title,jdbcType=VARCHAR}, + show_title = #{record.showTitle,jdbcType=VARCHAR}, + db_field = #{record.dbField,jdbcType=VARCHAR}, + required = #{record.required,jdbcType=BIT}, + `show` = #{record.show,jdbcType=BIT}, + dcode = #{record.dcode,jdbcType=VARCHAR}, + line = #{record.line,jdbcType=TINYINT}, + `type` = #{record.type,jdbcType=VARCHAR}, + fixed = #{record.fixed,jdbcType=BIT}, + fmt_constraint = #{record.fmtConstraint,jdbcType=VARCHAR}, + edit = #{record.edit,jdbcType=BIT}, + sort_order = #{record.sortOrder,jdbcType=INTEGER}, + cascade_close = #{record.cascadeClose,jdbcType=VARCHAR}, + cascade_open = #{record.cascadeOpen,jdbcType=VARCHAR}, + edit_disabled_msg = #{record.editDisabledMsg,jdbcType=VARCHAR}, + edit_disabled = #{record.editDisabled,jdbcType=BIT}, + show_cascade = #{record.showCascade,jdbcType=VARCHAR}, + created_by = #{record.createdBy,jdbcType=BIGINT}, + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + ext = #{record.ext,jdbcType=LONGVARCHAR} + + + + + + + update form_template_field + set id = #{record.id,jdbcType=BIGINT}, + template_id = #{record.templateId,jdbcType=BIGINT}, + code = #{record.code,jdbcType=VARCHAR}, + parent_id = #{record.parentId,jdbcType=BIGINT}, + title = #{record.title,jdbcType=VARCHAR}, + show_title = #{record.showTitle,jdbcType=VARCHAR}, + db_field = #{record.dbField,jdbcType=VARCHAR}, + required = #{record.required,jdbcType=BIT}, + `show` = #{record.show,jdbcType=BIT}, + dcode = #{record.dcode,jdbcType=VARCHAR}, + line = #{record.line,jdbcType=TINYINT}, + `type` = #{record.type,jdbcType=VARCHAR}, + fixed = #{record.fixed,jdbcType=BIT}, + fmt_constraint = #{record.fmtConstraint,jdbcType=VARCHAR}, + edit = #{record.edit,jdbcType=BIT}, + sort_order = #{record.sortOrder,jdbcType=INTEGER}, + cascade_close = #{record.cascadeClose,jdbcType=VARCHAR}, + cascade_open = #{record.cascadeOpen,jdbcType=VARCHAR}, + edit_disabled_msg = #{record.editDisabledMsg,jdbcType=VARCHAR}, + edit_disabled = #{record.editDisabled,jdbcType=BIT}, + show_cascade = #{record.showCascade,jdbcType=VARCHAR}, + created_by = #{record.createdBy,jdbcType=BIGINT}, + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP} + + + + + + + update form_template_field + + + template_id = #{templateId,jdbcType=BIGINT}, + + + code = #{code,jdbcType=VARCHAR}, + + + parent_id = #{parentId,jdbcType=BIGINT}, + + + title = #{title,jdbcType=VARCHAR}, + + + show_title = #{showTitle,jdbcType=VARCHAR}, + + + db_field = #{dbField,jdbcType=VARCHAR}, + + + required = #{required,jdbcType=BIT}, + + + `show` = #{show,jdbcType=BIT}, + + + dcode = #{dcode,jdbcType=VARCHAR}, + + + line = #{line,jdbcType=TINYINT}, + + + `type` = #{type,jdbcType=VARCHAR}, + + + fixed = #{fixed,jdbcType=BIT}, + + + fmt_constraint = #{fmtConstraint,jdbcType=VARCHAR}, + + + edit = #{edit,jdbcType=BIT}, + + + sort_order = #{sortOrder,jdbcType=INTEGER}, + + + cascade_close = #{cascadeClose,jdbcType=VARCHAR}, + + + cascade_open = #{cascadeOpen,jdbcType=VARCHAR}, + + + edit_disabled_msg = #{editDisabledMsg,jdbcType=VARCHAR}, + + + edit_disabled = #{editDisabled,jdbcType=BIT}, + + + show_cascade = #{showCascade,jdbcType=VARCHAR}, + + + created_by = #{createdBy,jdbcType=BIGINT}, + + + updated_by = #{updatedBy,jdbcType=BIGINT}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + ext = #{ext,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + + update form_template_field + set template_id = #{templateId,jdbcType=BIGINT}, + code = #{code,jdbcType=VARCHAR}, + parent_id = #{parentId,jdbcType=BIGINT}, + title = #{title,jdbcType=VARCHAR}, + show_title = #{showTitle,jdbcType=VARCHAR}, + db_field = #{dbField,jdbcType=VARCHAR}, + required = #{required,jdbcType=BIT}, + `show` = #{show,jdbcType=BIT}, + dcode = #{dcode,jdbcType=VARCHAR}, + line = #{line,jdbcType=TINYINT}, + `type` = #{type,jdbcType=VARCHAR}, + fixed = #{fixed,jdbcType=BIT}, + fmt_constraint = #{fmtConstraint,jdbcType=VARCHAR}, + edit = #{edit,jdbcType=BIT}, + sort_order = #{sortOrder,jdbcType=INTEGER}, + cascade_close = #{cascadeClose,jdbcType=VARCHAR}, + cascade_open = #{cascadeOpen,jdbcType=VARCHAR}, + edit_disabled_msg = #{editDisabledMsg,jdbcType=VARCHAR}, + edit_disabled = #{editDisabled,jdbcType=BIT}, + show_cascade = #{showCascade,jdbcType=VARCHAR}, + created_by = #{createdBy,jdbcType=BIGINT}, + updated_by = #{updatedBy,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + ext = #{ext,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=BIGINT} + + + + update form_template_field + set template_id = #{templateId,jdbcType=BIGINT}, + code = #{code,jdbcType=VARCHAR}, + parent_id = #{parentId,jdbcType=BIGINT}, + title = #{title,jdbcType=VARCHAR}, + show_title = #{showTitle,jdbcType=VARCHAR}, + db_field = #{dbField,jdbcType=VARCHAR}, + required = #{required,jdbcType=BIT}, + `show` = #{show,jdbcType=BIT}, + dcode = #{dcode,jdbcType=VARCHAR}, + line = #{line,jdbcType=TINYINT}, + `type` = #{type,jdbcType=VARCHAR}, + fixed = #{fixed,jdbcType=BIT}, + fmt_constraint = #{fmtConstraint,jdbcType=VARCHAR}, + edit = #{edit,jdbcType=BIT}, + sort_order = #{sortOrder,jdbcType=INTEGER}, + cascade_close = #{cascadeClose,jdbcType=VARCHAR}, + cascade_open = #{cascadeOpen,jdbcType=VARCHAR}, + edit_disabled_msg = #{editDisabledMsg,jdbcType=VARCHAR}, + edit_disabled = #{editDisabled,jdbcType=BIT}, + show_cascade = #{showCascade,jdbcType=VARCHAR}, + created_by = #{createdBy,jdbcType=BIGINT}, + updated_by = #{updatedBy,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=BIGINT} + + + + + + insert into form_template_field (template_id, + code, parent_id, title, + show_title, db_field, required, + `show`, dcode, line, + `type`, fixed, fmt_constraint, + edit, sort_order, cascade_close, + cascade_open, edit_disabled_msg, + edit_disabled, show_cascade, created_by, + updated_by, create_time, update_time, + ext) + values (#{item.templateId,jdbcType=BIGINT}, + #{item.code,jdbcType=VARCHAR}, #{item.parentId,jdbcType=BIGINT}, #{item.title,jdbcType=VARCHAR}, + #{item.showTitle,jdbcType=VARCHAR}, #{item.dbField,jdbcType=VARCHAR}, #{item.required,jdbcType=BIT}, + #{item.show,jdbcType=BIT}, #{item.dcode,jdbcType=VARCHAR}, #{item.line,jdbcType=TINYINT}, + #{item.type,jdbcType=VARCHAR}, #{item.fixed,jdbcType=BIT}, #{item.fmtConstraint,jdbcType=VARCHAR}, + #{item.edit,jdbcType=BIT}, #{item.sortOrder,jdbcType=INTEGER}, #{item.cascadeClose,jdbcType=VARCHAR}, + #{item.cascadeOpen,jdbcType=VARCHAR}, #{item.editDisabledMsg,jdbcType=VARCHAR}, + #{item.editDisabled,jdbcType=BIT}, #{item.showCascade,jdbcType=VARCHAR}, #{item.createdBy,jdbcType=BIGINT}, + #{item.updatedBy,jdbcType=BIGINT}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, + #{item.ext,jdbcType=LONGVARCHAR}) + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateFieldMapperExt.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateFieldMapperExt.xml new file mode 100644 index 000000000..31f5cf044 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateFieldMapperExt.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateMapper.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateMapper.xml new file mode 100644 index 000000000..df6c909cb --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateMapper.xml @@ -0,0 +1,370 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, form_id, version, content_encoding, created_by, updated_by, create_time, update_time + + + + + + delete from form_template + where id = #{id,jdbcType=BIGINT} + + + + delete from form_template + + + + + + + + SELECT LAST_INSERT_ID() + + insert into form_template (form_id, version, content_encoding, + created_by, updated_by, create_time, + update_time) + values (#{formId,jdbcType=BIGINT}, #{version,jdbcType=INTEGER}, #{contentEncoding,jdbcType=VARCHAR}, + #{createdBy,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, + #{updateTime,jdbcType=TIMESTAMP}) + + + + + SELECT LAST_INSERT_ID() + + insert into form_template + + + form_id, + + + version, + + + content_encoding, + + + created_by, + + + updated_by, + + + create_time, + + + update_time, + + + + + #{formId,jdbcType=BIGINT}, + + + #{version,jdbcType=INTEGER}, + + + #{contentEncoding,jdbcType=VARCHAR}, + + + #{createdBy,jdbcType=BIGINT}, + + + #{updatedBy,jdbcType=BIGINT}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + + + update form_template + + + id = #{record.id,jdbcType=BIGINT}, + + + form_id = #{record.formId,jdbcType=BIGINT}, + + + version = #{record.version,jdbcType=INTEGER}, + + + content_encoding = #{record.contentEncoding,jdbcType=VARCHAR}, + + + created_by = #{record.createdBy,jdbcType=BIGINT}, + + + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + + + + + + + update form_template + set id = #{record.id,jdbcType=BIGINT}, + form_id = #{record.formId,jdbcType=BIGINT}, + version = #{record.version,jdbcType=INTEGER}, + content_encoding = #{record.contentEncoding,jdbcType=VARCHAR}, + created_by = #{record.createdBy,jdbcType=BIGINT}, + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP} + + + + + + + update form_template + + + form_id = #{formId,jdbcType=BIGINT}, + + + version = #{version,jdbcType=INTEGER}, + + + content_encoding = #{contentEncoding,jdbcType=VARCHAR}, + + + created_by = #{createdBy,jdbcType=BIGINT}, + + + updated_by = #{updatedBy,jdbcType=BIGINT}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=BIGINT} + + + + update form_template + set form_id = #{formId,jdbcType=BIGINT}, + version = #{version,jdbcType=INTEGER}, + content_encoding = #{contentEncoding,jdbcType=VARCHAR}, + created_by = #{createdBy,jdbcType=BIGINT}, + updated_by = #{updatedBy,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=BIGINT} + + + + + + insert into form_template (form_id, + version, content_encoding, created_by, + updated_by, create_time, update_time + ) + values (#{item.formId,jdbcType=BIGINT}, + #{item.version,jdbcType=INTEGER}, #{item.contentEncoding,jdbcType=VARCHAR}, #{item.createdBy,jdbcType=BIGINT}, + #{item.updatedBy,jdbcType=BIGINT}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP} + ) + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateMapperExt.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateMapperExt.xml new file mode 100644 index 000000000..70f8bb81e --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/FormTemplateMapperExt.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/ModifyLogRecordMapper.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/ModifyLogRecordMapper.xml new file mode 100644 index 000000000..1957d333d --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/ModifyLogRecordMapper.xml @@ -0,0 +1,504 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, entity_type, entity_id, form_code, description, field_chinese_name, field_english_name, + old_value, new_value, `operator`, operator_name, operation_time, create_time, update_time, + service_name, deleted + + + + + + delete from modify_log_record + where id = #{id,jdbcType=BIGINT} + + + + delete from modify_log_record + + + + + + + + SELECT LAST_INSERT_ID() + + insert into modify_log_record (entity_type, entity_id, form_code, + description, field_chinese_name, field_english_name, + old_value, new_value, `operator`, + operator_name, operation_time, create_time, + update_time, service_name, deleted + ) + values (#{entityType,jdbcType=VARCHAR}, #{entityId,jdbcType=VARCHAR}, #{formCode,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{fieldChineseName,jdbcType=VARCHAR}, #{fieldEnglishName,jdbcType=VARCHAR}, + #{oldValue,jdbcType=VARCHAR}, #{newValue,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, + #{operatorName,jdbcType=VARCHAR}, #{operationTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, + #{updateTime,jdbcType=TIMESTAMP}, #{serviceName,jdbcType=VARCHAR}, #{deleted,jdbcType=TINYINT} + ) + + + + + SELECT LAST_INSERT_ID() + + insert into modify_log_record + + + entity_type, + + + entity_id, + + + form_code, + + + description, + + + field_chinese_name, + + + field_english_name, + + + old_value, + + + new_value, + + + `operator`, + + + operator_name, + + + operation_time, + + + create_time, + + + update_time, + + + service_name, + + + deleted, + + + + + #{entityType,jdbcType=VARCHAR}, + + + #{entityId,jdbcType=VARCHAR}, + + + #{formCode,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{fieldChineseName,jdbcType=VARCHAR}, + + + #{fieldEnglishName,jdbcType=VARCHAR}, + + + #{oldValue,jdbcType=VARCHAR}, + + + #{newValue,jdbcType=VARCHAR}, + + + #{operator,jdbcType=BIGINT}, + + + #{operatorName,jdbcType=VARCHAR}, + + + #{operationTime,jdbcType=TIMESTAMP}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{serviceName,jdbcType=VARCHAR}, + + + #{deleted,jdbcType=TINYINT}, + + + + + + + update modify_log_record + + + id = #{record.id,jdbcType=BIGINT}, + + + entity_type = #{record.entityType,jdbcType=VARCHAR}, + + + entity_id = #{record.entityId,jdbcType=VARCHAR}, + + + form_code = #{record.formCode,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + field_chinese_name = #{record.fieldChineseName,jdbcType=VARCHAR}, + + + field_english_name = #{record.fieldEnglishName,jdbcType=VARCHAR}, + + + old_value = #{record.oldValue,jdbcType=VARCHAR}, + + + new_value = #{record.newValue,jdbcType=VARCHAR}, + + + `operator` = #{record.operator,jdbcType=BIGINT}, + + + operator_name = #{record.operatorName,jdbcType=VARCHAR}, + + + operation_time = #{record.operationTime,jdbcType=TIMESTAMP}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + service_name = #{record.serviceName,jdbcType=VARCHAR}, + + + deleted = #{record.deleted,jdbcType=TINYINT}, + + + + + + + + + update modify_log_record + set id = #{record.id,jdbcType=BIGINT}, + entity_type = #{record.entityType,jdbcType=VARCHAR}, + entity_id = #{record.entityId,jdbcType=VARCHAR}, + form_code = #{record.formCode,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + field_chinese_name = #{record.fieldChineseName,jdbcType=VARCHAR}, + field_english_name = #{record.fieldEnglishName,jdbcType=VARCHAR}, + old_value = #{record.oldValue,jdbcType=VARCHAR}, + new_value = #{record.newValue,jdbcType=VARCHAR}, + `operator` = #{record.operator,jdbcType=BIGINT}, + operator_name = #{record.operatorName,jdbcType=VARCHAR}, + operation_time = #{record.operationTime,jdbcType=TIMESTAMP}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + service_name = #{record.serviceName,jdbcType=VARCHAR}, + deleted = #{record.deleted,jdbcType=TINYINT} + + + + + + + update modify_log_record + + + entity_type = #{entityType,jdbcType=VARCHAR}, + + + entity_id = #{entityId,jdbcType=VARCHAR}, + + + form_code = #{formCode,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + field_chinese_name = #{fieldChineseName,jdbcType=VARCHAR}, + + + field_english_name = #{fieldEnglishName,jdbcType=VARCHAR}, + + + old_value = #{oldValue,jdbcType=VARCHAR}, + + + new_value = #{newValue,jdbcType=VARCHAR}, + + + `operator` = #{operator,jdbcType=BIGINT}, + + + operator_name = #{operatorName,jdbcType=VARCHAR}, + + + operation_time = #{operationTime,jdbcType=TIMESTAMP}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + service_name = #{serviceName,jdbcType=VARCHAR}, + + + deleted = #{deleted,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + + update modify_log_record + set entity_type = #{entityType,jdbcType=VARCHAR}, + entity_id = #{entityId,jdbcType=VARCHAR}, + form_code = #{formCode,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + field_chinese_name = #{fieldChineseName,jdbcType=VARCHAR}, + field_english_name = #{fieldEnglishName,jdbcType=VARCHAR}, + old_value = #{oldValue,jdbcType=VARCHAR}, + new_value = #{newValue,jdbcType=VARCHAR}, + `operator` = #{operator,jdbcType=BIGINT}, + operator_name = #{operatorName,jdbcType=VARCHAR}, + operation_time = #{operationTime,jdbcType=TIMESTAMP}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + service_name = #{serviceName,jdbcType=VARCHAR}, + deleted = #{deleted,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + + + + + insert into modify_log_record (entity_type, + entity_id, form_code, description, + field_chinese_name, field_english_name, + old_value, new_value, `operator`, + operator_name, operation_time, + create_time, update_time, service_name, + deleted) + values (#{item.entityType,jdbcType=VARCHAR}, + #{item.entityId,jdbcType=VARCHAR}, #{item.formCode,jdbcType=VARCHAR}, #{item.description,jdbcType=VARCHAR}, + #{item.fieldChineseName,jdbcType=VARCHAR}, #{item.fieldEnglishName,jdbcType=VARCHAR}, + #{item.oldValue,jdbcType=VARCHAR}, #{item.newValue,jdbcType=VARCHAR}, #{item.operator,jdbcType=BIGINT}, + #{item.operatorName,jdbcType=VARCHAR}, #{item.operationTime,jdbcType=TIMESTAMP}, + #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.serviceName,jdbcType=VARCHAR}, + #{item.deleted,jdbcType=TINYINT}) + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/ModifyLogRecordMapperExt.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/ModifyLogRecordMapperExt.xml new file mode 100644 index 000000000..4e39e6bd0 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/ModifyLogRecordMapperExt.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/TenantInitStatusMapper.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/TenantInitStatusMapper.xml new file mode 100644 index 000000000..670d6aa6d --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/TenantInitStatusMapper.xml @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, initialized, create_time, update_time, agent_id + + + + + + delete from tenant_init_status + where id = #{id,jdbcType=BIGINT} + + + + delete from tenant_init_status + + + + + + + + SELECT LAST_INSERT_ID() + + insert into tenant_init_status (initialized, create_time, update_time, + agent_id) + values (#{initialized,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, + #{agentId,jdbcType=BIGINT}) + + + + + SELECT LAST_INSERT_ID() + + insert into tenant_init_status + + + initialized, + + + create_time, + + + update_time, + + + agent_id, + + + + + #{initialized,jdbcType=TINYINT}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{agentId,jdbcType=BIGINT}, + + + + + + + update tenant_init_status + + + id = #{record.id,jdbcType=BIGINT}, + + + initialized = #{record.initialized,jdbcType=TINYINT}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + agent_id = #{record.agentId,jdbcType=BIGINT}, + + + + + + + + + update tenant_init_status + set id = #{record.id,jdbcType=BIGINT}, + initialized = #{record.initialized,jdbcType=TINYINT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + agent_id = #{record.agentId,jdbcType=BIGINT} + + + + + + + update tenant_init_status + + + initialized = #{initialized,jdbcType=TINYINT}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + agent_id = #{agentId,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + + update tenant_init_status + set initialized = #{initialized,jdbcType=TINYINT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + agent_id = #{agentId,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + + + + + insert into tenant_init_status (initialized, + create_time, update_time, agent_id + ) + values (#{item.initialized,jdbcType=TINYINT}, + #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.agentId,jdbcType=BIGINT} + ) + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/TenantInitStatusMapperExt.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/TenantInitStatusMapperExt.xml new file mode 100644 index 000000000..bbb92dab8 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mapper/TenantInitStatusMapperExt.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mybatis/mybatis-config.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mybatis/mybatis-config.xml new file mode 100644 index 000000000..71d041be9 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/main/resources/mybatis/mybatis-config.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/test/resources/generatorConfig.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/test/resources/generatorConfig.xml new file mode 100644 index 000000000..5e740372e --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/test/resources/generatorConfig.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
\ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/test/resources/logback.xml b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/test/resources/logback.xml new file mode 100644 index 000000000..735961aa3 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-mapper/src/test/resources/logback.xml @@ -0,0 +1,23 @@ + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n + + + + DEBUG + + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/pom.xml b/ruoyi-modules/ruoyi-form/booksflow-form-service/pom.xml new file mode 100644 index 000000000..0ce3362af --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + + org.dromara + ruoyi-form + ${revision} + + + booksflow-form-service + + + true + UTF-8 + 1.5.3.Final + 1.5.7 + 4.5.5-1.5.7 + 1.5.2-BETA3 + 1.4.18 + + + + + org.dromara + booksflow-form-api + ${revision} + + + org.dromara + booksflow-form-mapper + ${revision} + + + org.dromara + booksflow-form-feign + ${revision} + + + org.mapstruct + mapstruct + ${org.mapstruct.version} + + + org.mybatis + mybatis + 3.5.7 + + + + diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormController.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormController.java new file mode 100644 index 000000000..4f15dbb98 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormController.java @@ -0,0 +1,145 @@ +package com.pcloud.booksflow.form.controller; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.mybatis.entity.Form; +import com.pcloud.booksflow.form.mybatis.entity.FormTemplate; +import com.pcloud.booksflow.form.mybatis.entity.FormTemplateField; +import com.pcloud.booksflow.form.service.FormService; +import com.pcloud.booksflow.form.service.FormTemplateFieldService; +import com.pcloud.booksflow.form.service.FormTemplateService; +import com.pcloud.booksflow.form.service.TenantInitializationService; +import com.pcloud.booksflow.form.utils.TenantHelper; +import com.pcloud.booksflow.form.utils.UserUtils; +import com.pcloud.common.dto.ResponseDto; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Form Controller 实现增删改查接口 + * + * @author 李郑伟 + */ +@Slf4j +@Api(tags = "表单") +@RestController +@RequestMapping(BaseConstant.CONTEXT_PATH + "form") +public class FormController { + + @Autowired + private FormService formService; + + @Autowired + private FormTemplateService formTemplateService; + + @Autowired + private FormTemplateFieldService formTemplateFieldService; + + @Autowired + private TenantInitializationService tenantInitializationService; + + /** + * 后端自用-勿动!!!-设置成模板 + */ + @ApiOperation(value = "后端自用-勿动!!!-设置成模板") + @PostMapping("/copy") + public Boolean copy(@RequestParam Long sourceTenantId, @RequestParam(required = false) Long targetTenantId) { + Long targetId; + if (targetTenantId == null) { + targetId = Long.parseLong(BaseConstant.TplTenantId); + } else { + targetId = targetTenantId; + } + return tenantInitializationService.copyForm(sourceTenantId, targetId); + } + + + /** + * 重置,恢复 + */ + @ApiOperation(value = "重置表单") + @GetMapping("/reset") + public ResponseDto reset(@RequestParam Long formId) { + //查询模板中最大版本号的模板数据,根据这个数据还原 + Form _formOld = formService.getById(formId); + if (_formOld == null) { + return new ResponseDto<>(null); + } + Form _formTpl = TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formService.getByCode(_formOld.getCode())); + if (_formTpl == null) { + return new ResponseDto<>(null); + } + FormTemplate maxTemplate = TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formTemplateService.getMaxVersion(_formTpl.getId())); + if (maxTemplate == null) { + return new ResponseDto<>(null); + } + List tplFields = TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formTemplateFieldService.getByTemplateId(maxTemplate.getId(), null)); + FormTemplate newTemplate = formTemplateService.saveUpVersion(formId, maxTemplate, tplFields); + return new ResponseDto<>(newTemplate.getId()); + } + + /** + * 创建表单 + * + * @param form 表单对象 + * @return 创建后的表单对象 + */ + @PostMapping("/create") + public ResponseDto create(@RequestBody Form form) { + return new ResponseDto<>(formService.create(form)); + } + + /** + * 根据ID获取表单 + * + * @param id 表单ID + * @return 表单对象 + */ + @GetMapping("/get") + public ResponseDto getById(@RequestParam Long id) { + return new ResponseDto<>(formService.getById(id)); + } + + /** + * 更新表单信息 + * + * @param id 表单ID + * @param form 更新的表单对象 + * @return 更新后的表单对象 + */ + @PostMapping("/update") + public ResponseDto update(@RequestParam Long id, @RequestBody Form form) { + return new ResponseDto<>(formService.update(id, form)); + } + + /** + * 删除表单 + * + * @param id 表单ID + * @return 删除结果 + */ + @PostMapping("/delete") + public ResponseDto delete(@RequestParam Long id) { + return new ResponseDto<>(formService.delete(id)); + } + + /** + * 获取表单列表 + * + * @param name 表单名称 + * @return 表单列表 + */ + @GetMapping("/list") + public ResponseDto> listByName(@RequestParam(required = false) String name) { + Long tenantId = UserUtils.getTenantId(); + boolean b = tenantInitializationService.initializeTenant(tenantId); + log.info("初始化结果:{} {}", tenantId, b); + + return new ResponseDto<>(formService.listByName(name)); + } + +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormDictController.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormDictController.java new file mode 100644 index 000000000..db34123d8 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormDictController.java @@ -0,0 +1,262 @@ +package com.pcloud.booksflow.form.controller; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.dto.FormDictDTO; +import com.pcloud.booksflow.form.api.dto.FormFieldDictDTO; +import com.pcloud.booksflow.form.api.dto.FormFieldDictQ; +import com.pcloud.booksflow.form.api.vo.FormDictVO; +import com.pcloud.booksflow.form.api.vo.FormFieldDictVO; +import com.pcloud.booksflow.form.mybatis.entity.FormDict; +import com.pcloud.booksflow.form.service.FormDictService; +import com.pcloud.booksflow.form.service.FormFieldDictService; +import com.pcloud.booksflow.form.service.TenantInitializationService; +import com.pcloud.booksflow.form.utils.UserUtils; +import com.pcloud.common.dto.ResponseDto; +import com.pcloud.common.page.PageBeanNew; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * FormDict Controller 实现增删改查接口 + * + * @author your-name + */ +@Api(tags = "字典-有租户") +@RestController +@RequestMapping(BaseConstant.CONTEXT_PATH + "form/dict") +@Slf4j +public class FormDictController { + + @Autowired + private FormDictService formDictService; + @Autowired + private FormFieldDictService formFieldDictService; + @Autowired + private TenantInitializationService tenantInitializationService; + + /** + * 后端自用-勿动!!!-设置成模板 + */ + @ApiOperation(value = "后端自用-勿动!!!-设置成模板") + @PostMapping("/copy") + public ResponseDto copy(@RequestParam Long sourceTenantId, @RequestParam(required = false) Long targetTenantId, + @RequestBody List configTypes) { + Long targetId; + if (targetTenantId == null) { + targetId = Long.parseLong(BaseConstant.TplTenantId); + } else { + targetId = targetTenantId; + } + return new ResponseDto<>(tenantInitializationService.copyDict(sourceTenantId, targetId, configTypes)); + } + + /** + * 创建或更新表单字典 + * + * @param dto 表单字典DTO对象 + * @return 表单字典ID + */ + @ApiOperation("创建或更新表单字典") + @PostMapping("/createOrUpdate") + public ResponseDto createOrUpdate(@Validated @RequestBody FormDictDTO dto) { + return new ResponseDto<>(formDictService.createOrUpdate(dto)); + } + + /** + * 根据ID获取表单字典 + * + * @param id 表单字典ID + * @return 表单字典对象 + */ + @ApiOperation("根据ID获取表单字典") + @GetMapping("/get") + public ResponseDto getById(@RequestParam Long id) { + return new ResponseDto<>(formDictService.getById(id)); + } + + /** + * 删除表单字典 + * + * @param id 表单字典ID + * @return 删除结果 + */ + @ApiOperation("删除表单字典") + @PostMapping("/delete") + public ResponseDto delete(@RequestParam Long id) { + return new ResponseDto<>(formDictService.delete(id)); + } + + /** + * 获取表单字典列表 + * + * @param name 表单字典名称 + * @param code 表单字典编码 + * @param currentPage 当前页码 + * @param numPerPage 每页数量 + * @return 表单字典列表 + */ + @ApiOperation("获取表单字典列表") + @GetMapping("/list") + public ResponseDto> listByNameAndCode(@RequestParam(required = false) String name, + @RequestParam(required = false) String code, + @RequestParam(value = "currentPage", defaultValue = "0") Integer currentPage, + @RequestParam(value = "numPerPage", defaultValue = "10") Integer numPerPage) { + Long tenantId = UserUtils.getTenantId(); + boolean b = tenantInitializationService.initializeTenant(tenantId); + log.info("初始化结果:{} {}", tenantId, b); + + return new ResponseDto<>(formDictService.listByNameAndCode(name, code, currentPage, numPerPage)); + } + + /** + * 导出字典数据为JSON + * + * @param configTypes 字典类型集合 + * @return 包含字典数据的响应 + */ + @ApiOperation(value = "导出字典数据") + @PostMapping("/exportDicts") + public ResponseDto> exportDicts(@RequestBody List configTypes) { + if (configTypes == null || configTypes.isEmpty()) { + return new ResponseDto<>(Collections.emptyList()); + } + + // 获取字典基本信息 + List formDicts = formDictService.list(configTypes); + List result = new ArrayList<>(); + + // 为每个字典类型查询并组装字典项数据 + for (FormDict formDict : formDicts) { + FormDictVO dictVO = new FormDictVO(); + dictVO.setName(formDict.getName()); + dictVO.setCode(formDict.getCode()); + dictVO.setRemarks(formDict.getRemarks()); + dictVO.setCreatedBy(formDict.getCreatedBy()); + dictVO.setUpdatedBy(formDict.getUpdatedBy()); + dictVO.setCreateTime(formDict.getCreateTime()); + dictVO.setUpdateTime(formDict.getUpdateTime()); + dictVO.setDeleted(formDict.getDeleted()); + + // 查询该字典类型的字典项数据 + FormFieldDictQ query = new FormFieldDictQ(); + query.setTree(true); // 返回树形结构 + Map q = new HashMap<>(); + q.put(formDict.getCode(), query); + + Map> dictData = formFieldDictService.get(q); + List dictItems = dictData.get(formDict.getCode()); + dictVO.setItems(dictItems != null ? dictItems : new ArrayList<>()); + + result.add(dictVO); + } + + return new ResponseDto<>(result); + } + + /** + * 导入字典数据 + * + * @param formDictVOs 导入的字典数据列表 + * @return 导入结果,包括忽略的字典信息 + */ + @ApiOperation(value = "导入字典数据") + @PostMapping("/importDicts") + public ResponseDto> importDicts(@RequestBody List formDictVOs) { + Map result = new HashMap<>(); + + if (formDictVOs == null || formDictVOs.isEmpty()) { + result.put("success", false); + result.put("message", "导入数据为空"); + return new ResponseDto<>(result); + } + + // 收集所有要导入的字典类型 + Set importConfigTypes = formDictVOs.stream() + .filter(item -> item != null && item.getCode() != null && item.getName() != null) + .map(FormDictVO::getCode) + .collect(Collectors.toSet()); + + // 检查要导入的字典类型是否已存在 + importConfigTypes = formDictService.getNotExistConfigCode(importConfigTypes); + + // 导入不存在的字典类型 + List importedConfigTypes = new ArrayList<>(); + List ignoredConfigTypes = new ArrayList<>(); + + for (FormDictVO formDictVO : formDictVOs) { + if (formDictVO == null) { + continue; + } + if (importConfigTypes.contains(formDictVO.getCode())) { + importedConfigTypes.add(formDictVO.getCode()); + // 字典类型不存在,可以创建 + FormDictDTO dto = new FormDictDTO(); + dto.setName(formDictVO.getName()); + dto.setCode(formDictVO.getCode()); + dto.setRemarks(formDictVO.getRemarks()); + // 导入字典项 + formDictService.createOrUpdate(dto); + + List itemsToImport = formDictVO.getItems(); + if (itemsToImport != null && !itemsToImport.isEmpty()) { + importFormFieldDicts(itemsToImport, formDictVO.getCode()); + } + } else { + // 字典类型已存在,跳过 + ignoredConfigTypes.add(formDictVO.getCode() + " (因字典类型已存在而忽略)"); + } + } + + // 构建返回结果 + result.put("success", true); + result.put("message", "字典数据导入完成"); + result.put("importedConfigTypes", importedConfigTypes); + result.put("ignoredConfigTypes", ignoredConfigTypes); + + return new ResponseDto<>(result); + } + + /** + * 导入字典项数据 TODO 导入性能优化 + * + * @param itemsToImport 要导入的字典项列表 + * @param configType 字典类型 + */ + private void importFormFieldDicts(List itemsToImport, String configType) { + if (itemsToImport == null || itemsToImport.isEmpty()) return; + + for (FormFieldDictVO item : itemsToImport) { + + // 创建DTO对象并导入 + FormFieldDictDTO dto = new FormFieldDictDTO(); + dto.setName(item.getName()); + dto.setCode(item.getCode()); + dto.setConfigType(configType); + dto.setStatus(item.getStatus() == null ? 1 : item.getStatus()); + dto.setSortOrder(item.getSortOrder()); + dto.setParentId(item.getParentId()); + + //TODO 导入这里还有问题 +// dto.setOtherFields(item.getOtherFields()); + + Long newItemId = formFieldDictService.createOrUpdate(dto); + + // 递归处理子节点 + if (item.getChildren() != null && !item.getChildren().isEmpty()) { + // 更新子节点的父ID为新创建的ID + for (FormFieldDictVO child : item.getChildren()) { + child.setParentId(newItemId); + } + importFormFieldDicts(item.getChildren(), configType); + } + } + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormFieldDictController.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormFieldDictController.java new file mode 100644 index 000000000..1488ad72e --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormFieldDictController.java @@ -0,0 +1,149 @@ +package com.pcloud.booksflow.form.controller; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.constant.FormFieldDictType; +import com.pcloud.booksflow.form.api.dto.FormFieldDictDTO; +import com.pcloud.booksflow.form.api.dto.FormFieldDictQ; +import com.pcloud.booksflow.form.api.vo.FormFieldDictVO; +import com.pcloud.booksflow.form.mybatis.entity.FormFieldDict; +import com.pcloud.booksflow.form.service.FormDictService; +import com.pcloud.booksflow.form.service.FormFieldDictService; +import com.pcloud.booksflow.form.utils.TenantHelper; +import com.pcloud.common.dto.ResponseDto; +import com.pcloud.common.page.PageBeanNew; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * FormFieldDict Controller 实现增删改查接口 + * + * @author 李郑伟 + */ +@Api(tags = "字典项-有租户") +@RestController +@RequestMapping(BaseConstant.CONTEXT_PATH + "form/field-dict") +public class FormFieldDictController { + + @Autowired + private FormFieldDictService formFieldDictService; + @Autowired + private FormDictService formDictService; + + /** + * 创建新的表单字段配置 + * + * @param dto 表单字段配置对象 + * @return 创建后的表单字段配置对象 + */ + @PostMapping("/createOrUpdate") + public ResponseDto createOrUpdate(@RequestBody FormFieldDictDTO dto) { + return new ResponseDto<>(formFieldDictService.createOrUpdate(dto)); + } + + /** + * 根据configType获取表单字段配置 + * + * @param configType 表单字段配置ID + * @return 表单字段配置对象 + */ + @GetMapping("/getList") + public ResponseDto> getList(@RequestParam String configType, + @RequestParam(required = false) Long parentId, + @RequestParam(required = false) Integer status, + @RequestParam(required = false) Integer level) { + return new ResponseDto<>(formFieldDictService.getByConfigType(configType, parentId, status,level)); + } + + @GetMapping("/page") + public ResponseDto> page(@RequestParam String configType, + @RequestParam(required = false) String queryStr, + @RequestParam(required = false) Integer status, + @RequestParam(value = "currentPage", defaultValue = "0") Integer currentPage, + @RequestParam(value = "numPerPage", defaultValue = "10") Integer numPerPage) { + return new ResponseDto<>(formFieldDictService.page(configType, queryStr,status, currentPage, numPerPage)); + } + + @ApiOperation(value = "批量获取 表单字段配置,根据configType") + @PostMapping("get") + public ResponseDto>> get(@RequestBody Map q) { + Map> map1 = formFieldDictService.get(q); + //比较 q在data中不存在的key + Map q2 = new HashMap<>(); + Set configCodes = formDictService.getNotExistConfigCode(q.keySet()); + q.forEach((key, value) -> { + if (configCodes.contains(key)) { + q2.put(key, q.get(key)); + } + }); + //查询 通用字典,不区分租户 + Map> map2 = TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formFieldDictService.get(q2)); + map1.putAll(map2); + return new ResponseDto<>(map1); + } + + @ApiOperation(value = "批量获取 表单字段配置,根据configType") + @PostMapping("dict") + public ResponseDto>> dict(@RequestBody List q) { + if (q == null) { + return new ResponseDto<>(new HashMap<>()); + } + Map map = new HashMap<>(); + q.stream().distinct().forEach(key -> map.put(key, null)); + return get(map); + } + + /** + * 删除表单字段配置,删除的时候会校验是否被其他字典关联 + * + * @param id 表单字段配置ID + * @return 删除结果 + */ + @PostMapping("/delete") + public ResponseDto delete(@RequestParam Long id) { + return new ResponseDto<>(formFieldDictService.delete(id)); + } + + /** + * 更新表单字段配置排序 + * + * @param id 表单字段配置ID + * @param sortOrder 排序值 + * @return 更新结果 + */ + @PostMapping("/update-sort") + public ResponseDto updateSortOrder(@RequestParam Long id, @RequestParam Integer sortOrder) { + return new ResponseDto<>(formFieldDictService.updateSortOrder(id, sortOrder)); + } + + + /** + * 更新状态字段 + * + * @param id 表单字段配置ID + * @param status 排序值 + * @return 更新结果 + */ + @PostMapping("/update-status") + public ResponseDto updateStatus(@RequestParam Long id, @RequestParam Integer status) { + return new ResponseDto<>(formFieldDictService.updateStatus(id, status)); + } + + + /** + * 获取表单列表 + * + * @return allConfigType + */ + @GetMapping("allConfigType") + public ResponseDto> allConfigType() { + return new ResponseDto<>(FormFieldDictType.getMap()); + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormPrintConfigController.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormPrintConfigController.java new file mode 100644 index 000000000..a53463cce --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormPrintConfigController.java @@ -0,0 +1,92 @@ +package com.pcloud.booksflow.form.controller; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.dto.FormPrintConfigDTO; +import com.pcloud.booksflow.form.api.dto.FormPrintConfigModeDTO; +import com.pcloud.booksflow.form.api.dto.FormPrintConfigUploadDTO; +import com.pcloud.booksflow.form.api.dto.FormPrintDTO; +import com.pcloud.booksflow.form.api.vo.FormPrintConfigVO; +import com.pcloud.booksflow.form.mybatis.entity.FormPrintConfigWithBLOBs; +import com.pcloud.booksflow.form.service.FormPrintConfigService; +import com.pcloud.common.dto.ResponseDto; +import com.pcloud.common.entity.UploadResultInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; + +/** + * FormPrintConfig Controller 实现增删改查接口 + * + * @author your-name + */ +@Api(tags = "表单打印配置") +@RestController +@RequestMapping(BaseConstant.CONTEXT_PATH + "form-print-config") +public class FormPrintConfigController { + + @Autowired + private FormPrintConfigService formPrintConfigService; + + /** + * 创建或更新表单打印配置 + * + * @param dto 表单打印配置DTO对象 + * @return 创建或更新后的表单打印配置对象 + */ + @ApiOperation("创建或更新表单打印配置") + @PostMapping("/createOrUpdate") + public ResponseDto createOrUpdate(@Validated @RequestBody FormPrintConfigDTO dto) { + return new ResponseDto<>(formPrintConfigService.createOrUpdate(dto)); + } + + + /** + * 更新模式 + * + * @param dto 表单打印配置DTO对象 + * @return 创建或更新后的表单打印配置对象 + */ + @ApiOperation("更新模式") + @PostMapping("updateMode") + public ResponseDto updateMode(@Validated @RequestBody FormPrintConfigModeDTO dto) { + return new ResponseDto<>(formPrintConfigService.updateMode(dto)); + } + + /** + * 根据表单ID获取表单打印配置 + * + * @param formId 表单ID + * @return 表单打印配置对象 + */ + @ApiOperation("根据表单ID获取表单打印配置") + @GetMapping("/get") + public ResponseDto getByFormId(@RequestParam Long formId) { + return new ResponseDto<>(formPrintConfigService.getByFormId(formId)); + } + + + @ApiOperation("ai解析word") + @GetMapping("/aiParsesWord") + public ResponseDto aiParsesWord(@RequestParam Long formId) { + return new ResponseDto<>(formPrintConfigService.aiParsesWord(formId)); + } + + @ApiOperation("上传word模板") + @PostMapping("uploadFile") + public ResponseDto updateFile(@Validated @RequestBody FormPrintConfigUploadDTO dto) { + formPrintConfigService.createOrUpdate(dto); + return new ResponseDto<>(); + } + + @ApiOperation("获取打印url") + @PostMapping("print") + public ResponseDto print(@Validated @RequestBody FormPrintDTO dto) throws IOException { + return new ResponseDto<>(formPrintConfigService.print(dto)); + } + + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormTemplateController.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormTemplateController.java new file mode 100644 index 000000000..a8c9a6060 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormTemplateController.java @@ -0,0 +1,78 @@ +package com.pcloud.booksflow.form.controller; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.dto.FormTemplateDTO; +import com.pcloud.booksflow.form.api.vo.FormTemplateVO; +import com.pcloud.booksflow.form.service.FormTemplateService; +import com.pcloud.common.dto.ResponseDto; +import com.pcloud.common.exceptions.BizException; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +/** + * FormTemplate Controller 实现增删改查接口 + * + * @author 李郑伟 + */ +@Api(tags = "表单模板") +@RestController +@RequestMapping(BaseConstant.CONTEXT_PATH + "form/template") +public class FormTemplateController { + + @Autowired + private FormTemplateService formTemplateService; + + /** + * 更新表单模板信息,新增记录,版本 + 1 + * + * @param dto 更新的表单模板对象 + * @return 更新后的表单模板对象 + */ + @PostMapping("/saveByVersion") + public ResponseDto saveByVersion(@Validated @RequestBody FormTemplateDTO dto) { + return new ResponseDto<>(formTemplateService.saveUpVersion(dto).getId()); + } + + /** + * 根据ID获取表单模板 + * + * @param id 表单模板ID + * @return 表单模板对象 + */ + @GetMapping("/get") + public ResponseDto getById(@RequestParam Long id, + @RequestParam(required = false) Boolean show, + @RequestParam(required = false) Boolean tree) { + return new ResponseDto<>(formTemplateService.getVOById(id, show, tree)); + } + + /** + * 查询相同formId下的最新的form模板 + * + * @return 表单模板列表 + */ + @ApiOperation(value = "获取最新版本表单模板", notes = "根据formId或formCode 获取最新版本的表单模板") + @GetMapping("/get/maxVersion") + public ResponseDto getMaxVersion(@ApiParam(value = "表单编码,参数二选一") + @RequestParam(required = false) String formCode, + @ApiParam(value = "表单id,参数二选一") + @RequestParam(required = false) Long formId, + @ApiParam(value = "是否显示") + @RequestParam(required = false) Boolean show, + @ApiParam(value = "tree") + @RequestParam(required = false) Boolean tree) { + if (formId == null && formCode == null) { + throw new BizException("formId or formCode is required"); + } + if (formCode != null) { + return new ResponseDto<>(formTemplateService.getVOMaxVersion(formCode, show, tree)); + } else { + return new ResponseDto<>(formTemplateService.getVOMaxVersion(formId, show, tree)); + } + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormTemplateFieldController.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormTemplateFieldController.java new file mode 100644 index 000000000..0319037a5 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/FormTemplateFieldController.java @@ -0,0 +1,68 @@ +package com.pcloud.booksflow.form.controller; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.mybatis.entity.FormTemplateField; +import com.pcloud.booksflow.form.service.FormTemplateFieldService; +import com.pcloud.common.dto.ResponseDto; +import io.swagger.annotations.Api; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * FormTemplateField Controller 实现增删改查接口 + * + * @author 李郑伟 + */ +@Api(tags = "表单模板字段") +@RestController +@RequestMapping(BaseConstant.CONTEXT_PATH + "form/template-field") +public class FormTemplateFieldController { + + @Autowired + private FormTemplateFieldService formTemplateFieldService; + + /** + * 创建新的表单模板字段 + * + * @param formTemplateField 表单模板字段对象 + * @return 创建后的表单模板字段对象 + */ + @PostMapping("/create") + public ResponseDto create(@RequestBody FormTemplateField formTemplateField) { + return new ResponseDto<>(formTemplateFieldService.create(formTemplateField)); + } + + /** + * 根据ID获取表单模板字段 + * + * @param id 表单模板字段ID + * @return 表单模板字段对象 + */ + @GetMapping("/get") + public ResponseDto getById(@RequestParam Long id) { + return new ResponseDto<>(formTemplateFieldService.getById(id)); + } + + /** + * 更新表单模板字段信息 + * + * @param id 表单模板字段ID + * @param formTemplateField 更新的表单模板字段对象 + * @return 更新后的表单模板字段对象 + */ + @PostMapping("/update") + public ResponseDto update(@RequestParam Long id, @RequestBody FormTemplateField formTemplateField) { + return new ResponseDto<>(formTemplateFieldService.update(id, formTemplateField)); + } + + /** + * 删除表单模板字段 + * + * @param id 表单模板字段ID + * @return 删除结果 + */ + @PostMapping("/delete") + public ResponseDto delete(@RequestParam Long id) { + return new ResponseDto<>(formTemplateFieldService.delete(id)); + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/ModifyLogRecordController.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/ModifyLogRecordController.java new file mode 100644 index 000000000..7b2406cc7 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/ModifyLogRecordController.java @@ -0,0 +1,58 @@ +package com.pcloud.booksflow.form.controller; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.dto.ModifyLogRecordDTO; +import com.pcloud.booksflow.form.mybatis.entity.ModifyLogRecord; +import com.pcloud.booksflow.form.service.ModifyLogRecordService; +import com.pcloud.common.dto.ResponseDto; +import com.pcloud.common.page.PageBeanNew; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * ModifyLogRecord Controller 实现增删改查接口 + * + * @author 李郑伟 + */ +@Api(tags = "修改日志记录") +@RestController +@RequestMapping(BaseConstant.CONTEXT_PATH + "modify-log-record") +public class ModifyLogRecordController { + + @Autowired + private ModifyLogRecordService modifyLogRecordService; + + /** + * 批量创建修改日志记录 + * + * @param modifyLogRecordDTOs 修改日志记录DTO对象列表 + * @return 创建条数 + */ + @ApiOperation("批量创建修改日志记录,最大1000条") + @PostMapping("/batchCreate") + public ResponseDto batchCreate(@Validated @RequestBody List modifyLogRecordDTOs) { + return new ResponseDto<>(modifyLogRecordService.batchCreate(modifyLogRecordDTOs)); + } + + /** + * 获取修改日志记录列表 + * + * @param entityType 实体类型 + * @return 修改日志记录列表 + */ + @ApiOperation("获取修改日志记录列表") + @GetMapping("/page") + public ResponseDto> page(@RequestParam(required = false, defaultValue = "project") String entityType, + @RequestParam String entityId, + @RequestParam(required = false) String formCode, + @RequestParam(value = "currentPage", defaultValue = "0") Integer currentPage, + @RequestParam(value = "numPerPage", defaultValue = "10") Integer numPerPage) { + return new ResponseDto<>(modifyLogRecordService.listByEntityType(entityType, entityId, formCode,currentPage, numPerPage)); + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/SysFormDictController.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/SysFormDictController.java new file mode 100644 index 000000000..97cc182fa --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/SysFormDictController.java @@ -0,0 +1,90 @@ +package com.pcloud.booksflow.form.controller; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.dto.FormDictDTO; +import com.pcloud.booksflow.form.mybatis.entity.FormDict; +import com.pcloud.booksflow.form.service.FormDictService; +import com.pcloud.booksflow.form.utils.TenantHelper; +import com.pcloud.common.dto.ResponseDto; +import com.pcloud.common.page.PageBeanNew; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +/** + * FormDict Controller 实现增删改查接口 + * + */ +@Api(tags = "字典-无租户【所有租户看到的字典都一样】") +@RestController +@RequestMapping(BaseConstant.CONTEXT_PATH + "form/not-agent/dict") +public class SysFormDictController { + + @Autowired + private FormDictService formDictService; + + /** + * 创建或更新表单字典 + * + * @param dto 表单字典DTO对象 + * @return 表单字典ID + */ + @ApiOperation("创建或更新表单字典") + @PostMapping("/createOrUpdate") + public ResponseDto createOrUpdate(@Validated @RequestBody FormDictDTO dto) { + return new ResponseDto<>( + TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formDictService.createOrUpdate(dto)) + ); + } + + /** + * 根据ID获取表单字典 + * + * @param id 表单字典ID + * @return 表单字典对象 + */ + @ApiOperation("根据ID获取表单字典") + @GetMapping("/get") + public ResponseDto getById(@RequestParam Long id) { + return new ResponseDto<>( + TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formDictService.getById(id)) + ); + } + + /** + * 删除表单字典 + * + * @param id 表单字典ID + * @return 删除结果 + */ + @ApiOperation("删除表单字典") + @GetMapping("/delete") + public ResponseDto delete(@RequestParam Long id) { + return new ResponseDto<>( + TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formDictService.delete(id)) + ); + } + + /** + * 获取表单字典列表 + * + * @param name 表单字典名称 + * @param code 表单字典编码 + * @param currentPage 当前页码 + * @param numPerPage 每页数量 + * @return 表单字典列表 + */ + @ApiOperation("获取表单字典列表") + @GetMapping("/list") + public ResponseDto> listByNameAndCode(@RequestParam(required = false) String name, + @RequestParam(required = false) String code, + @RequestParam(value = "currentPage", defaultValue = "0") Integer currentPage, + @RequestParam(value = "numPerPage", defaultValue = "10") Integer numPerPage) { + return new ResponseDto<>( + TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formDictService.listByNameAndCode(name, code, currentPage, numPerPage)) + ); + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/SysFormFieldDictController.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/SysFormFieldDictController.java new file mode 100644 index 000000000..3ae967fb3 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/SysFormFieldDictController.java @@ -0,0 +1,151 @@ +package com.pcloud.booksflow.form.controller; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.dto.FormFieldDictDTO; +import com.pcloud.booksflow.form.api.dto.FormFieldDictQ; +import com.pcloud.booksflow.form.api.vo.FormFieldDictDifyVo; +import com.pcloud.booksflow.form.api.vo.FormFieldDictVO; +import com.pcloud.booksflow.form.mybatis.entity.FormFieldDict; +import com.pcloud.booksflow.form.service.FormFieldDictService; +import com.pcloud.booksflow.form.utils.TenantHelper; +import com.pcloud.common.dto.ResponseDto; +import com.pcloud.common.page.PageBeanNew; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * FormFieldDict Controller + * + * @author 李郑伟 + */ +@Api(tags = "字典项-无租户【所有租户看到的字典都一样】") +@RestController +@RequestMapping(BaseConstant.CONTEXT_PATH + "form/not-agent/field-dict") +public class SysFormFieldDictController { + + @Autowired + private FormFieldDictService formFieldDictService; + + /** + * 创建新的表单字段配置 + * + * @param dto 表单字段配置对象 + * @return 创建后的表单字段配置对象 + */ + @PostMapping("/createOrUpdate") + public ResponseDto createOrUpdate(@RequestBody FormFieldDictDTO dto) { + return new ResponseDto<>( + TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formFieldDictService.createOrUpdate(dto)) + ); + } + + /** + * 根据 configType 获取表单字段配置 + * + * @param configType 表单字段配置ID + * @return 表单字段配置对象 + */ + @GetMapping("/getList") + public ResponseDto> getList(@RequestParam String configType, + @RequestParam(required = false) Long parentId, + @RequestParam(required = false) Integer status, + @RequestParam(required = false) Integer level) { + return new ResponseDto<>( + TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formFieldDictService.getByConfigType(configType, parentId, status, level)) + ); + } + + @GetMapping("/page") + public ResponseDto> page(@RequestParam String configType, + @RequestParam(required = false) String queryStr, + @RequestParam(required = false) Integer status, + @RequestParam(value = "currentPage", defaultValue = "0") Integer currentPage, + @RequestParam(value = "numPerPage", defaultValue = "10") Integer numPerPage) { + return new ResponseDto<>( + TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formFieldDictService.page(configType, queryStr, status, currentPage, numPerPage)) + ); + } + + @GetMapping("/listByCode") + public ResponseDto> listByCode(@RequestParam("code") String code) { + return new ResponseDto<>( + TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formFieldDictService.getByConfigType(code, null, 1, null)) + ); + } + + /** + * 删除表单字段配置,删除的时候会校验是否被其他字典关联 + * + * @param id 表单字段配置ID + * @return 删除结果 + */ + @GetMapping("/delete") + public ResponseDto delete(@RequestParam Long id) { + return new ResponseDto<>( + TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formFieldDictService.delete(id)) + ); + } + + /** + * 更新表单字段配置排序 + * + * @param id 表单字段配置ID + * @param sortOrder 排序值 + * @return 更新结果 + */ + @PostMapping("/update-sort") + public ResponseDto updateSortOrder(@RequestParam Long id, @RequestParam Integer sortOrder) { + return new ResponseDto<>( + TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formFieldDictService.updateSortOrder(id, sortOrder)) + ); + } + + + /** + * 更新表单字段配置排序 + * + * @return 更新结果 + */ + @GetMapping("/getByCodesByLevel") + public ResponseDto> getByCodesByLevel(@RequestParam Long agentId, @RequestParam String configType, @RequestParam(required = false) List parentIds) { + return new ResponseDto<>(TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formFieldDictService.getByCodesByLevel( agentId, configType, parentIds))); + } + + + /** + * 更新状态字段 + * + * @param id 表单字段配置ID + * @param status 排序值 + * @return 更新结果 + */ + @PostMapping("/update-status") + public ResponseDto updateStatus(@RequestParam Long id, @RequestParam Integer status) { + return new ResponseDto<>( + TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formFieldDictService.updateStatus(id, status)) + ); + } + + @ApiOperation(value = "批量获取表单字段配置,根据configType") + @PostMapping("get") + public ResponseDto>> get(@RequestBody Map q) { + return new ResponseDto<>( + + TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formFieldDictService.get(q)) + ); + } + + @ApiOperation(value = "批量获取表单字段具体项,根据id") + @PostMapping("getByIds") + public ResponseDto> getByIds(@RequestBody List ids, @RequestParam(required = false) Integer deleted) { + return new ResponseDto<>( + TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formFieldDictService.getByIds(ids, deleted)) + ); + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/FormFieldDictFeignController.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/FormFieldDictFeignController.java new file mode 100644 index 000000000..5e894c590 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/FormFieldDictFeignController.java @@ -0,0 +1,118 @@ +package com.pcloud.booksflow.form.controller.feign; + +import cn.hutool.core.collection.CollUtil; +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.dto.FormFieldDictQ; +import com.pcloud.booksflow.form.api.vo.FormFieldDictDifyVo; +import com.pcloud.booksflow.form.api.vo.FormFieldDictVO; +import com.pcloud.booksflow.form.feign.FormFieldDictFeignClient; +import com.pcloud.booksflow.form.mybatis.entity.FormFieldDict; +import com.pcloud.booksflow.form.mybatis.entity.FormFieldDictExample; +import com.pcloud.booksflow.form.service.FormDictService; +import com.pcloud.booksflow.form.service.FormFieldDictService; +import com.pcloud.booksflow.form.utils.TenantHelper; +import com.pcloud.common.utils.string.StringUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.*; + +/** + * FormFieldDict Controller 实现增删改查接口 + * + * @author 李郑伟 + */ +@RestController +@RequestMapping(BaseConstant.CONTEXT_PATH + "formService/field-dict") +public class FormFieldDictFeignController implements FormFieldDictFeignClient { + + @Autowired + private FormFieldDictService formFieldDictService; + + @Autowired + private FormDictService formDictService; + + @Override + public Map> get(Long agentId, Map q) { + Map> map1 = TenantHelper.dynamic(agentId.toString(), () -> formFieldDictService.get(q)); + //比较 q在data中不存在的key + Map q2 = new HashMap<>(); + Set configCodes = TenantHelper.dynamic(agentId.toString(), () -> formDictService.getNotExistConfigCode(q.keySet())); + q.forEach((key, value) -> { + if (configCodes.contains(key)) { + q2.put(key, q.get(key)); + } + }); + //查询 通用字典,不区分租户 + Map> map2 = TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formFieldDictService.get(q2)); + map1.putAll(map2); + return map1; + } + + @Override + public Map> dict(Long agentId, List q) { + if (q == null) { + return new HashMap<>(); + } + Map map = new HashMap<>(); + q.stream().distinct().forEach(key -> map.put(key, null)); + return get(agentId, map); + } + + @Override + public List getByIds(Long agentId, List ids, Integer deleted) { + return TenantHelper.ignore(() -> formFieldDictService.getByIds(ids, deleted)); + } + + @Override + public List getByCodes(Long agentId, String configType, List itemCodes) { + if (StringUtil.isEmpty(configType)) { + return new ArrayList<>(); + } + if (CollUtil.isEmpty(itemCodes)) { + return new ArrayList<>(); + } + Map> map = new HashMap<>(); + map.put(configType, new HashSet<>(itemCodes)); + Map> byCodes = getByCodes(agentId, map); + List data = byCodes.get(configType); + if (data == null) { + return new ArrayList<>(); + } + return data; + } + + + @Override + public List getByCodesByLevel(Long agentId, String configType, List parentIds) { + if (StringUtil.isEmpty(configType)) { + return new ArrayList<>(); + } + return TenantHelper.dynamic(BaseConstant.TplTenantId,()->formFieldDictService.getByCodesByLevel(agentId,configType,parentIds)); + } + + @Override + public Map> getByCodes(Long agentId, Map> q) { + if (q == null) { + return new HashMap<>(); + } + Map> map1 = TenantHelper.dynamic(agentId.toString(), () -> formFieldDictService.getByCodes(q)); + //比较 q在data中不存在的key + Map> q2 = new HashMap<>(); + Set configCodes = TenantHelper.dynamic(agentId.toString(), () -> formDictService.getNotExistConfigCode(q.keySet())); + q.forEach((key, value) -> { + if (configCodes.contains(key)) { + q2.put(key, q.get(key)); + } + }); + if (!q2.isEmpty()) { + //查询 通用字典,不区分租户 + Map> map2 = TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formFieldDictService.getByCodes(q2)); + map1.putAll(map2); + } + return map1; + } + + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/FormPrintConfigFeignController.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/FormPrintConfigFeignController.java new file mode 100644 index 000000000..e6771f152 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/FormPrintConfigFeignController.java @@ -0,0 +1,34 @@ +package com.pcloud.booksflow.form.controller.feign; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.vo.FormPrintConfigVO; +import com.pcloud.booksflow.form.feign.FormPrintConfigFeignClient; +import com.pcloud.booksflow.form.service.FormPrintConfigService; +import com.pcloud.booksflow.form.utils.TenantHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + + +@RestController +@RequestMapping(BaseConstant.CONTEXT_PATH + "formService/form-print-config") +public class FormPrintConfigFeignController implements FormPrintConfigFeignClient { + + @Autowired + private FormPrintConfigService formPrintConfigService; + + /** + * 根据表单ID获取表单打印配置 + * + * @param formCode 表单code + * @return 表单打印配置对象 + */ + @GetMapping("get") + @Override + public FormPrintConfigVO get(@RequestParam Long agentId, @RequestParam String formCode) { + return TenantHelper.dynamic(agentId.toString(), () -> formPrintConfigService.getByFormCode(formCode)); + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/FormTemplateFeignController.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/FormTemplateFeignController.java new file mode 100644 index 000000000..e6de6ae8d --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/FormTemplateFeignController.java @@ -0,0 +1,58 @@ +package com.pcloud.booksflow.form.controller.feign; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.vo.FormTemplateVO; +import com.pcloud.booksflow.form.feign.FormTemplateFeignClient; +import com.pcloud.booksflow.form.service.FormTemplateService; +import com.pcloud.booksflow.form.utils.TenantHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +/** + * FormTemplate Controller 实现增删改查接口 + * + * @author 李郑伟 + */ +@RestController +@RequestMapping(BaseConstant.CONTEXT_PATH + "formService/template") +public class FormTemplateFeignController implements FormTemplateFeignClient { + + @Autowired + private FormTemplateService formTemplateService; + + /** + * + * @return 表单模板列表 + */ + @Override + public FormTemplateVO getMaxVersion(Long agentId, String formCode) { + return TenantHelper.dynamic(agentId.toString(), () -> formTemplateService.getVOMaxVersion(formCode, null, true)); + } + + /** + * + * @return 表单模板列表 + */ + @Override + public FormTemplateVO getMaxVersion(Long agentId, String formCode, Boolean show, Boolean tree) { + return TenantHelper.dynamic(agentId.toString(), () -> formTemplateService.getVOMaxVersion(formCode, show, tree)); + } + + /** + * 根据ID获取表单模板 + * + * @param id 表单模板ID + * @return 表单模板对象 + */ + @Override + public FormTemplateVO getById(Long agentId, + Long id, + Boolean show, + Boolean tree) { + return TenantHelper.dynamic(agentId.toString(), () -> formTemplateService.getVOById(id, show, tree)); + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/ModifyLogRecordFeignController.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/ModifyLogRecordFeignController.java new file mode 100644 index 000000000..d91564838 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/ModifyLogRecordFeignController.java @@ -0,0 +1,31 @@ +package com.pcloud.booksflow.form.controller.feign; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.dto.ModifyLogRecordDTO; +import com.pcloud.booksflow.form.feign.ModifyLogRecordFeignClient; +import com.pcloud.booksflow.form.service.ModifyLogRecordService; +import com.pcloud.booksflow.form.utils.TenantHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * ModifyLogRecord Controller 实现增删改查接口 + * + * @author 李郑伟 + */ +@RestController +@RequestMapping(BaseConstant.CONTEXT_PATH + "formService/modify-log-record") +public class ModifyLogRecordFeignController implements ModifyLogRecordFeignClient { + + @Autowired + private ModifyLogRecordService modifyLogRecordService; + + @Override + public Integer batchCreate(Long agentId, List dtos) { + return TenantHelper.dynamic(agentId.toString(), () -> modifyLogRecordService.batchCreate(dtos)); + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/SystemDictFeignController.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/SystemDictFeignController.java new file mode 100644 index 000000000..09ec6d44b --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/controller/feign/SystemDictFeignController.java @@ -0,0 +1,39 @@ +package com.pcloud.booksflow.form.controller.feign; + +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.api.dto.FormFieldDictQ; +import com.pcloud.booksflow.form.api.vo.FormFieldDictVO; +import com.pcloud.booksflow.form.feign.SystemDictFeignClient; +import com.pcloud.booksflow.form.service.FormFieldDictService; +import com.pcloud.booksflow.form.utils.TenantHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; +import java.util.Map; + +/** + * NotAgentFormFieldDictFeignController + * + * @author 李郑伟 + */ +@RestController +@RequestMapping(BaseConstant.CONTEXT_PATH + "formService/not-agent/field-dict") +public class SystemDictFeignController implements SystemDictFeignClient { + + @Autowired + private FormFieldDictService formFieldDictService; + + @Override + public Map> get(Map q) { + return TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formFieldDictService.get(q)); + } + + @Override + public List getByIds(List ids, Integer deleted) { + return TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formFieldDictService.getByIds(ids, deleted)); + } + + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormDictService.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormDictService.java new file mode 100644 index 000000000..806aff9e4 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormDictService.java @@ -0,0 +1,216 @@ +package com.pcloud.booksflow.form.service; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.StrUtil; +import com.pcloud.booksflow.form.api.dto.FormDictDTO; +import com.pcloud.booksflow.form.mybatis.entity.FormDict; +import com.pcloud.booksflow.form.mybatis.entity.FormDictExample; +import com.pcloud.booksflow.form.mybatis.mapper.FormDictMapperExt; +import com.pcloud.booksflow.form.utils.UserUtils; +import com.pcloud.common.exceptions.BizException; +import com.pcloud.common.page.PageBeanNew; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * FormDict Service 实现增删改查业务逻辑 + */ +@Slf4j +@Service +public class FormDictService { + + @Autowired + private FormDictMapperExt formDictMapperExt; + + @Autowired + private FormFieldDictService formFieldDictService; + + /** + * 创建或更新表单字典 + * + * @param dto 表单字典DTO对象 + * @return 表单字典ID + */ + public Long createOrUpdate(FormDictDTO dto) { + // 检查code是否已存在(排除自己) + if (countByCode(dto.getCode(), dto.getId()) > 0) { + throw new BizException("编码已存在: " + dto.getCode()); + } + if (countByName(dto.getName(), dto.getId()) > 0) { + throw new BizException("名称已存在: " + dto.getName()); + } + + if (dto.getId() == null) { + // 创建新的表单字典 + FormDict entity = new FormDict(); + BeanUtil.copyProperties(dto, entity); + entity.setDeleted(0); + entity.setCreatedBy(UserUtils.getUserId()); + entity.setCreateTime(new Date()); + formDictMapperExt.insertSelective(entity); + return entity.getId(); + } else { + // 更新现有的表单字典 + FormDict entity = new FormDict(); + BeanUtil.copyProperties(dto, entity); + entity.setId(dto.getId()); + entity.setUpdatedBy(UserUtils.getUserId()); + entity.setUpdateTime(new Date()); + formDictMapperExt.updateByPrimaryKeySelective(entity); + return entity.getId(); + } + } + + /** + * 根据ID获取表单字典 + * + * @param id 表单字典ID + * @return 表单字典对象 + */ + public FormDict getById(Long id) { + return formDictMapperExt.selectByPrimaryKey(id); + } + + /** + * 删除表单字典(软删除) + * + * @param id 表单字典ID + * @return 删除结果 + */ + @Transactional + public int delete(Long id) { + FormDict dict = getById(id); + if (dict == null) { + return 0; + } + //级联删除 + int dCount = formFieldDictService.deleteByConfigType(dict.getCode()); + log.info("级联删除字典数量: {} {}", dict.getCode(), dCount); + + FormDict entity = new FormDict(); + entity.setId(id); + entity.setDeleted(1); + entity.setUpdatedBy(UserUtils.getUserId()); + entity.setUpdateTime(new Date()); + return formDictMapperExt.updateByPrimaryKeySelective(entity); + } + + /** + * 获取表单字典列表 + * + * @param name 表单字典名称 + * @return 表单字典列表 + */ + public List listByName(String name) { + FormDictExample example = new FormDictExample(); + FormDictExample.Criteria criteria = example.createCriteria().andDeletedEqualTo(0); + if (name != null && !name.isEmpty()) { + criteria.andNameLike(name + "%"); + } + return formDictMapperExt.selectByExample(example); + } + + /** + * 获取表单字典列表(分页) + * + * @param name 表单字典名称 + * @param code 表单字典编码 + * @param currentPage 当前页码 + * @param numPerPage 每页数量 + * @return 分页结果 + */ + public PageBeanNew listByNameAndCode(String name, String code, Integer currentPage, Integer numPerPage) { + FormDictExample example = new FormDictExample(); + FormDictExample.Criteria criteria = example.createCriteria().andDeletedEqualTo(0); + + if (StrUtil.isNotBlank(name)) { + criteria.andNameLike("%" + name + "%"); + } + + if (StrUtil.isNotBlank(code)) { + criteria.andCodeLike("%" + code + "%"); + } + + example.setOrderByClause("id desc"); + int count = (int) formDictMapperExt.countByExample(example); + List records = formDictMapperExt.selectByExampleWithPaging(example, currentPage * numPerPage, numPerPage); + return new PageBeanNew<>(currentPage, numPerPage, count, records); + } + + /** + * 根据编码获取表单字典count + * + * @param code 表单字典编码 + * @param notId notId + * @return 表单字典对象 + */ + private long countByCode(String code, Long notId) { + FormDictExample example = new FormDictExample(); + FormDictExample.Criteria criteria = example.createCriteria() + .andCodeEqualTo(code) + .andDeletedEqualTo(0); + if (notId != null) { + criteria.andIdNotEqualTo(notId); + } + return formDictMapperExt.countByExample(example); + } + + private long countByName(String name, Long notId) { + FormDictExample example = new FormDictExample(); + FormDictExample.Criteria criteria = example.createCriteria() + .andNameEqualTo(name) + .andDeletedEqualTo(0); + if (notId != null) { + criteria.andIdNotEqualTo(notId); + } + return formDictMapperExt.countByExample(example); + } + + public List list(List configTypes) { + FormDictExample example = new FormDictExample(); + example.createCriteria() + .andCodeIn(configTypes) + .andDeletedEqualTo(0); + return formDictMapperExt.selectByExample(example); + } + + @Transactional + public int create(List dicts) { + for (FormDict dict : dicts) { + dict.setId(null); + } + return formDictMapperExt.batchInsert(dicts); + } + + /** + * 获取 codes 中,不在当前租户中表单字典中的 code + * @param codes codes + * @return code + */ + public Set getNotExistConfigCode(Set codes) { + if(codes == null || codes.isEmpty()){ + return new HashSet<>(); + } + FormDictExample example = new FormDictExample(); + example.createCriteria() + .andCodeIn(new ArrayList<>(codes)) + .andDeletedEqualTo(0); + List list = formDictMapperExt.selectByExample(example); + if (list.isEmpty()) { + return codes; + } + Set notExistCodes = new HashSet<>(); + Set existCodes = list.stream().map(FormDict::getCode).collect(Collectors.toSet()); + for (String code : codes) { + if (!existCodes.contains(code)) { + notExistCodes.add(code); + } + } + return notExistCodes; + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormFieldDictService.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormFieldDictService.java new file mode 100644 index 000000000..d185693b7 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormFieldDictService.java @@ -0,0 +1,628 @@ +package com.pcloud.booksflow.form.service; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import com.pcloud.booksflow.form.api.constant.FormFieldDictType; +import com.pcloud.booksflow.form.api.dto.FormFieldDictDTO; +import com.pcloud.booksflow.form.api.dto.FormFieldDictQ; +import com.pcloud.booksflow.form.api.vo.FormFieldDictDifyVo; +import com.pcloud.booksflow.form.api.dto.DictCodesDTO; +import com.pcloud.booksflow.form.api.vo.FormFieldDictVO; +import com.pcloud.booksflow.form.mybatis.entity.FormFieldDict; +import com.pcloud.booksflow.form.mybatis.entity.FormFieldDictExample; +import com.pcloud.booksflow.form.mybatis.mapper.FormFieldDictMapperExt; +import com.pcloud.booksflow.form.utils.UserUtils; +import com.pcloud.common.exceptions.BizException; +import com.pcloud.common.page.PageBeanNew; +import com.pcloud.common.utils.string.StringUtil; +import com.pcloud.universe.commons.utils.JsonUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.Assert; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * FormFieldDict Service 实现增删改查业务逻辑 + */ +@Slf4j +@Service +public class FormFieldDictService { + + @Autowired + private FormFieldDictMapperExt formFieldDictMapperExt; + + /** + * 创建新的表单字段配置 + * + * @param dto 表单字段配置对象 + * @return 创建后的表单字段配置对象 + */ + public Long createOrUpdate(FormFieldDictDTO dto) { + if (countByCode(dto.getConfigType(), dto.getCode(), dto.getId()) > 0) { + throw new BizException("已存在相同的编码:" + dto.getCode()); + } + if (countByName(dto.getConfigType(), dto.getName(), dto.getId()) > 0) { + throw new BizException("已存在相同的名称:" + dto.getName()); + } + if (dto.getId() != null && dto.getId().equals(dto.getParentId())) { + throw new BizException("不能设置自己为父级"); + } + if (dto.getParentId() != null) { + FormFieldDict parentE = formFieldDictMapperExt.selectByPrimaryKey(dto.getParentId()); + Assert.notNull(parentE, "无效的 parentId"); + Assert.isTrue(parentE.getConfigType().equals(dto.getConfigType()), "configType 和 parent字典项的 configType不一样"); + } + + //获取关联的Id,在删除时做校验用 + Set ids = getDelCheckIds(dto); + + if (dto.getId() == null) { + //新增 + FormFieldDict entity = new FormFieldDict(); + BeanUtil.copyProperties(dto, entity, "otherFields"); + entity.setDeleted(0); + entity.setCreateTime(new Date()); + entity.setCreatedBy(UserUtils.getUserId()); + if (dto.getOtherFields() != null) { + entity.setOtherFields(JsonUtils.serialize(dto.getOtherFields())); + } + if (!ids.isEmpty()) { + entity.setCheckIds(StrUtil.join(",", ids)); + } else { + entity.setCheckIds(""); + } + formFieldDictMapperExt.insertSelective(entity); + return entity.getId(); + } else { + //更新 + FormFieldDict entity = new FormFieldDict(); + BeanUtil.copyProperties(dto, entity, "otherFields"); + entity.setUpdateTime(new Date()); + entity.setUpdatedBy(UserUtils.getUserId()); + if (dto.getOtherFields() != null) { + entity.setOtherFields(JsonUtils.serialize(dto.getOtherFields())); + } + if (!ids.isEmpty()) { + entity.setCheckIds(StrUtil.join(",", ids)); + } else { + entity.setCheckIds(""); + } + formFieldDictMapperExt.updateByPrimaryKeySelective(entity); + return entity.getId(); + } + } + + /** + * 根据configType获取表单字段配置 + * + * @param configType configType + * @param status status + * @param level + * @return 表单字段配置对象 + */ + public List getByConfigType(String configType, Long parentId, Integer status, Integer level) { + FormFieldDictExample example = new FormFieldDictExample(); + FormFieldDictExample.Criteria criteria = example.createCriteria().andConfigTypeEqualTo(configType).andDeletedEqualTo(0); + if (parentId != null) { + criteria.andParentIdEqualTo(parentId); + } + if (status != null) { + criteria.andStatusEqualTo(status); + } + example.setOrderByClause("sort_order asc,name asc"); + List dicts = formFieldDictMapperExt.selectByExampleWithBLOBs(example); + //level参数过滤 + if (level != null) { + final int _l; + if (level < 1) { + _l = 1; + } else { + _l = level; + } + return dicts.stream() + .filter(dict -> calculateLevel(dict, dicts).equals(_l)) + .collect(Collectors.toList()); + } + return dicts; + } + + /** + * 分页查询 + * + * @return + */ + public PageBeanNew page(String configType, String queryStr, Integer status, Integer currentPage, Integer numPerPage) { + //查询 顶级节点 + FormFieldDictExample example = getTopExample(configType, status); + int count = (int) formFieldDictMapperExt.countByExampleExt(example, queryStr); + if (count == 0) { + return new PageBeanNew<>(currentPage, numPerPage, 0, new ArrayList<>()); + } + List records = formFieldDictMapperExt.selectByExampleWithPagingBLOBs(example, currentPage * numPerPage, numPerPage, queryStr); + if (CollUtil.isEmpty(records)) { + return new PageBeanNew<>(currentPage, numPerPage, 0, new ArrayList<>()); + } + List all = new ArrayList<>(records); + + //查询 子节点 + List pIds = records.stream().map(FormFieldDict::getId).collect(Collectors.toList()); + if (!CollUtil.isEmpty(pIds)) { + all.addAll(findAllChildren(configType, pIds, status, 10)); + } + //to vo + List vos = BeanUtil.copyToList(all, FormFieldDictVO.class); + return new PageBeanNew<>(currentPage, numPerPage, count, buildTree(vos)); + } + + /** + * 递归查询所有子节点 + */ + private List findAllChildren(String configType, List parentIds, Integer status, int maxLevel) { + if (parentIds.isEmpty() || maxLevel <= 0) { + return new ArrayList<>(); + } + List allChildren = new ArrayList<>(); + List directChildren = formFieldDictMapperExt.selectByExampleWithBLOBs(getFormFieldDictExample(configType, status, parentIds)); + + if (!directChildren.isEmpty()) { + allChildren.addAll(directChildren); + + // 递归查询下一层子节点 + List nextLevelParentIds = directChildren.stream() + .map(FormFieldDict::getId) + .collect(Collectors.toList()); + + List nextLevelChildren = findAllChildren(configType, nextLevelParentIds, status, maxLevel - 1); + allChildren.addAll(nextLevelChildren); + } + + return allChildren; + } + + private FormFieldDictExample getTopExample(String configType, Integer status) { + FormFieldDictExample example = new FormFieldDictExample(); + FormFieldDictExample.Criteria criteria = example.createCriteria() + .andConfigTypeEqualTo(configType) + .andParentIdIsNull() + .andDeletedEqualTo(0); + if (status != null) { + criteria.andStatusEqualTo(status); + } + example.setOrderByClause("sort_order asc,name asc"); + return example; + } + + private FormFieldDictExample getFormFieldDictExample(String configType, Integer status, List parentIds) { + FormFieldDictExample example = new FormFieldDictExample(); + FormFieldDictExample.Criteria criteria = example.createCriteria() + .andConfigTypeEqualTo(configType) + .andDeletedEqualTo(0); + if (status != null) { + criteria.andStatusEqualTo(status); + } + if (parentIds != null) { + criteria.andParentIdIn(parentIds); + } + example.setOrderByClause("sort_order asc,name asc"); + return example; + } + + /** + * 删除表单字段配置 + * + * @param id 表单字段配置ID + * @return 删除结果 + */ + public int delete(Long id) { + checkDependent(id); + FormFieldDict entity = new FormFieldDict(); + entity.setId(id); + entity.setDeleted(1); + entity.setUpdateTime(new Date()); + entity.setUpdatedBy(UserUtils.getUserId()); + return formFieldDictMapperExt.updateByPrimaryKeySelective(entity); + } + + /** + * 删除表单字段配置 + * + * @param configType configType + * @return 删除结果 + */ + @Transactional + public int deleteByConfigType(String configType) { + FormFieldDict entity = new FormFieldDict(); + entity.setDeleted(1); + entity.setUpdateTime(new Date()); + entity.setUpdatedBy(UserUtils.getUserId()); + FormFieldDictExample example = new FormFieldDictExample(); + example.createCriteria().andConfigTypeEqualTo(configType).andDeletedEqualTo(0); + return formFieldDictMapperExt.updateByExampleSelective(entity, example); + } + + /** + * 更新表单字段配置排序 + * + * @param id 表单字段配置ID + * @param sortOrder 排序值 + * @return 更新结果 + */ + public int updateSortOrder(Long id, Integer sortOrder) { + FormFieldDict entity = new FormFieldDict(); + entity.setId(id); + entity.setSortOrder(sortOrder); + entity.setUpdateTime(new Date()); + entity.setUpdatedBy(UserUtils.getUserId()); + return formFieldDictMapperExt.updateByPrimaryKeySelective(entity); + } + + + @Transactional + public Integer updateStatus(Long id, Integer status) { + Long userId = UserUtils.getUserId(); + FormFieldDict item = formFieldDictMapperExt.selectByPrimaryKey(id); + if (item == null) { + return 0; + } + if (item.getDeleted() == 1) { + throw new BizException("已删除的表单字段配置不能修改状态"); + } + //如果有子节点,也要全部修改状态 + updateStatusChildren(item.getConfigType(), Collections.singletonList(item.getId()), status, 0, userId); + + FormFieldDict entity = new FormFieldDict(); + entity.setId(id); + entity.setStatus(status); + entity.setUpdateTime(new Date()); + entity.setUpdatedBy(userId); + return formFieldDictMapperExt.updateByPrimaryKeySelective(entity); + } + + private void updateStatusChildren(String configType, List pids, Integer status, int depth, Long userId) { + // 限制递归深度,防止死循环 + if (depth >= 10) { + throw new BizException("树形层级过深,超过10层,无法继续更新状态"); + } + + // 查找所有直接子节点 + FormFieldDictExample example = new FormFieldDictExample(); + example.createCriteria() + .andConfigTypeEqualTo(configType) + .andParentIdIn(pids) + .andStatusEqualTo(status == 0 ? 1 : 0) + .andDeletedEqualTo(0); + List children = formFieldDictMapperExt.selectByExample(example); + if (children.isEmpty()) { + log.debug("没有找到子节点,结束递归"); + return; + } + + //更新 + List _ids = children.stream().map(FormFieldDict::getId).collect(Collectors.toList()); + FormFieldDict updateEntity = new FormFieldDict(); + updateEntity.setStatus(status); + updateEntity.setUpdateTime(new Date()); + updateEntity.setUpdatedBy(userId); + FormFieldDictExample _example = new FormFieldDictExample(); + _example.createCriteria() + .andConfigTypeEqualTo(configType) + .andIdIn(_ids); + int i = formFieldDictMapperExt.updateByExampleSelective(updateEntity, _example); + log.debug("更新表单字段配置【{}】结果:{}", _ids, i); + updateStatusChildren(configType, _ids, status, depth + 1, userId); + } + + /** + * 检查字段的关联 + * + * @param id + */ + private void checkDependent(Long id) { + FormFieldDictExample example = new FormFieldDictExample(); + example.createCriteria().andParentIdEqualTo(id).andDeletedEqualTo(0); + List dependentDicts = formFieldDictMapperExt.selectByExample(example); + if (!dependentDicts.isEmpty()) { + String sss = ""; + for (FormFieldDict item : dependentDicts) { + FormFieldDictType byName = FormFieldDictType.getByName(item.getConfigType()); + sss += "【configType:" + item.getConfigType() + ";"; + if (byName != null) { + sss += "配置类型:" + FormFieldDictType.getByName(item.getConfigType()) + ";"; + } + sss += "配置名称:" + item.getName() + ";】"; + } + throw new RuntimeException("请先删除该字段的子字段:" + sss); + } + } + + public List getByCodesByLevel(Long agentId, String configType, List parentIds) { + if (StringUtil.isEmpty(configType)) { + return new ArrayList<>(); + } + FormFieldDictExample example = new FormFieldDictExample(); + FormFieldDictExample.Criteria criteria = example.createCriteria(); + criteria.andStatusEqualTo(1) + .andConfigTypeEqualTo(configType) + .andDeletedEqualTo(0); + + + if (CollUtil.isNotEmpty(parentIds)) { + + criteria.andParentIdIn(parentIds); + + }else { + criteria.andParentIdIsNull(); + } + + + example.setOrderByClause("sort_order asc,name asc"); + List dicts = formFieldDictMapperExt.selectByExampleWithBLOBs(example); + + if (dicts == null) { + return new ArrayList<>(); + } + List vos = dicts.stream().map(o->{ + FormFieldDictDifyVo formFieldDictDifyVo = new FormFieldDictDifyVo(); + formFieldDictDifyVo.setId(o.getId()); + formFieldDictDifyVo.setName(o.getName()); + return formFieldDictDifyVo; + }).collect(Collectors.toList()); + + return vos; + } + + + public Map> get(Map qs) { + if (qs == null || qs.isEmpty()) { + return Collections.emptyMap(); + } + Set configTypes = qs.keySet(); + FormFieldDictExample example = new FormFieldDictExample(); + example.createCriteria() + .andConfigTypeIn(new ArrayList<>(configTypes)) + .andDeletedEqualTo(0); + example.setOrderByClause("sort_order asc,name asc"); + List dicts = formFieldDictMapperExt.selectByExampleWithBLOBs(example); + + Map> result = dicts.stream() + .collect( + Collectors.groupingBy(FormFieldDict::getConfigType) + ); + + //内存中参数进行过滤和转换 + Map> data = new HashMap<>(); + for (String configType : configTypes) { + if (result.containsKey(configType)) { + List configTypeDicts = result.get(configType); + FormFieldDictQ query = qs.get(configType); + + if (query != null) { + //过滤状态 + if (query.getAllStatus() == null || !query.getAllStatus()) { + configTypeDicts = configTypeDicts.stream() + .filter(item -> item.getStatus() == 1) + .collect(Collectors.toList()); + } + + //parentCode 过滤 + if (StrUtil.isNotBlank(query.getParentCode())) { + if (query.getParentCodes() == null) { + Set set = new HashSet<>(); + set.add(query.getParentCode()); + query.setParentCodes(set); + } else { + query.getParentCodes().add(query.getParentCode()); + } + } + + //parentCodes 过滤 parentCodes 不存在时,返回为空 + if (CollUtil.isNotEmpty(query.getParentCodes())) { + Set parentIds = new HashSet<>(); + for (FormFieldDict pDict : configTypeDicts) { + if (query.getParentCodes().contains(pDict.getCode())) { + parentIds.add(pDict.getId()); + } + } + if (!parentIds.isEmpty()) { + // 递归获取所有子节点 + Set allChildIds = getAllChildIds(parentIds, configTypeDicts, 0); + configTypeDicts = configTypeDicts.stream() + .filter(item -> allChildIds.contains(item.getId())) + .collect(Collectors.toList()); + }else { + configTypeDicts = Collections.emptyList(); + } + } +// +// //fieldCodes 过滤 +// if (CollUtil.isNotEmpty(query.getFieldCodes())) { +// configTypeDicts = configTypeDicts.stream() +// .filter(item -> query.getFieldCodes().contains(item.getCode())) +// .collect(Collectors.toList()); +// } + + //parentId 过滤 + if (query.getParentId() != null) { + configTypeDicts = configTypeDicts.stream() + .filter(item -> query.getParentId().equals(item.getParentId())) + .collect(Collectors.toList()); + } + + //level参数过滤,根据parentId来确定层级 + if (query.getLevel() != null) { + final int _l; + if (query.getLevel() < 1) { + _l = 1; + } else { + _l = query.getLevel(); + } + configTypeDicts = configTypeDicts.stream() + .filter(dict -> calculateLevel(dict, dicts).equals(_l)) + .collect(Collectors.toList()); + } + + //转VO + List vos = BeanUtil.copyToList(configTypeDicts, FormFieldDictVO.class); + + //是否转化成 tree + if (Boolean.TRUE.equals(query.getTree())) { + vos = buildTree(vos); + } + data.put(configType, vos); + } else { + //过滤状态 只查显示 + configTypeDicts = configTypeDicts.stream() + .filter(item -> item.getStatus() == 1) + .collect(Collectors.toList()); + + //转VO + List vos = BeanUtil.copyToList(configTypeDicts, FormFieldDictVO.class); + data.put(configType, vos); + } + } + } + return data; + } + + /** + * 递归获取所有子节点ID(带递归深度限制) + */ + private Set getAllChildIds(Set parentIds, List allDicts, int depth) { + // 限制递归深度为10层 + if (depth >= 10) { + log.error("递归深度已超过10层,请检查数据结构"); + return new HashSet<>(); + } + + Set result = new HashSet<>(parentIds); + + // 找到直接子节点 + Set directChildren = allDicts.stream() + .filter(dict -> parentIds.contains(dict.getParentId())) + .map(FormFieldDict::getId) + .collect(Collectors.toSet()); + + if (!directChildren.isEmpty()) { + result.addAll(directChildren); + result.addAll(getAllChildIds(directChildren, allDicts, depth + 1)); + } + return result; + } + + private Integer calculateLevel(FormFieldDict dict, List allDicts) { + if (dict.getParentId() == null) { + return 1; + } + + for (FormFieldDict parent : allDicts) { + if (parent.getId().equals(dict.getParentId())) { + return calculateLevel(parent, allDicts) + 1; + } + } + return 1; + } + + private List buildTree(List list) { + Map map = list.stream() + .collect(Collectors.toMap(FormFieldDictVO::getId, v -> v)); + + List tree = new ArrayList<>(); + for (FormFieldDictVO node : list) { + if (node.getParentId() == null) { + tree.add(node); + } else { + FormFieldDictVO parent = map.get(node.getParentId()); + if (parent != null) { + if (parent.getChildren() == null) { + parent.setChildren(new ArrayList<>()); + } + parent.getChildren().add(node); + } + } + } + return tree; + } + + public List getByIds(List ids, Integer deleted) { + Assert.notEmpty(ids, "ids cannot be empty"); + FormFieldDictExample example = new FormFieldDictExample(); + FormFieldDictExample.Criteria criteria = example.createCriteria() + .andIdIn(ids); + if (deleted != null) { + criteria.andDeletedEqualTo(deleted); + } + List dicts = formFieldDictMapperExt.selectByExampleWithBLOBs(example); + + return BeanUtil.copyToList(dicts, FormFieldDictVO.class); + } + + public Map> getByCodes(Map> q) { + if (CollUtil.isEmpty(q)) { + return Collections.emptyMap(); + } + List list = new ArrayList<>(); + q.forEach((configType, itemCodes) -> { + if (CollUtil.isEmpty(itemCodes)) { + throw new BizException("请指定字典项编码!"); + } + if (StrUtil.isBlank(configType)) { + throw new BizException("请指定字典编码!"); + } + list.add(new DictCodesDTO(configType, itemCodes)); + }); + List data = formFieldDictMapperExt.getByCodes(list); + if (CollUtil.isEmpty(data)) { + return new HashMap<>(); + } + return BeanUtil.copyToList(data, FormFieldDictVO.class) + .stream() + .collect( + Collectors.groupingBy(FormFieldDictVO::getConfigType) + ); + } + + /** + * 获取删除、禁用时需要检查的Id + * + * @param dto dto + * @return ids + */ + private Set getDelCheckIds(FormFieldDictDTO dto) { + Set set = new HashSet<>(); + + if (dto.getParentId() != null) { + set.add(dto.getParentId()); + } + return set; + } + + private long countByCode(String configType, String code, Long notId) { + FormFieldDictExample example = new FormFieldDictExample(); + FormFieldDictExample.Criteria ca = example.createCriteria() + .andConfigTypeEqualTo(configType) + .andCodeEqualTo(code) + .andDeletedEqualTo(0); + if (notId != null) { + ca.andIdNotEqualTo(notId); + } + return formFieldDictMapperExt.countByExample(example); + } + + private long countByName(String configType, String name, Long notId) { + FormFieldDictExample example = new FormFieldDictExample(); + FormFieldDictExample.Criteria ca = example.createCriteria() + .andConfigTypeEqualTo(configType) + .andNameEqualTo(name) + .andDeletedEqualTo(0); + if (notId != null) { + ca.andIdNotEqualTo(notId); + } + return formFieldDictMapperExt.countByExample(example); + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormPrintConfigService.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormPrintConfigService.java new file mode 100644 index 000000000..e0c52b9e5 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormPrintConfigService.java @@ -0,0 +1,288 @@ +package com.pcloud.booksflow.form.service; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.convert.Convert; +import com.commons.weboffice.api.model.wps.CreateFileRequest; +import com.commons.weboffice.api.model.wps.CreateFileResponse; +import com.commons.weboffice.api.model.wps.UserPermission; +import com.commons.weboffice.api.service.wps.WpsWebOfficeService; +import com.pcloud.booksflow.form.api.dto.FormPrintConfigDTO; +import com.pcloud.booksflow.form.api.dto.FormPrintConfigModeDTO; +import com.pcloud.booksflow.form.api.dto.FormPrintConfigUploadDTO; +import com.pcloud.booksflow.form.api.dto.FormPrintDTO; +import com.pcloud.booksflow.form.api.vo.FormPrintConfigVO; +import com.pcloud.booksflow.form.mybatis.entity.Form; +import com.pcloud.booksflow.form.mybatis.entity.FormPrintConfig; +import com.pcloud.booksflow.form.mybatis.entity.FormPrintConfigExample; +import com.pcloud.booksflow.form.mybatis.entity.FormPrintConfigWithBLOBs; +import com.pcloud.booksflow.form.mybatis.mapper.FormPrintConfigMapperExt; +import com.pcloud.booksflow.form.utils.UserUtils; +import com.pcloud.booksflow.form.utils.poi.WordTemplateProcessor; +import com.pcloud.common.entity.UploadResultInfo; +import com.pcloud.common.exceptions.BizException; +import com.pcloud.common.utils.FileUtils; +import com.pcloud.common.utils.aliyun.OssUtils; +import com.pcloud.common.utils.string.StringUtil; +import com.pcloud.llm.cockpit.api.domain.dto.request.WorkflowRequestBody; +import com.pcloud.llm.cockpit.api.domain.dto.response.CompletionResponse; +import com.pcloud.llm.cockpit.client.DifyClient; +import com.pcloud.universe.commons.utils.JsonUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.xwpf.usermodel.XWPFDocument; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * FormPrintConfig Service 实现增删改查业务逻辑 + */ +@Slf4j +@Service +public class FormPrintConfigService { + + @Autowired + private FormPrintConfigMapperExt formPrintConfigMapperExt; + @Autowired + private FormService formService; + @Autowired + private WpsWebOfficeService wpsWebOfficeService; + @Autowired + private DifyClient difyClient; + + /** + * 创建或更新表单打印配置 + * + * @param dto 表单打印配置对象 + * @return 创建或更新后的表单打印配置对象 + */ + public FormPrintConfigWithBLOBs createOrUpdate(FormPrintConfigDTO dto) { + // 创建操作 + FormPrintConfig config = getEntityByFormId(dto.getFormId()); + FormPrintConfigWithBLOBs entity = new FormPrintConfigWithBLOBs(); + if (config != null) { + // 更新操作 + BeanUtil.copyProperties(dto, entity, "printFields"); + if (dto.getPrintFields() != null) { + entity.setPrintFields(JsonUtils.serialize(dto.getPrintFields())); + } else { + entity.setPrintFields("[]"); + } + entity.setUpdatedBy(UserUtils.getUserId()); + entity.setUpdateTime(new Date()); + formPrintConfigMapperExt.updateByPrimaryKeySelective(entity); + } else { + BeanUtil.copyProperties(dto, entity, "printFields"); + if (dto.getPrintFields() != null) { + entity.setPrintFields(JsonUtils.serialize(dto.getPrintFields())); + } else { + entity.setPrintFields("[]"); + } + entity.setCreatedBy(UserUtils.getUserId()); + entity.setCreateTime(new Date()); + formPrintConfigMapperExt.insertSelective(entity); + } + return entity; + } + + /** + * 根据表单ID获取表单打印配置 + * + * @param formId 表单ID + * @return 表单打印配置对象 + */ + public FormPrintConfigVO getByFormId(Long formId) { + FormPrintConfigExample example = new FormPrintConfigExample(); + example.createCriteria() + .andFormIdEqualTo(formId); + example.setOrderByClause("id desc"); + List formPrintConfigs = formPrintConfigMapperExt.selectByExampleWithBLOBs(example); + if (!formPrintConfigs.isEmpty()) { + return BeanUtil.copyProperties(formPrintConfigs.get(0), FormPrintConfigVO.class); + } else { + return null; + } + } + + public FormPrintConfigWithBLOBs getEntityByFormId(Long formId) { + FormPrintConfigExample example = new FormPrintConfigExample(); + example.createCriteria() + .andFormIdEqualTo(formId); + example.setOrderByClause("id desc"); + List formPrintConfigs = formPrintConfigMapperExt.selectByExampleWithBLOBs(example); + if (!formPrintConfigs.isEmpty()) { + return formPrintConfigs.get(0); + } else { + return null; + } + } + + /** + * 根据表单code获取表单打印配置 + * + * @param formCode 表单code + * @return 表单打印配置对象 + */ + public FormPrintConfigVO getByFormCode(String formCode) { + Form form = formService.getByCode(formCode); + if (form == null) { + return null; + } + return getByFormId(form.getId()); + } + + public FormPrintConfigWithBLOBs getEntityByFormCode(String formCode) { + Form form = formService.getByCode(formCode); + if (form == null) { + return null; + } + return getEntityByFormId(form.getId()); + } + + public int updateMode(FormPrintConfigModeDTO dto) { + FormPrintConfigWithBLOBs entity = new FormPrintConfigWithBLOBs(); + FormPrintConfigWithBLOBs config = getEntityByFormId(dto.getFormId()); + if (config != null) { + entity.setId(config.getId()); + entity.setMode(dto.getMode()); + return formPrintConfigMapperExt.updateByPrimaryKeySelective(entity); + } else { + entity.setMode(dto.getMode()); + entity.setCreatedBy(UserUtils.getUserId()); + entity.setCreateTime(new Date()); + return formPrintConfigMapperExt.insertSelective(entity); + } + } + + public void createOrUpdate(FormPrintConfigUploadDTO dto) { + // 创建操作 + Long userId = UserUtils.getUserId(); + FormPrintConfigWithBLOBs upEntity = new FormPrintConfigWithBLOBs(); + FormPrintConfigWithBLOBs _config = getEntityByFormId(dto.getFormId()); + if (_config != null) { + // 更新操作 + BeanUtil.copyProperties(dto, upEntity); + upEntity.setId(_config.getId()); + upEntity.setUpdatedBy(userId); + upEntity.setUpdateTime(new Date()); + formPrintConfigMapperExt.updateByPrimaryKeySelective(upEntity); + } else { + BeanUtil.copyProperties(dto, upEntity); + upEntity.setCreatedBy(userId); + upEntity.setCreateTime(new Date()); + formPrintConfigMapperExt.insertSelective(upEntity); + } + + //更新fileWpsId + FormPrintConfig newConfig = getEntityByFormId(dto.getFormId()); + if (StringUtil.isNotBlank(newConfig.getFileUrl())) { + updateFileWpsId(userId, newConfig); + } + } + + + public Integer updateFileWpsId(Long userId, FormPrintConfig entity) { + if (!"docx".equals(entity.getFileType())) { + throw new BizException("请上传docx文件"); + } + CreateFileRequest rq = new CreateFileRequest(); + rq.setFileUrl(entity.getFileUrl()); + rq.setFileName(entity.getFileName()); + rq.setFileSize(entity.getFileSize()); + rq.setFileType(entity.getFileType()); + rq.setUserPermission(buildWpsFileUserPermission(userId)); + CreateFileResponse fileRecord = wpsWebOfficeService.createFileRecord(userId, rq); + String fileId = fileRecord.getFileId(); + + Map map = new HashMap<>(); + map.put("formFields", null);//TODO 待开发 + map.put("fileUrl", entity.getFileUrl()); + WorkflowRequestBody requestBody = WorkflowRequestBody.builder() + .user("auto").inputs(map).build(); + CompletionResponse response = difyClient.workflowsRunBlocking("*******", requestBody); + log.info("dify response: {}", response); + + //更新 + FormPrintConfigWithBLOBs upEntity = new FormPrintConfigWithBLOBs(); + upEntity.setId(entity.getId()); + upEntity.setFileWpsId(fileId); + return formPrintConfigMapperExt.updateByPrimaryKeySelective(upEntity); + } + + + public Integer aiParsesWord(Long formId) { + Long userId = UserUtils.getUserId(); + FormPrintConfig _entity = getEntityByFormId(formId); + String fileUrl = _entity.getFileUrl(); + CreateFileRequest request = new CreateFileRequest(); + request.setFileUrl(fileUrl); + request.setFileType(_entity.getFileType()); + CreateFileResponse fileRecord = wpsWebOfficeService.createFileRecord(userId, request); + String fileId = fileRecord.getFileId(); + + //更新 + FormPrintConfigWithBLOBs upEntity = new FormPrintConfigWithBLOBs(); + upEntity.setId(_entity.getId()); + upEntity.setFileWpsId(fileId); + return formPrintConfigMapperExt.updateByPrimaryKeySelective(upEntity); + } + + private UserPermission buildWpsFileUserPermission(Long userId) { + return UserPermission + .builder() + .userId(Convert.toStr(userId)) + .read(true) + .update(true) + .download(true) + .rename(false) + .history(false) + .copy(true) + .print(true) + .saveAs(true) + .comment(true) + .build(); + } + + public UploadResultInfo print(FormPrintDTO dto) throws IOException { + FormPrintConfig config = null; + if (StringUtil.isNotBlank(dto.getFormCode())) { + config = getEntityByFormCode(dto.getFormCode()); + } else if (dto.getFormId() != null) { + config = getEntityByFormId(dto.getFormId()); + } + if (config == null) { + throw new BizException("未找到打印配置"); + } + if (StringUtil.isBlank(config.getFileWpsId())) { + throw new BizException("未找到wpsId打印文件"); + } + String fileName = config.getFileName(); + String fileType = config.getFileType(); + if (StringUtil.isBlank(fileName)) { + throw new BizException("未找到文件名"); + } + if (StringUtil.isBlank(fileType)) { + throw new BizException("未找到文件类型"); + } + if (!fileType.trim().equalsIgnoreCase("docx")) { + throw new BizException("只支持docx文件"); + } + String exportUrl = wpsWebOfficeService.getExportUrl(config.getFileWpsId()); + + byte[] bytes = FileUtils.downloadByteFromUrl(exportUrl); + try (WordTemplateProcessor processor = new WordTemplateProcessor(new ByteArrayInputStream(bytes))) { + processor.push(dto.getData()); + XWPFDocument docx = processor.getDocx(); + try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { + docx.write(baos); + return OssUtils.uploadFileByte(baos.toByteArray(), fileName, fileType); + } + } + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormService.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormService.java new file mode 100644 index 000000000..8d0422d47 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormService.java @@ -0,0 +1,135 @@ +package com.pcloud.booksflow.form.service; + +import cn.hutool.core.util.StrUtil; +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.mybatis.entity.*; +import com.pcloud.booksflow.form.mybatis.mapper.FormMapperExt; +import com.pcloud.booksflow.form.utils.TenantHelper; +import com.pcloud.common.exceptions.BizException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * Form Service 实现增删改查业务逻辑 + */ +@Service +public class FormService { + + @Autowired + private FormMapperExt formMapperExt; + + /** + * 创建表单 + * + * @param form 表单对象 + * @return 创建后的表单对象 + */ + public Form create(Form form) { + // 检查code是否已存在(排除自己) + if (countByCode(form.getCode(), null) > 0) { + throw new BizException("编码已存在: " + form.getCode()); + } + if (countByName(form.getName(), null) > 0) { + throw new BizException("名称已存在: " + form.getName()); + } + form.setId(null); + formMapperExt.insertSelective(form); + return form; + } + + /** + * 根据ID获取表单 + * + * @param id 表单ID + * @return 表单对象 + */ + public Form getById(Long id) { + return formMapperExt.selectByPrimaryKey(id); + } + + /** + * 更新表单信息 + * + * @param id 表单ID + * @param form 更新的表单对象 + * @return 更新后的表单对象 + */ + public Form update(Long id, Form form) { + // 检查code是否已存在(排除自己) + if (countByCode(form.getCode(), id) > 0) { + throw new BizException("编码已存在: " + form.getCode()); + } + if (countByName(form.getName(), id) > 0) { + throw new BizException("名称已存在: " + form.getName()); + } + form.setId(id); + formMapperExt.updateByPrimaryKeySelective(form); + return form; + } + + /** + * 删除表单 + * + * @param id 表单ID + * @return 删除结果 + */ + public int delete(Long id) { + return formMapperExt.deleteByPrimaryKey(id); + } + + /** + * 获取表单列表 + * + * @param name 表单名称 + * @return 表单列表 + */ + public List listByName(String name) { + FormExample example = new FormExample(); + if (StrUtil.isNotBlank(name)) { + example.createCriteria() + .andNameLike("%" + name + "%"); + } + return formMapperExt.selectByExample(example); + } + + public Form getByCode(String formCode) { + FormExample example = new FormExample(); + example.createCriteria().andCodeEqualTo(formCode); + return formMapperExt.selectOneByExample(example); + } + + /** + * 获取所有表单 + * + * @return 表单对象 + */ + public List list() { + FormExample example = new FormExample(); + return formMapperExt.selectByExample(example); + } + + private long countByCode(String code, Long notId) { + FormExample example = new FormExample(); + FormExample.Criteria criteria = example.createCriteria() + .andCodeEqualTo(code); + if (notId != null) { + criteria.andIdNotEqualTo(notId); + } + return formMapperExt.countByExample(example); + } + + private long countByName(String name, Long notId) { + FormExample example = new FormExample(); + FormExample.Criteria criteria = example.createCriteria() + .andNameEqualTo(name); + if (notId != null) { + criteria.andIdNotEqualTo(notId); + } + return formMapperExt.countByExample(example); + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormTemplateFieldService.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormTemplateFieldService.java new file mode 100644 index 000000000..67644078f --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormTemplateFieldService.java @@ -0,0 +1,217 @@ +package com.pcloud.booksflow.form.service; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import com.pcloud.booksflow.form.api.constant.FormTemplateFieldType; +import com.pcloud.booksflow.form.api.dto.FormTemplateDTO; +import com.pcloud.booksflow.form.mybatis.entity.FormTemplateField; +import com.pcloud.booksflow.form.mybatis.entity.FormTemplateFieldExample; +import com.pcloud.booksflow.form.mybatis.mapper.FormTemplateFieldMapperExt; +import com.pcloud.booksflow.form.utils.UserUtils; +import com.pcloud.universe.commons.utils.JsonUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * FormTemplateField Service 实现增删改查业务逻辑 + */ +@Service +@Slf4j +public class FormTemplateFieldService { + + @Autowired + private FormTemplateFieldMapperExt formTemplateFieldMapperExt; + + /** + * 创建新的表单模板字段 + * + * @param formTemplateField 表单模板字段对象 + * @return 创建后的表单模板字段对象 + */ + public FormTemplateField create(FormTemplateField formTemplateField) { + formTemplateFieldMapperExt.insertSelective(formTemplateField); + return formTemplateField; + } + + /** + * 保存模板字段配置,newFields 按照 templateId分组 转成DTO + * + * @param dtos 表单模板字段DTO + * @param templateId 模板ID + */ + @Transactional + public void saveTemplateFields(List dtos, Long templateId) { + // 添加新的字段配置 + List fields = new ArrayList<>(); + Date date = new Date(); + Long userId = UserUtils.getUserId(); + for (FormTemplateDTO.FieldDTO item : dtos) { + if (isGroup(item.getType())) { + FormTemplateField fieldGroup = dto2Entity(templateId, item, userId, date); + //保存分组 + formTemplateFieldMapperExt.insert(fieldGroup); + if (CollUtil.isNotEmpty(item.getChildren())) { + List _fields = item.getChildren().stream() + .map(item1 -> { + FormTemplateField entity = dto2Entity(templateId, item1, userId, date); + entity.setParentId(fieldGroup.getId()); + return entity; + }) + .collect(Collectors.toList()); + //保存分组下字段 + formTemplateFieldMapperExt.batchInsert(_fields); + } + } else { + fields.add(dto2Entity(templateId, item, userId, date)); + } + } + + if (!fields.isEmpty()) { + formTemplateFieldMapperExt.batchInsert(fields); + } + } + + public boolean isGroup(String str) { + return FormTemplateFieldType.group.equals(FormTemplateFieldType.getByName(str)) || FormTemplateFieldType.table.equals(FormTemplateFieldType.getByName(str)); + } + + private FormTemplateField dto2Entity(Long templateId, FormTemplateDTO.FieldDTO item, Long userId, Date date) { + FormTemplateField field = BeanUtil.copyProperties(item, FormTemplateField.class, "ext"); + field.setId(null); + field.setTemplateId(templateId); + String ext = JsonUtils.serialize(item.getExt()); + if (ext == null) { + field.setExt("{}"); + } else { + field.setExt(ext); + } + field.setCreatedBy(userId); + field.setCreateTime(date); + if (field.getSortOrder() == null) { + field.setSortOrder(999); + } + return field; + } + + /** + * 根据ID获取表单模板字段 + * + * @param id 表单模板字段ID + * @return 表单模板字段对象 + */ + public FormTemplateField getById(Long id) { + return formTemplateFieldMapperExt.selectByPrimaryKey(id); + } + + /** + * 根据模板ID获取表单模板字段列表 + * + * @param templateId 模板ID + * @param show show + * @return 表单模板字段列表 + */ + public List getByTemplateId(Long templateId, Boolean show) { + FormTemplateFieldExample example = new FormTemplateFieldExample(); + FormTemplateFieldExample.Criteria criteria = example.createCriteria().andTemplateIdEqualTo(templateId); + if (show != null) { + criteria.andShowEqualTo(show); + } + example.setOrderByClause("sort_order asc,id asc"); + return formTemplateFieldMapperExt.selectByExampleWithBLOBs(example); + } + + /** + * 更新表单模板字段信息 + * + * @param id 表单模板字段ID + * @param formTemplateField 更新的表单模板字段对象 + * @return 更新后的表单模板字段对象 + */ + public int update(Long id, FormTemplateField formTemplateField) { + formTemplateField.setId(id); + formTemplateField.setUpdatedBy(UserUtils.getUserId()); + formTemplateField.setCreateTime(new Date()); + return formTemplateFieldMapperExt.updateByPrimaryKeySelective(formTemplateField); + } + + /** + * 删除表单模板字段 + * + * @param id 表单模板字段ID + * @return 删除结果 + */ + public int delete(Long id) { + return formTemplateFieldMapperExt.deleteByPrimaryKey(id); + } + + + public List list() { + FormTemplateFieldExample example = new FormTemplateFieldExample(); + return formTemplateFieldMapperExt.selectByExampleWithBLOBs(example); + } + + @Transactional + public void saveTemplateFields(List newFields) { + Map> map = newFields.stream().collect(Collectors.groupingBy(FormTemplateField::getTemplateId)); + map.forEach((templateId, fields) -> { + log.info("初始化表单 {} 中", templateId); + saveTemplateFields(buildTree(fields), templateId); + log.info("初始化表单 {} 完成", templateId); + }); + } + + private FormTemplateDTO.FieldDTO entity2Dto(FormTemplateField item) { + FormTemplateDTO.FieldDTO dto = BeanUtil.copyProperties(item, FormTemplateDTO.FieldDTO.class, "ext"); + if (StrUtil.isNotBlank(item.getExt())) { + dto.setExt(JsonUtils.parse(item.getExt(), FormTemplateDTO.ExtDTO.class)); + } + // 初始化children列表以避免空指针异常 + dto.setChildren(new ArrayList<>()); + return dto; + } + + private List buildTree(List list) { + if (CollUtil.isEmpty(list)) { + return new ArrayList<>(); + } + // 将FormTemplateField转换为FormTemplateDTO.FieldDTO + Map dtoMap = list.stream() + .collect(Collectors.toMap( + FormTemplateField::getId, + this::entity2Dto, + (existing, replacement) -> existing)); + + // 构建树形结构 + List rootNodes = new ArrayList<>(); + + for (FormTemplateField field : list) { + FormTemplateDTO.FieldDTO dto = dtoMap.get(field.getId()); + Long parentId = field.getParentId(); + + if (parentId == null || parentId <= 0) { + // 如果没有父节点,则为根节点 + rootNodes.add(dto); + } else { + // 查找父节点并添加到其children中 + FormTemplateDTO.FieldDTO parentDto = dtoMap.get(parentId); + if (parentDto != null) { + if (parentDto.getChildren() == null) { + parentDto.setChildren(new ArrayList<>()); + } + parentDto.getChildren().add(dto); + } + } + } + return rootNodes; + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormTemplateService.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormTemplateService.java new file mode 100644 index 000000000..a06e71e83 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/FormTemplateService.java @@ -0,0 +1,436 @@ +package com.pcloud.booksflow.form.service; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.digest.DigestUtil; +import com.pcloud.aistudio.api.feign.DataPermissionFeignClient; +import com.pcloud.booksflow.form.api.constant.FormTemplateFieldType; +import com.pcloud.booksflow.form.api.dto.FormTemplateDTO; +import com.pcloud.booksflow.form.api.vo.FormTemplateVO; +import com.pcloud.booksflow.form.mybatis.entity.Form; +import com.pcloud.booksflow.form.mybatis.entity.FormTemplate; +import com.pcloud.booksflow.form.mybatis.entity.FormTemplateExample; +import com.pcloud.booksflow.form.mybatis.entity.FormTemplateField; +import com.pcloud.booksflow.form.mybatis.mapper.FormTemplateMapperExt; +import com.pcloud.booksflow.form.utils.UserUtils; +import com.pcloud.booksflow.workflow.api.domain.request.SyncFormFieldRequest; +import com.pcloud.booksflow.workflow.api.domain.request.SyncFormRequest; +import com.pcloud.booksflow.workflow.api.service.BooksFlowWorkflowService; +import com.pcloud.common.dto.ResponseDto; +import com.pcloud.common.exceptions.BizException; +import com.pcloud.universe.commons.utils.JsonUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * FormTemplate Service 实现增删改查业务逻辑 + */ +@Slf4j +@Service +public class FormTemplateService { + + @Autowired + private FormTemplateMapperExt formTemplateMapperExt; + @Autowired + private FormTemplateFieldService formTemplateFieldService; + @Autowired + private FormService formService; + @Autowired + private BooksFlowWorkflowService booksFlowWorkflowService; + @Autowired(required = false) + private DataPermissionFeignClient dataPermissionFeignClient; + + /** + * save表单模板信息 + * + * @return save后的表单模板对象 + */ + @Transactional + public FormTemplate saveUpVersion(Long formId, String md5) { + return create(formId, md5); + } + + /** + * save表单模板信息 + * + * @param template template + * @param tplFields tplFields + * @return save后的表单模板对象 + */ + @Transactional + public FormTemplate saveUpVersion(Long formId, FormTemplate template, List tplFields) { + FormTemplateDTO dto = entity2Dto(template, tplFields); + dto.setFormId(formId); + return saveUpVersion(dto); + } + + /** + * save表单模板信息 + * + * @param dto save的表单模板对象 + * @return save后的表单模板对象 + */ + @Transactional + public FormTemplate saveUpVersion(FormTemplateDTO dto) { + checkDTO(dto.getTemplateFields(), null); + buildDefValue(dto.getTemplateFields()); + FormTemplate maxVersionEntity = getMaxVersion(dto.getFormId()); + + //***** 检验内容是否和最新版一致 + String md5 = DigestUtil.md5Hex(JsonUtils.serialize(dto)); + if (StrUtil.isBlank(md5)) { + throw new BizException("md5生成错误!"); + } + if (checkContentEncoding(maxVersionEntity, md5)) { + log.info("表单和上次保存的一致,模板不用更新"); + return maxVersionEntity; + } + //***** end 检验内容是否和最新版一致 + + FormTemplate entity = create(dto.getFormId(), md5); + // 保存模板字段配置 + formTemplateFieldService.saveTemplateFields(dto.getTemplateFields(), entity.getId()); + + try { + feignWorkFlowSyncForm(dto, entity); + } catch (Exception e) { + log.error("feignWorkFlowSyncForm 同步用户表单信息失败:{}", e.getMessage(), e); + } + try { + feignUserSyncForm(dto.getFormId()); + } catch (Exception e) { + log.error("feignUserSyncForm 同步用户表单信息失败:{}", e.getMessage(), e); + } + return entity; + } + + /** + * 构建部分字段默认值 + * + * @param templateFields templateFields + */ + private void buildDefValue(List templateFields) { + if (templateFields == null) { + return; + } + templateFields.forEach(field -> { + if (field.getRequired() == null) { + field.setRequired(false); + } + if (field.getShow() == null) { + field.setShow(false); + } + if (field.getLine() == null) { + field.setLine(0); + } + if (field.getEdit() == null) { + field.setEdit(false); + } + // 禁用编辑 + if (field.getEditDisabled() != null && field.getEditDisabled()) { + field.setEdit(false); + } + buildDefValue(field.getChildren()); + }); + } + + /** + * 校验内容是否和最新版一致 + * + * @param maxVersionEntity maxVersionEntity + * @param md5 md5 + * @return boolean + */ + private boolean checkContentEncoding(FormTemplate maxVersionEntity, String md5) { + if (maxVersionEntity == null) { + return false; + } + return md5.equals(maxVersionEntity.getContentEncoding()); + } + + private FormTemplate create(Long formId, String md5) { + if (formId == null) { + throw new BizException("表单ID不能为空"); + } + FormTemplate entity = new FormTemplate(); + entity.setFormId(formId); + entity.setContentEncoding(md5); + FormTemplate maxVersionEntity = getMaxVersion(entity.getFormId()); + Integer maxVersion = maxVersionEntity == null ? null : maxVersionEntity.getVersion(); + if (maxVersion == null) { + entity.setVersion(1); + } else { + entity.setVersion(maxVersion + 1); + } + entity.setCreatedBy(UserUtils.getUserId()); + entity.setId(null); + // 保存 + formTemplateMapperExt.insertSelective(entity); + return entity; + } + + + /** + * 根据ID获取表单模板 + * + * @param id 表单模板ID + * @return 表单模板对象 + */ + public FormTemplateVO getVOById(Long id, Boolean show, Boolean tree) { + FormTemplate template = formTemplateMapperExt.selectByPrimaryKey(id); + return entity2VO(template, show, tree); + } + + /** + * 查询相同formId下的最新的form模板 + * + * @return 表单模板列表 + */ + public FormTemplateVO getVOMaxVersion(Long formId, Boolean show, Boolean tree) { + return getVOMaxVersion(formService.getById(formId), show, tree); + } + + /** + * 查询相同formId下的最新的form模板 + * + * @return 表单模板列表 + */ + public FormTemplateVO getVOMaxVersion(String formCode, Boolean show, Boolean tree) { + return getVOMaxVersion(formService.getByCode(formCode), show, tree); + } + + public FormTemplate getMaxVersion(Long formId) { + FormTemplateExample example = new FormTemplateExample(); + example.createCriteria().andFormIdEqualTo(formId); + example.setOrderByClause("version DESC"); + + // 只查询第一条记录(最大版本号) + List templates = formTemplateMapperExt.selectByExampleWithPaging(example, 0, 1); + if (templates.isEmpty()) { + return null; + } else { + return templates.get(0); + } + } + + /** + * 查询最小版本号表单 + * + * @param formId formId + * @return 表单 + */ + public FormTemplate getMinVersion(Long formId) { + FormTemplateExample example = new FormTemplateExample(); + example.createCriteria().andFormIdEqualTo(formId); + example.setOrderByClause("version asc"); + + List templates = formTemplateMapperExt.selectByExampleWithPaging(example, 0, 1); + if (templates.isEmpty()) { + return null; + } else { + return templates.get(0); + } + } + + private FormTemplateDTO entity2Dto(FormTemplate template, List fields) { + FormTemplateDTO dto = BeanUtil.copyProperties(template, FormTemplateDTO.class); + List fieldDTOS = fields.stream().map(field -> { + FormTemplateDTO.FieldDTO fieldDTO = new FormTemplateDTO.FieldDTO(); + BeanUtil.copyProperties(field, fieldDTO, "ext"); + if (field.getExt() != null && !"{}".equals(field.getExt())) { + fieldDTO.setExt(BeanUtil.copyProperties(field.getExt(), FormTemplateDTO.ExtDTO.class)); + } + return fieldDTO; + }).collect(Collectors.toList()); + dto.setTemplateFields(fieldDTOS); + return dto; + } + + private FormTemplateVO entity2VO(FormTemplate template, Boolean show, Boolean tree) { + if (template == null) { + return null; + } + Form form = formService.getById(template.getFormId()); + List fields = formTemplateFieldService.getByTemplateId(template.getId(), show); + if (CollUtil.isEmpty(fields)) { + return null; + } + List templateFields = fields.stream().map(field -> { + FormTemplateVO.FieldVO fvo = new FormTemplateVO.FieldVO(); + BeanUtil.copyProperties(field, fvo, "ext"); + fvo.setExt(JsonUtils.parse(field.getExt(), FormTemplateVO.ExtVO.class)); + return fvo; + }).collect(Collectors.toList()); + + FormTemplateVO vo = new FormTemplateVO(); + vo.setId(template.getId()); + vo.setFormId(form.getId()); + vo.setFormName(form.getName()); + vo.setVersion(template.getVersion()); + if (tree != null && tree) { + vo.setTemplateFields(buildTree(templateFields)); + } else { + vo.setTemplateFields(templateFields); + } + return vo; + } + + public List list() { + FormTemplateExample example = new FormTemplateExample(); + return formTemplateMapperExt.selectByExample(example); + } + + private List buildTree(List list) { + if (CollUtil.isEmpty(list)) { + return new ArrayList<>(); + } + Map map = list.stream() + .collect(Collectors.toMap(FormTemplateVO.FieldVO::getId, v -> v)); + + List tree = new ArrayList<>(); + for (FormTemplateVO.FieldVO node : list) { + if (node.getParentId() == null) { + tree.add(node); + } else { + FormTemplateVO.FieldVO parent = map.get(node.getParentId()); + if (parent != null) { + if (parent.getChildren() == null) { + parent.setChildren(new ArrayList<>()); + } + parent.getChildren().add(node); + } + } + } + return tree; + } + + /** + * 同一表单中不能有重复的字段 + * + * @param templateFields templateFields + */ + private void checkDTO(List templateFields, Set fieldCodes) { + if (templateFields == null) { + return; + } + if (fieldCodes == null) { + fieldCodes = new HashSet<>(); + } + for (FormTemplateDTO.FieldDTO field : templateFields) { + if (!fieldCodes.add(field.getCode())) { + throw new BizException("字段编码不能重复: " + field.getCode()); + } + if (CollUtil.isNotEmpty(field.getChildren())) { + if (!formTemplateFieldService.isGroup(field.getType())) { + throw new BizException("字段类型不支持children有值,字段类型错误:" + field.getType()); + } + checkDTO(field.getChildren(), fieldCodes); + } + } + } + + private FormTemplateVO getVOMaxVersion(Form form, Boolean show, Boolean tree) { + if (form == null) { + return null; + } + FormTemplate maxVEntity = getMaxVersion(form.getId()); + if (maxVEntity == null) { + FormTemplateVO vo = new FormTemplateVO(); + vo.setFormId(form.getId()); + vo.setFormName(form.getName()); + return vo; + } + return entity2VO(maxVEntity, show, tree); + } + + /** + * 同步表单信息 + * + * @param dto dto + * @param entity entity + */ + private void feignWorkFlowSyncForm(FormTemplateDTO dto, FormTemplate entity) { + log.info("feignWorkFlowSyncForm 开始同步表单信息:{}", dto.getFormId()); + Long tenantId = UserUtils.getTenantId(); + Form form = formService.getById(dto.getFormId()); + // 转换表单字段、并过滤隐藏字段 + List list = convertToSyncFormFieldRequests(dto.getTemplateFields()); + + SyncFormRequest data = SyncFormRequest.builder() + .formCode(form.getCode()) + .formName(form.getName()) + .formTemplateId(entity.getId()) + .formVersion(entity.getVersion()) + .agentId(tenantId) + .fields(list) + .build(); + log.info("feignWorkFlowSyncForm 请求参数:{}", JsonUtils.serialize(data)); + ResponseDto responseDto = booksFlowWorkflowService.syncFormFields(data); + log.info("feignWorkFlowSyncForm 结束同步表单信息:{},{}", form.getCode(), responseDto); + } + + /** + * 递归转换表单字段为同步请求对象,支持多层级结构 + * 滤隐藏字段 + * + * @param fields 表单字段列表 + * @return 同步请求对象列表 + */ + private List convertToSyncFormFieldRequests(List fields) { + if (fields == null || fields.isEmpty()) { + return new ArrayList<>(); + } + + return fields.stream() + .map(this::convertToSyncFormFieldRequest) + .filter(Objects::nonNull) + .collect(Collectors.toList()); + } + + /** + * 递归转换单个表单字段为同步请求对象,支持多层级结构 + * + * @param field 表单字段 + * @return 同步请求对象 + */ + private SyncFormFieldRequest convertToSyncFormFieldRequest(FormTemplateDTO.FieldDTO field) { + if (field == null) { + return null; + } + // 过滤隐藏字段 + if (field.getShow() != null && !field.getShow()) { + return null; + } + return SyncFormFieldRequest.builder() + .show(field.getShow()) + .edit(field.getEdit()) + .fieldCode(field.getCode()) + .fieldName(field.getShowTitle()) + .sortOrder(field.getSortOrder()) + .children(convertToSyncFormFieldRequests(field.getChildren())) + .build(); + } + + private void feignUserSyncForm(Long formId) { + if (formId == null) { + return; + } + if(dataPermissionFeignClient == null){ + log.error("permissionFeignClient is null"); + return; + } + log.info("feignUserSyncForm 开始同步表单信息:{}", formId); + Long tenantId = UserUtils.getTenantId(); + Form form = formService.getById(formId); + Boolean b = dataPermissionFeignClient.syncUserDataPermissions(form.getCode(), "booksflow", tenantId); + log.info("feignUserSyncForm 结束同步表单信息:{},{}", form.getCode(), b); + } + + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/ModifyLogRecordService.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/ModifyLogRecordService.java new file mode 100644 index 000000000..1f4f75ecf --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/ModifyLogRecordService.java @@ -0,0 +1,86 @@ +package com.pcloud.booksflow.form.service; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import com.pcloud.booksflow.form.api.dto.ModifyLogRecordDTO; +import com.pcloud.booksflow.form.mybatis.entity.ModifyLogRecord; +import com.pcloud.booksflow.form.mybatis.entity.ModifyLogRecordExample; +import com.pcloud.booksflow.form.mybatis.mapper.ModifyLogRecordMapperExt; +import com.pcloud.common.exceptions.BizException; +import com.pcloud.common.page.PageBeanNew; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +/** + * ModifyLogRecord Service 实现增删改查业务逻辑 + */ +@Service +public class ModifyLogRecordService { + + @Autowired + private ModifyLogRecordMapperExt modifyLogRecordMapperExt; + + /** + * 批量创建修改日志记录 + * + * @param dtos 修改日志记录DTO对象列表 + * @return 创建条数 + */ + public int batchCreate(List dtos) { + if (CollUtil.isEmpty(dtos)) { + return 0; + } + // 限制一次最多1000条记录 + if (dtos.size() > 1000) { + throw new BizException("批量保存记录数不能超过1000条"); + } + + Date date = new Date(); + List modifyLogRecords = dtos.stream() + .map(dto -> { + if (StrUtil.isBlank(dto.getEntityId())) { + throw new BizException("实体ID不能为空"); + } + ModifyLogRecord record = new ModifyLogRecord(); + BeanUtils.copyProperties(dto, record); + //默认是 project 表中的数据 + if (StrUtil.isBlank(record.getEntityType())) { + record.setEntityType("project"); + } + record.setCreateTime(date); + record.setDeleted(0); + return record; + }) + .collect(Collectors.toList()); + + return modifyLogRecordMapperExt.batchInsert(modifyLogRecords); + } + + /** + * 获取修改日志记录列表 + * + * @param entityType 实体类型 + * @param formCode formCode + * @return 修改日志记录列表 + */ + public PageBeanNew listByEntityType(String entityType, String entityId, String formCode, Integer currentPage, Integer numPerPage) { + ModifyLogRecordExample example = new ModifyLogRecordExample(); + ModifyLogRecordExample.Criteria criteria = example.createCriteria() + .andEntityTypeEqualTo(entityType) + .andEntityIdEqualTo(entityId) + .andDeletedEqualTo(0); + if (StrUtil.isNotBlank(formCode)) { + criteria.andFormCodeEqualTo(formCode); + } + example.setOrderByClause("id desc"); + int count = (int) modifyLogRecordMapperExt.countByExample(example); + List records = modifyLogRecordMapperExt.selectByExampleWithPaging(example, currentPage * numPerPage, numPerPage); + return new PageBeanNew<>(currentPage, numPerPage, count, records); + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/TenantInitStatusService.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/TenantInitStatusService.java new file mode 100644 index 000000000..975c5dfc8 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/TenantInitStatusService.java @@ -0,0 +1,72 @@ +package com.pcloud.booksflow.form.service; + +import com.pcloud.booksflow.form.mybatis.entity.TenantInitStatus; +import com.pcloud.booksflow.form.mybatis.entity.TenantInitStatusExample; +import com.pcloud.booksflow.form.mybatis.mapper.TenantInitStatusMapperExt; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * 租户初始化状态服务类 + * 管理租户初始化状态的增删改查操作 + */ +@Service +public class TenantInitStatusService { + + @Autowired + private TenantInitStatusMapperExt tenantInitStatusMapperExt; + + /** + * 根据租户ID获取初始化状态 + * + * @param tenantId 租户ID + * @return 租户初始化状态,如果不存在则返回null + */ + public TenantInitStatus getByTenantId(Long tenantId) { + TenantInitStatusExample example = new TenantInitStatusExample(); + example.createCriteria().andAgentIdEqualTo(tenantId); + List list = tenantInitStatusMapperExt.selectByExample(example); + return list.isEmpty() ? null : list.get(0); + } + + /** + * 检查租户是否已初始化 + * + * @param tenantId 租户ID + * @return true:已初始化,false:未初始化 + */ + public boolean isTenantInitialized(Long tenantId) { + TenantInitStatus status = getByTenantId(tenantId); + return status != null && status.getInitialized() == 1; + } + + /** + * 创建租户初始化状态记录 + * + * @param tenantId 租户ID + * @param initialized 初始化状态(0:未初始化,1:已初始化) + * @return 创建的租户初始化状态对象 + */ + public TenantInitStatus create(Long tenantId, Integer initialized) { + TenantInitStatus status = new TenantInitStatus(); + status.setAgentId(tenantId); + status.setInitialized(initialized); + status.setCreateTime(new Date()); + status.setUpdateTime(new Date()); + tenantInitStatusMapperExt.insertSelective(status); + return status; + } + + /** + * 标记租户为已初始化状态 + * + * @param tenantId 租户ID + * @return 更新的记录数 + */ + public void markAsInitialized(Long tenantId) { + create(tenantId, 1); + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/TenantInitializationService.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/TenantInitializationService.java new file mode 100644 index 000000000..ab134c100 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/service/TenantInitializationService.java @@ -0,0 +1,195 @@ +package com.pcloud.booksflow.form.service; + +import cn.hutool.core.bean.BeanUtil; +import com.pcloud.booksflow.form.api.constant.BaseConstant; +import com.pcloud.booksflow.form.mybatis.entity.Form; +import com.pcloud.booksflow.form.mybatis.entity.FormDict; +import com.pcloud.booksflow.form.mybatis.entity.FormTemplate; +import com.pcloud.booksflow.form.mybatis.entity.FormTemplateField; +import com.pcloud.booksflow.form.utils.TenantHelper; +import com.pcloud.common.utils.cache.redis.JedisClusterUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.Assert; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * 租户初始化服务类 + * 处理租户首次进入系统时的初始化操作 + */ +@Service +@Slf4j +public class TenantInitializationService { + + @Autowired + private FormDictService formDictService; + + @Autowired + private FormService formService; + + @Autowired + private FormTemplateService formTemplateService; + + @Autowired + private FormTemplateFieldService formTemplateFieldService; + + @Autowired + private TenantInitStatusService tenantInitStatusService; + + @Autowired + @Lazy + private TenantInitializationService tenantInitializationService; + + private final static String TenantInitializationKey = "init_tenant_uuid:%s"; + + //TODO 后续改到动态配置那里 + public final static List TplConfigTypes = new ArrayList<>(Arrays.asList("expenseSubject", "contactUnit", "writingType","warehouse")); + + /** + * 检查并初始化租户数据 + * 如果租户还没有任何表单数据,则进行初始化 + * + * @return 是否执行了初始化操作 + */ + public boolean initializeTenant(Long tenantId) { + //****** 校验 ***** + Assert.notNull(tenantId, "租户ID不能为空"); + // 检查租户是否已初始化 + if (tenantInitStatusService.isTenantInitialized(tenantId)) { + log.info("租户 {} 已初始化,无需重复初始化", tenantId); + return false; + } + //dynamic + List checkDb = TenantHelper.dynamic(tenantId + "", () -> formService.list()); + if (!checkDb.isEmpty()) { + log.info("租户 {} db中已初始化,无需重复初始化", tenantId); + return false; + } + boolean set = JedisClusterUtils.set(String.format(TenantInitializationKey, tenantId), "1", 60 * 10); + if (!set) { + log.warn("租户 {} 初始化中,redis有key,无需重复初始化", tenantId); + return false; + } + + //****** 查询模板数据 ***** + List dicts = TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formDictService.list(TplConfigTypes)); + List forms = TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formService.list()); + List formTemplates = TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formTemplateService.list()); + List formTemplateFields = TenantHelper.dynamic(BaseConstant.TplTenantId, () -> formTemplateFieldService.list()); + //****** 保存 ***** + try { + TenantHelper.dynamic(tenantId + "", () -> tenantInitializationService.dbInitForm(tenantId, forms, formTemplates, formTemplateFields, dicts)); + } finally { + //TODO 删除时候判断是不是同uuid的 key + JedisClusterUtils.del(String.format(TenantInitializationKey, tenantId)); + } + return true; + } + + /** + * 为租户 初始化表单、字典数据 + */ + @Transactional + public void dbInitForm(Long tenantId, List forms, List formTemplates, List formTemplateFields, List dicts) { + log.info("开始为租户 {} 初始化表单、字典数据", tenantId); + dbInitForm(forms, formTemplates, formTemplateFields); + dbInitDict(dicts); + //标记为已初始化 + tenantInitStatusService.markAsInitialized(tenantId); + log.info("租户 {} 表单、字典数据初始化完成", tenantId); + } + + @Transactional + public void dbInitDict(List dicts) { + int i = formDictService.create(dicts); + log.info("创建完成 {} 个字典数据", i); + } + + @Transactional + public void dbInitForm(List forms, List formTemplates, List formTemplateFields) { + Map formIdMapping = new HashMap<>(); + List newForms = forms.stream().map(form -> { + Form newForm = new Form(); + BeanUtil.copyProperties(form, newForm); + newForm.setId(null); + return formService.create(newForm); + }).collect(Collectors.toList()); + + // 建立原ID与新ID的映射关系 + for (int i = 0; i < forms.size(); i++) { + formIdMapping.put(forms.get(i).getId(), newForms.get(i).getId()); + } + + // 保存表单模板数据 + Map templateIdMapping = new HashMap<>(); + // 按formId分组,获取每个formId下版本最大的模板 + Map> formTemplatesGroupedByFormId = formTemplates.stream() + .collect(Collectors.groupingBy(FormTemplate::getFormId)); + + for (Map.Entry> entry : formTemplatesGroupedByFormId.entrySet()) { + // 获取当前formId下版本最大的模板 + FormTemplate maxVersionTemplate = entry.getValue().stream() + .max(Comparator.comparingInt(FormTemplate::getVersion)) + .orElse(null); + + if (maxVersionTemplate != null) { + Long newFormId = formIdMapping.get(maxVersionTemplate.getFormId()); + if (newFormId != null) { + FormTemplate createdTemplate = formTemplateService.saveUpVersion(newFormId, null); + templateIdMapping.put(maxVersionTemplate.getId(), createdTemplate.getId()); + } + } + } + + List newFields = new ArrayList<>(); + //保存表单模板字段数据 + for (FormTemplateField field : formTemplateFields) { + // 替换templateId为新创建的templateId + Long newTemplateId = templateIdMapping.get(field.getTemplateId()); + if (newTemplateId != null) { + FormTemplateField newField = new FormTemplateField(); + BeanUtil.copyProperties(field, newField); + newField.setTemplateId(newTemplateId); +// newField.setId(null); + newFields.add(newField); + } + } + if (!newFields.isEmpty()) { + formTemplateFieldService.saveTemplateFields(newFields); + } + } + + + /** + * 复制模板到指定出版社 + * + * @param sourceTenantId sourceTenantId + * @param targetTenantId targetTenantId + * @return b + */ + public Boolean copyForm(Long sourceTenantId, Long targetTenantId) { + //****** 查询模板数据 ***** + List forms = TenantHelper.dynamic(sourceTenantId + "", () -> formService.list()); + List formTemplates = TenantHelper.dynamic(sourceTenantId + "", () -> formTemplateService.list()); + List formTemplateFields = TenantHelper.dynamic(sourceTenantId + "", () -> formTemplateFieldService.list()); + //****** 保存 ***** + TenantHelper.dynamic(targetTenantId + "", () -> tenantInitializationService.dbInitForm(forms, formTemplates, formTemplateFields)); + return true; + } + + public Boolean copyDict(Long sourceTenantId, Long targetTenantId, List configTypes) { + if (configTypes == null || configTypes.isEmpty()) { + return true; + } + List dicts = TenantHelper.dynamic(sourceTenantId + "", () -> formDictService.list(configTypes)); + //****** 保存 ***** + TenantHelper.dynamic(targetTenantId + "", () -> tenantInitializationService.dbInitDict(dicts)); + return true; + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/TenantHelper.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/TenantHelper.java new file mode 100644 index 000000000..21165f9ee --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/TenantHelper.java @@ -0,0 +1,164 @@ +package com.pcloud.booksflow.form.utils; + +import cn.hutool.core.util.StrUtil; +import com.pcloud.mybatis.Interceptor.tenant.plugins.IgnoreStrategy; +import com.pcloud.mybatis.Interceptor.tenant.plugins.InterceptorIgnoreHelper; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +import java.util.Stack; +import java.util.function.Supplier; + +/** + * 租户助手 + * + */ +@Slf4j +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public class TenantHelper { + private static final ThreadLocal TEMP_DYNAMIC_TENANT = new ThreadLocal<>(); + private static final ThreadLocal> REENTRANT_IGNORE = ThreadLocal.withInitial(Stack::new); + + + /** + * 开启忽略租户(开启后需手动调用 {@link #disableIgnore()} 关闭) + */ + private static void enableIgnore() { + Stack reentrantStack = REENTRANT_IGNORE.get(); + if (reentrantStack.isEmpty()) { + // 只有当栈为空时才真正开启忽略 + InterceptorIgnoreHelper.handle(IgnoreStrategy.builder().tenantLine(true).build()); + } + reentrantStack.push(reentrantStack.size() + 1); + } + + /** + * 关闭忽略租户 + */ + private static void disableIgnore() { + Stack reentrantStack = REENTRANT_IGNORE.get(); + if (!reentrantStack.isEmpty()) { + reentrantStack.pop(); // 出栈操作 + if (reentrantStack.isEmpty()) { + // 当栈为空时才真正关闭忽略 + InterceptorIgnoreHelper.clearIgnoreStrategy(); + } else { + log.info("重入忽略租户"); + } + } else { + log.error("关闭忽略租户失败,当前方法栈: {}", Thread.getAllStackTraces()); + } + } + + /** + * 在忽略租户中执行,可重入 + * + * @param handle 处理执行方法 + */ + public static void ignore(Runnable handle) { + enableIgnore(); + try { + handle.run(); + } finally { + disableIgnore(); + } + } + + /** + * 在忽略租户中执行,可重入 + * + * @param handle 处理执行方法 + */ + public static T ignore(Supplier handle) { + enableIgnore(); + try { + return handle.get(); + } finally { + disableIgnore(); + } + } + + public static boolean isEnable() { + //TODO 是否开启未开发 + return true; + } + + /** + * 设置动态租户(一直有效 需要手动清理) + *

+ * 如果为未登录状态下 那么只在当前线程内生效 + * + * @param tenantId 租户id + */ + private static void setDynamic(String tenantId) { + if (!isEnable()) { + return; + } + TEMP_DYNAMIC_TENANT.set(tenantId); + } + + /** + * 获取动态租户(一直有效 需要手动清理) + *

+ * 如果为未登录状态下 那么只在当前线程内生效 + */ + private static String getDynamic() { + if (!isEnable()) { + return null; + } + return TEMP_DYNAMIC_TENANT.get(); + } + + /** + * 清除动态租户 + */ + private static void clearDynamic() { + if (!isEnable()) { + return; + } + TEMP_DYNAMIC_TENANT.remove(); + } + + /** + * 在动态租户中执行,不支持嵌套使用 + * + * @param handle 处理执行方法 + */ + public static void dynamic(String tenantId, Runnable handle) { + setDynamic(tenantId); + try { + handle.run(); + } finally { + clearDynamic(); + } + } + + /** + * 在动态租户中执行,不支持嵌套使用,推荐在controller中使用 + * + * @param handle 处理执行方法 + */ + public static T dynamic(String tenantId, Supplier handle) { + setDynamic(tenantId); + try { + return handle.get(); + } finally { + clearDynamic(); + } + } + + + public static Long getTenantId() { + String dynamic = getDynamic(); + if (StrUtil.isBlank(dynamic)) { + Long tenantId = UserUtils.getTenantId(); + log.info("获取 token 租户id: {}", tenantId); + return tenantId; + } else { + log.info("获取 dynamic 租户id: {}", dynamic); + return Long.parseLong(dynamic); + } + } + +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/UserUtils.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/UserUtils.java new file mode 100644 index 000000000..4797b79c8 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/UserUtils.java @@ -0,0 +1,16 @@ +package com.pcloud.booksflow.form.utils; + +import com.pcloud.common.utils.RequestContextHolderUtil; +import com.pcloud.common.utils.SessionUtil; + +public class UserUtils { + public static Long getUserId() { + String token = RequestContextHolderUtil.getRequest().getHeader("token"); + return (Long) SessionUtil.getVlaue(token, SessionUtil.PARTY_ID); + } + + public static Long getTenantId() { + String token = RequestContextHolderUtil.getRequest().getHeader("token"); + return (Long) SessionUtil.getVlaue(token, SessionUtil.TENANT_ID); + } +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/poi/ExcelTemplateProcessor.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/poi/ExcelTemplateProcessor.java new file mode 100644 index 000000000..9a5de28fa --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/poi/ExcelTemplateProcessor.java @@ -0,0 +1,310 @@ +package com.pcloud.booksflow.form.utils.poi; + +import org.apache.poi.poifs.crypt.HashAlgorithm; +import org.apache.poi.xssf.usermodel.XSSFCell; +import org.apache.poi.xssf.usermodel.XSSFRow; +import org.apache.poi.xssf.usermodel.XSSFSheet; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; + +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.text.SimpleDateFormat; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; + +/** + * 基于模板快速生成word文档 + * 目前只支持xlsx文件 + */ + +public class ExcelTemplateProcessor { + private XSSFWorkbook xlsx; + + /** + * 根据路径初始化word模板 + * + * @param path + */ + public ExcelTemplateProcessor(String path) { + if (!path.endsWith(".xlsx")) System.out.println("无效文档后缀,当前只支持xlsx格式Excel文档模板。"); + + FileInputStream in; + try { + in = new FileInputStream(path); + xlsx = new XSSFWorkbook(in); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (xlsx == null) xlsx = new XSSFWorkbook(); + } + } + + /** + * 往模板填充标签值 + * {{labelName}} + * + * @param labels 标签值 + */ + public void pushLabels(Map labels) { + //遍历excel所有sheet + for (int i = 0; i < xlsx.getNumberOfSheets(); i++) { + XSSFSheet sheet = xlsx.getSheetAt(i); + //表格遍历行 + for (int rowNum = 0; rowNum <= sheet.getLastRowNum(); rowNum++) { + XSSFRow row = sheet.getRow(rowNum); + if (row == null) { + continue; + } + for (int cellNum = 0; cellNum <= row.getLastCellNum(); cellNum++) { + XSSFCell cell = row.getCell(cellNum); + if (cell == null) { + continue; + } + replaceLabelsInCell(cell, labels); + } + } + } + } + + /** + * 段落填充标签 + * + * @param cell + * @param params + */ + private void replaceLabelsInCell(XSSFCell cell, Map params) { + String cellValue = cell.toString(); + if (cellValue.isEmpty() || cellValue.contains("col#")) + return; + + Matcher labels = ProcessorUtils.getMatchingLabels(cellValue); + while (labels.find()) { + String label = labels.group(); + + String[] key = label.split("#"); + Integer indexName = key[0].indexOf("=") + 1 + key[0].indexOf("&") + 1; + String keyName = indexName > 0 ? key[0].substring(0, indexName - 1) : key[0]; + //标签书签 + if (params.containsKey(keyName)) { + //普通文本标签 + Object val = params.get(keyName) == null ? "" : params.get(keyName); + if (key.length == 1) { + cellValue = cellValue.replace(ProcessorUtils.labelFormat(label), val.toString()); + cell.setCellValue(cellValue); + continue; + } + + if (key.length == 2) { + //日期类型填充 + if (key[1].startsWith("Date:")) { + String textVal = val.equals("") ? val.toString() : new SimpleDateFormat(key[1].replace("Date:", "")).format(val); + cellValue = cellValue.replace(ProcessorUtils.labelFormat(label), textVal); + cell.setCellValue(cellValue); + continue; + } + + //枚举数组标签 + if (key[1].startsWith("[") && key[1].endsWith("]")) { + String group = key[1].substring(1, key[1].length() - 1); + for (String keyVal : group.split(",")) { + if (keyVal.indexOf(val + ":") == 0) { + cellValue = cellValue.replace(ProcessorUtils.labelFormat(label), keyVal.replace(val + ":", "")); + cell.setCellValue(cellValue); + } + } + continue; + } + + //值判定类型标签 + String[] bool = key[1].split(":"); + String trueVal = bool[0]; + String falseVal = bool.length == 1 ? "" : bool[1]; + if (bool.length >= 1) { + String textVal = ""; + if (key[0].contains("=")) { + textVal = val.toString().equals(key[0].substring(indexName)) ? trueVal : falseVal; + } else if (key[0].contains("&")) { + Integer curVal = Integer.valueOf(key[0].substring(indexName)); + textVal = (Integer.valueOf(val.toString()) & curVal) == curVal ? trueVal : falseVal; + } else { + textVal = val.toString().equals("true") ? trueVal : falseVal; + } + cellValue = cellValue.replace(ProcessorUtils.labelFormat(label), textVal); + cell.setCellValue(cellValue); + } + + } + } else if (keyName.equals("v-if")) { + logicLabelsInParagraph(cell, params); + } + } + + } + + + /** + * 逻辑语句处理,同一cell内有效 + */ + private void logicLabelsInParagraph(XSSFCell cell, Map params) { + String cellValue = cell.toString(); + + Boolean isShow = true; + Matcher labels = ProcessorUtils.getMatchingLabels(cellValue); + while (labels.find()) { + String label = labels.group(); + String[] key = label.split("#"); + + if (key.length == 2) { + Integer indexName = key[1].indexOf("=") + 1 + key[1].indexOf("&") + 1; + String keyName = indexName > 0 ? key[1].substring(0, indexName - 1) : key[1]; + if (params.containsKey(keyName)) { + String val = params.get(keyName) == null ? "" : params.get(keyName).toString(); + //条件判断语句 + if (key[0].equals("v-if")) { + if (key[1].contains("=")) { + isShow = val.equals(key[1].substring(indexName)); + } else if (key[1].contains("&")) { + Integer curVal = Integer.valueOf(key[1].substring(indexName)); + isShow = (Integer.valueOf(val) & curVal) == curVal; + } else { + isShow = val.equals("true"); + } + + if (isShow == false) { + if (cellValue.indexOf("{{end-if}}") > cellValue.indexOf(ProcessorUtils.labelFormat(label))) + cellValue = cellValue.replace(cellValue.substring(cellValue.indexOf(ProcessorUtils.labelFormat(label)), cellValue.indexOf("{{end-if}}")), ""); + else + cellValue = cellValue.replace(cellValue.substring(cellValue.indexOf(ProcessorUtils.labelFormat(label))), ""); + } else cellValue = cellValue.replace(ProcessorUtils.labelFormat(label), ""); + + cell.setCellValue(cellValue); + } + } + } else if (label.equals("end-if")) { + cell.setCellValue(cellValue.replace(ProcessorUtils.labelFormat(label), "")); + } + } + } + + /** + * 填充表格内容到excel + * {{tableName:colName}} + * + * @param tableName + * @param list + */ + public void pushTable(String tableName, List> list) { + //遍历excel所有sheet + for (int i = 0; i < xlsx.getNumberOfSheets(); i++) { + XSSFSheet sheet = xlsx.getSheetAt(i); + //表格遍历行 + for (int rowNum = 0; rowNum <= sheet.getLastRowNum(); rowNum++) { + XSSFRow row = sheet.getRow(rowNum); + if (row == null) { + continue; + } + for (int cellNum = 0; cellNum <= row.getLastCellNum(); cellNum++) { + XSSFCell cell = row.getCell(cellNum); + if (cell != null && cell.toString().contains(tableName + "/col#")) { + //System.out.println("find the table by name :" + tableName); + + // 插入数据空白行,数据往后移 + sheet.shiftRows(rowNum + 1, sheet.getLastRowNum(), list.size() - 1); + + //插入表格数据 + int addNum = 0; + for (Map rowData : list) { + //拷贝当前行 + XSSFRow setRow = sheet.getRow(rowNum + addNum); + if (list.size() > addNum + 1) { + XSSFRow newRow = sheet.createRow(rowNum + addNum + 1); + copyRow(setRow, newRow); + } + + //填充当前行内容数据 + for (int setCellNum = 0; setCellNum <= row.getLastCellNum(); setCellNum++) { + XSSFCell setCell = setRow.getCell(setCellNum); + if (setCell != null) { + String text = setCell.toString(); + Matcher labels = ProcessorUtils.getMatchingLabels(text); + while (labels.find()) { + String label = labels.group(); + String[] key = label.split("#"); + if (rowData.containsKey(key[key.length - 1])) { + String val = text.replace(ProcessorUtils.labelFormat(label), rowData.get(key[key.length - 1]).toString()); + if (ProcessorUtils.isNumber(rowData.get(key[key.length - 1]))) + setCell.setCellValue(Double.parseDouble(val)); + else + setCell.setCellValue(val); + } + } + } + } + addNum++; + } + return; + } + } + } + } + } + + /** + * 拷贝行数据 + * + * @param currentRow + * @param newRow + */ + private static void copyRow(XSSFRow currentRow, XSSFRow newRow) { + newRow.setHeight(currentRow.getHeight()); + for (int i = 0; i < currentRow.getLastCellNum(); i++) { + XSSFCell oldCell = currentRow.getCell(i); + XSSFCell newCell = newRow.createCell(i); + if (oldCell != null) { + // 复制样式和值 + newCell.setCellStyle(oldCell.getCellStyle()); + switch (oldCell.getCellTypeEnum()) { + case STRING: + newCell.setCellValue(oldCell.getStringCellValue()); + break; + case NUMERIC: + newCell.setCellValue(oldCell.getNumericCellValue()); + break; + case BOOLEAN: + newCell.setCellValue(oldCell.getBooleanCellValue()); + break; + // ...其他类型 + default: + newCell.setCellType(oldCell.getCellTypeEnum()); + } + } + } + } + + /** + * 保存excel文件到目录下 + * + * @param path + * @param name + */ + public void save(String path, String name) { + try { + FileOutputStream outStream = new FileOutputStream(path + name); + xlsx.write(outStream); + outStream.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * 设置excel只读 + * + * @param pass + */ + public void setReadOnly(String pass) { + xlsx.setWorkbookPassword(pass, HashAlgorithm.sha512); + } + +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/poi/ProcessorUtils.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/poi/ProcessorUtils.java new file mode 100644 index 000000000..85b4c3063 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/poi/ProcessorUtils.java @@ -0,0 +1,177 @@ +package com.pcloud.booksflow.form.utils.poi; + +import java.lang.reflect.Field; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * 通用方法 + *

+ * by miracleren@gmail.com + */ +public class ProcessorUtils { + + + /** + * {{par}} 参数查找正则 + * + * @param str 查找串 + * @return 返结果 + */ + public static Matcher getMatchingLabels(String str) { + Pattern pattern = Pattern.compile("(?<=\\{\\{)(.+?)(?=\\}\\})", Pattern.CASE_INSENSITIVE); + return pattern.matcher(str); + } + + /** + * 补全label格式 + * + * @param label + * @return + */ + public static String labelFormat(String label) { + return "{{" + label + "}}"; + } + + /** + * 实体类转map + * + * @param entity + * @return + */ + public static Map entityToMap(Object entity) throws IllegalAccessException { + Map map = new HashMap<>(); + for (Field field : entity.getClass().getDeclaredFields()) { + boolean flag = field.isAccessible(); + field.setAccessible(true); + Object o = field.get(entity); + map.put(field.getName(), o); + field.setAccessible(flag); + } + return map; + } + + /** + * 实体类列表转map列表 + * + * @param entityList + * @return + */ + public static List> listEntityToMap(List entityList) throws IllegalAccessException { + List> list = new ArrayList<>(); + for (Object entity : entityList) { + list.add(entityToMap(entity)); + } + return list; + } + + + /** + * 判断对象是否是数值 + * + * @param object + * @return + */ + public static boolean isNumber(Object object) { + return object instanceof Number; + } + + + /** + * 遍历查找内容 + * + * @param map + * @param value + * @return + */ + public static Integer findInMapByValue(Map map, String value) { + for (Map.Entry entry : map.entrySet()) { + if (entry.getValue().equals(value)) { + return entry.getKey(); // 返回找到值的键 + } + } + return null; // 如果未找到,返回null + } + + + /** + * 将字符串日期转换为Date类型,支持多种日期格式。 + * + * @param dateString 日期字符串 + * @param formats 可能的日期格式数组 + * @return 解析成功返回Date对象,解析失败抛出异常 + * @throws Exception 如果无法解析日期字符串 + */ + public static Date parseDate(String dateString, String[] formats) throws ParseException { + for (String format : formats) { + SimpleDateFormat formatter = new SimpleDateFormat(format); + formatter.setTimeZone(TimeZone.getTimeZone("UTC")); // 设置时区,根据需要调整 + return formatter.parse(dateString); + } + // 所有格式都不匹配,抛出异常 + throw new RuntimeException("无法解析日期: " + dateString); + } + + /** + * 获取两个符号之间的内容 + * + * @param text 源字符串 + * @param start 开始符号 + * @param end 结束符号 + * @return 两个符号之间的内容 + */ + public static String getContentBetweenSymbols(String text, String start, String end) { + String regex = Pattern.quote(start) + "([\\s\\S]*?)" + Pattern.quote(end); + Pattern pattern = Pattern.compile(regex); + Matcher matcher = pattern.matcher(text); + + if (matcher.find()) { + return matcher.group(1); + } + return null; + } + + /** + * 是否数值 + * + * @param str + * @return + */ + public static boolean isNumeric(String str) { + try { + Integer.parseInt(str); + return true; + } catch (NumberFormatException e) { + try { + Double.parseDouble(str); + return true; + } catch (NumberFormatException e1) { + return false; + } + } + } + + /** + * 将Date对象转换为时间戳(毫秒数) + * + * @param date Date对象 + * @return 时间戳(毫秒数) + */ + public static long convertToTimeStamp(Date date) { + return date.getTime(); + } + + + /** + * 将时间戳对象转换为Date(毫秒数) + * + * @param date Date对象 + * @return 时间戳(毫秒数) + */ + public static Date convertTimeStampToDate(long date) { + return new Date(date); + } +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/poi/WordTemplateProcessor.java b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/poi/WordTemplateProcessor.java new file mode 100644 index 000000000..b110eafad --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-service/src/main/java/com/pcloud/booksflow/form/utils/poi/WordTemplateProcessor.java @@ -0,0 +1,572 @@ +package com.pcloud.booksflow.form.utils.poi; + +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.poifs.crypt.HashAlgorithm; +import org.apache.poi.util.Units; +import org.apache.poi.xwpf.usermodel.*; +import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow; + +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.*; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.regex.Matcher; + +/** + * 基于模板快速生成word文档 + * 目前只支持docx文件 + */ +@Slf4j +public class WordTemplateProcessor implements Closeable { + private int status = 0; + @Getter + private XWPFDocument docx = null; + + private final List allTables = new ArrayList<>(); + + /** + * 根据路径初始化word模板 + * + * @param path + */ + public WordTemplateProcessor(String path) throws IOException { + if (!path.endsWith(".docx")) log.error("无效文档后缀,当前只支持docx格式word文档模板。"); + + try (FileInputStream in = new FileInputStream(path)) { + this.docx = new XWPFDocument(in); + //遍历段落生加载表格列表 + this.allTables.addAll(this.docx.getTables()); + pushLabels(new HashMap<>()); + status = 1; + } + } + + public WordTemplateProcessor(InputStream in) throws IOException { + if (in == null) throw new RuntimeException("请传入文件流"); + this.docx = new XWPFDocument(in); + //遍历段落生加载表格列表 + this.allTables.addAll(docx.getTables()); + pushLabels(new HashMap<>()); + status = 1; + } + + /** + * 往模板填充标签值 + * {{labelName}} + * + * @param labels 标签值 + * @return + */ + private void pushLabels(Map labels) { + //遍历普通段落内容对像,填充标签值 + List paragraphs = docx.getParagraphs(); + replaceLabelsInParagraphs(paragraphs, labels); + + //遍历表格内容,并填充标签值 + List tables = status == 0 ? docx.getTables() : this.allTables; + for (XWPFTable table : tables) { + //表格行 + List rows = table.getRows(); + for (XWPFTableRow row : rows) { + //表格单元格 + List cells = row.getTableCells(); + for (XWPFTableCell cell : cells) { + //表格段落 + List cellParagraphs = cell.getParagraphs(); + replaceLabelsInParagraphs(cellParagraphs, labels); + } + } + } + + //页眉标签值填充 + List headers = docx.getHeaderList(); + for (XWPFHeader header : headers) { + List headerParagraphs = header.getListParagraph(); + replaceLabelsInParagraphs(headerParagraphs, labels); + } + + //页脚填充 + List footers = docx.getFooterList(); + for (XWPFFooter footer : footers) { + List footerParagraphs = footer.getListParagraph(); + replaceLabelsInParagraphs(footerParagraphs, labels); + } + } + + + /** + * 往模板填充标签值 + * {{labelName}} + * + * @param data 标签值 + * @return + */ + public void push(Map data) { + Map labels = new HashMap<>(); + for (String key : data.keySet()) { + Object val = data.get(key); + if (val instanceof Collection) { + pushTable(key, (Collection>) val); + } else { + labels.put(key, val); + } + } + pushLabels(labels); + } + + /** + * 往模板填充标签值实体类 + * + * @param entity + */ + private void pushLabels(Object entity) throws IllegalAccessException { + pushLabels(ProcessorUtils.entityToMap(entity)); + } + + + /** + * 填充表格内容到文档 + * {{tableName:colName}} + * + * @param tableName + * @param collection + */ + private void pushTable(String tableName, Collection> collection) { + for (XWPFTable table : this.allTables) { + boolean isFind = false; + XWPFTableRow baseRow = null; + + List rows = table.getRows(); + int rowCount = rows.size(); + for (int i = 0; i < rowCount; i++) { + List cells = rows.get(i).getTableCells(); + for (XWPFTableCell cell : cells) { + List cellParagraphs = cell.getParagraphs(); + for (XWPFParagraph cellParagraph : cellParagraphs) { + //查找表格标识名称 + if (!isFind) { + if (cellParagraph.getText().contains(ProcessorUtils.labelFormat("table#" + tableName))) { + isFind = true; + } else { + isFind = false; + break; + } + } + + //记录开始数据行 + if (cellParagraph.getText().contains("{{col#")) { + baseRow = rows.get(i); + break; + } + } + if (!isFind) break; + } + if (!isFind) break; + + //已知数据行,开始填充数据 + if (baseRow != null) { + int addRowIndex = 1; + for (Map listRow : collection) { + CTRow ctRow = table.getCTTbl().insertNewTr(i + addRowIndex); + XWPFTableRow newRow = new XWPFTableRow(ctRow, table); + copyRowAndPushLabels(newRow, baseRow, listRow); + //table.addRow(newRow, i + addRowIndex); + addRowIndex++; + } + + //baseRow = null; + table.removeRow(i); + break; + } + } + //删除table标识行 + if (isFind) table.removeRow(0); + } + } + + /** + * 拷贝行,并填充相关值 + * + * @param newRow + * @param baseRow + * @param params + */ + private void copyRowAndPushLabels(XWPFTableRow newRow, XWPFTableRow baseRow, Map params) { + newRow.getCtRow().setTrPr(baseRow.getCtRow().getTrPr()); + for (XWPFTableCell cell : baseRow.getTableCells()) { + XWPFTableCell newCell = newRow.addNewTableCell(); + newCell.getCTTc().setTcPr(cell.getCTTc().getTcPr()); + boolean isFirst = true; + //newCell.setParagraph(cell.getParagraphs().get(0)); + for (XWPFParagraph paragraph : cell.getParagraphs()) { + XWPFParagraph newParagraph = isFirst ? newCell.getParagraphs().get(0) : newCell.addParagraph(); + isFirst = false; + newParagraph.getCTP().setPPr(paragraph.getCTP().getPPr()); + for (XWPFRun run : paragraph.getRuns()) { + XWPFRun newRun = newParagraph.createRun(); + newRun.getCTR().setRPr(run.getCTR().getRPr()); + + String text = run.getText(0); + if (text == null) continue; + else newRun.setText(text); + + Matcher labels = ProcessorUtils.getMatchingLabels(text); + while (labels.find()) { + String label = labels.group(); + String[] key = label.split("#"); + if (params.containsKey(key[key.length - 1])) { + newRun.setText(text.replace(ProcessorUtils.labelFormat(label), params.get(key[key.length - 1]).toString()), 0); + } + } + } + } + + } + } + + /** + * 段落列表填充标签 + * + * @param paragraphs + * @param params + */ + private void replaceLabelsInParagraphs(List paragraphs, Map params) { + for (int i = 0; i < paragraphs.size(); i++) { + XWPFParagraph paragraph = paragraphs.get(i); + + //获取doc表格,包括子表格,docx.getTables()无法获取子表格 + if (status == 0) { + if (!this.allTables.containsAll(paragraph.getBody().getTables())) + this.allTables.addAll(paragraph.getBody().getTables()); + return; + } + + String text = paragraph.getText(); + if (text == null || text.equals("") || !text.contains("{{")) continue; + else if (text.contains("{{v-")) logicLabelsInParagraph(paragraphs, i, params); + replaceLabelsInParagraph(paragraph, params); + } + } + + /** + * 清空标签被分割的其它文本 + * + * @param runs + */ + private void removeRun(List runs) { + //runs.remove(runs.size() - 1); + //for (XWPFRun run : runs) { + // run.setText("", 0); + //} + for (int i = 0; i < runs.size() - 1; i++) { + runs.get(i).setText("", 0); + } + } + + /** + * 逻辑语句处理 + */ + private void logicLabelsInParagraph(List paragraphs, Integer index, Map params) { + String nowText = ""; + int runCount = 0; + List labelRuns = new ArrayList<>(); + Boolean isShow = true; + + for (int i = index; i < paragraphs.size(); i++) { + XWPFParagraph paragraph = paragraphs.get(i); + List runs = paragraph.getRuns(); + + for (XWPFRun run : runs) { + //System.out.println(run.toString()); + if (run.getText(0) != null && (run.getText(0).contains("{{") || runCount > 0)) { + nowText += run.getText(0); + runCount++; + labelRuns.add(run); + + Matcher labels = ProcessorUtils.getMatchingLabels(nowText); + int labelFindCount = 0; + while (labels.find()) { + labelFindCount++; + String label = labels.group(); + //System.out.println(label); + + String[] key = label.split("#"); + + if (key.length == 2) { + Integer indexName = key[1].indexOf("=") + 1 + key[1].indexOf("&") + 1; + String keyName = indexName > 0 ? key[1].substring(0, indexName - 1) : key[1]; + if (params.containsKey(keyName)) { + String val = params.get(keyName) == null ? "" : params.get(keyName).toString(); + //条件判断语句 + if (key[0].equals("v-if")) { + if (key[1].contains("=")) { + isShow = val.equals(key[1].substring(indexName)); + } else if (key[1].contains("&")) { + Integer curVal = Integer.valueOf(key[1].substring(indexName)); + isShow = (Integer.valueOf(val) & curVal) == curVal; + } else { + isShow = val.equals("true"); + } + + if (isShow == false) { + if (nowText.indexOf("{{end-if}}") > nowText.indexOf(ProcessorUtils.labelFormat(label))) + nowText = nowText.replace(nowText.substring(nowText.indexOf(ProcessorUtils.labelFormat(label)), nowText.indexOf("{{end-if}}")), ""); + else + nowText = nowText.replace(nowText.substring(nowText.indexOf(ProcessorUtils.labelFormat(label))), ""); + } else nowText = nowText.replace(ProcessorUtils.labelFormat(label), ""); + + run.setText(nowText, 0); + removeRun(labelRuns); + } + } + } else if (label.equals("end-if")) { + run.setText(nowText.replace(ProcessorUtils.labelFormat(label), ""), 0); + removeRun(labelRuns); + isShow = true; + } + } + if (labelFindCount > 0) { + nowText = ""; + runCount = 0; + labelRuns = new ArrayList<>(); + } + } + + if (isShow != true) { + run.setText("", 0); + } + + } + } + } + + /** + * 段落填充标签 + * + * @param paragraph + * @param params + */ + private void replaceLabelsInParagraph(XWPFParagraph paragraph, Map params) { + //遍历文本对象,查找标识标签 + List runs = paragraph.getRuns(); + String nowText = ""; + int runCount = 0; + List labelRuns = new ArrayList<>(); + + //常规标签 + for (XWPFRun run : runs) { + //防止文本对象标签被分割 + if (run.getText(0) != null && (run.getText(0).contains("{{") || runCount > 0)) { + nowText += run.getText(0); + runCount++; + labelRuns.add(run); + + //System.out.println(nowText); + Matcher labels = ProcessorUtils.getMatchingLabels(nowText); + int labelFindCount = 0; + while (labels.find()) { + labelFindCount++; + String label = labels.group(); + + String[] key = label.split("#"); + Integer indexName = key[0].indexOf("=") + 1 + key[0].indexOf("&") + 1; + String keyName = indexName > 0 ? key[0].substring(0, indexName - 1) : key[0]; + //标签书签 + if (params.containsKey(keyName)) { + //普通文本标签 + Object val = params.get(keyName) == null ? "" : params.get(keyName); + if (key.length == 1) { + nowText = nowText.replace(ProcessorUtils.labelFormat(label), val.toString()); + run.setText(nowText, 0); + continue; + } + + if (key.length == 2) { + //日期类型填充 + if (key[1].startsWith("Date:")) { + String textVal = val.equals("") ? val.toString() : new SimpleDateFormat(key[1].replace("Date:", "")).format(val); + nowText = nowText.replace(ProcessorUtils.labelFormat(label), textVal); + run.setText(nowText, 0); + continue; + } + + //枚举数组标签 + if (key[1].startsWith("[") && key[1].endsWith("]")) { + String group = key[1].substring(1, key[1].length() - 1); + for (String keyVal : group.split(",")) { + if (keyVal.indexOf(val + ":") == 0) { + nowText = nowText.replace(ProcessorUtils.labelFormat(label), keyVal.replace(val + ":", "")); + run.setText(nowText, 0); + removeRun(labelRuns); + } + } + continue; + } + + //值判定类型标签 + String[] bool = key[1].split(":"); + String trueVal = bool[0]; + String falseVal = bool.length == 1 ? "" : bool[1]; + if (bool.length >= 1) { + String textVal = ""; + if (key[0].contains("=")) { + textVal = val.toString().equals(key[0].substring(indexName)) ? trueVal : falseVal; + } else if (key[0].contains("&")) { + Integer curVal = Integer.valueOf(key[0].substring(indexName)); + textVal = (Integer.valueOf(val.toString()) & curVal) == curVal ? trueVal : falseVal; + } else { + textVal = val.toString().equals("true") ? trueVal : falseVal; + } + nowText = nowText.replace(ProcessorUtils.labelFormat(label), textVal); + run.setText(nowText, 0); + removeRun(labelRuns); + continue; + } + + } + } else if (key[0].equals("v-image")) { + //图片标签处理 + + //获取图片相关信息 + String[] val = key[1].split(","); + int scale = 100; + String[] sizes = {}; + String picName = ""; + for (String valKey : val) { + if (valKey.startsWith("path:")) + picName = valKey.replace("path:", ""); + if (valKey.startsWith("scale:")) + scale = Integer.valueOf(valKey.replace("scale:", "")); + if (valKey.startsWith("size:")) + sizes = valKey.replace("size:", "").split("\\*"); + } + + if (params.containsKey(picName)) { + run.setText("", 0); + removeRun(labelRuns); + + String path = String.valueOf(params.get(picName)); + if (path != "" && path != null) { + try { + int width, height; + //计算高度宽度 + if (sizes.length == 2) { + width = Units.toEMU(Double.valueOf(sizes[0])); + height = Units.toEMU(Double.valueOf(sizes[1])); + } else { + File picFile = new File(path); + BufferedImage read = ImageIO.read(picFile); + width = Units.toEMU(read.getWidth() * scale / 100); + height = Units.toEMU(read.getHeight() * scale / 100); + } + + //插入图片 + InputStream stream = new FileInputStream(path); + run.addPicture(stream, XWPFDocumentPicType(path), picName, width, height); + stream.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + } + } + + if (labelFindCount > 0) { + nowText = ""; + runCount = 0; + labelRuns = new ArrayList<>(); + } + } + + } + } + + public int XWPFDocumentPicType(String path) { + if (path.endsWith(".emf")) { + return XWPFDocument.PICTURE_TYPE_EMF; + } else if (path.endsWith(".wmf")) { + return XWPFDocument.PICTURE_TYPE_WMF; + } else if (path.endsWith(".pict")) { + return XWPFDocument.PICTURE_TYPE_PICT; + } else if (path.endsWith(".jpeg") || path.endsWith(".jpg")) { + return XWPFDocument.PICTURE_TYPE_JPEG; + } else if (path.endsWith(".png")) { + return XWPFDocument.PICTURE_TYPE_PNG; + } else if (path.endsWith(".dib")) { + return XWPFDocument.PICTURE_TYPE_DIB; + } else if (path.endsWith(".gif")) { + return XWPFDocument.PICTURE_TYPE_GIF; + } else if (path.endsWith(".tiff")) { + return XWPFDocument.PICTURE_TYPE_TIFF; + } else if (path.endsWith(".eps")) { + return XWPFDocument.PICTURE_TYPE_EPS; + } else if (path.endsWith(".bmp")) { + return XWPFDocument.PICTURE_TYPE_BMP; + } else if (path.endsWith(".wpg")) { + return XWPFDocument.PICTURE_TYPE_WPG; + } + return 0; + } + + /** + * 清除条件语句产生的空段落 + */ + public void removeNullParagraphs() { + List paragraphs = docx.getParagraphs(); + List listBe = docx.getBodyElements(); + + for (int i = 0; i < listBe.size(); i++) { + if (listBe.get(i).getElementType() == BodyElementType.PARAGRAPH) { + if (paragraphs.get(docx.getParagraphPos(i)).getText().contains("R")) { + docx.removeBodyElement(i); + i--; + continue; + } + } + + } + } + + /** + * 段落条件标签处理 + * + * @param paragraph + * @param params + */ + private void syntaxLabelsInParagraph(XWPFParagraph paragraph, Map params) { + + } + + /** + * 设置word只读 + * + * @param pass + */ + public void setReadOnly(String pass) { + docx.enforceFillingFormsProtection(pass, HashAlgorithm.sha512); + } + + /** + * 保存word文件到目录下 + * + * @param path + * @param name + */ + public void save(String path, String name) throws IOException { + try (FileOutputStream outStream = new FileOutputStream(path + name)) { + //removeNullParagraphs(); + docx.write(outStream); + } + } + + @Override + public void close() throws IOException { + if (docx != null) { + docx.close(); + } + } +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/pom.xml b/ruoyi-modules/ruoyi-form/booksflow-form-starter/pom.xml new file mode 100644 index 000000000..c8a92b324 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + + org.dromara + ruoyi-form + ${revision} + + + booksflow-form-starter + jar + + + + org.dromara + booksflow-form-api + ${revision} + + + org.dromara + booksflow-form-mapper + ${revision} + + + org.dromara + booksflow-form-service + ${revision} + + + + junit + junit + test + + + org.springframework.boot + spring-boot-starter-test + test + + + + + diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/AppApplication.java b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/AppApplication.java new file mode 100644 index 000000000..899d0a031 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/AppApplication.java @@ -0,0 +1,17 @@ +package com.pcloud.booksflow.form; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; + +@Slf4j +@SpringBootApplication +public class AppApplication { + + public static void main(String[] args) { + log.warn("Start AppApplication service."); + new SpringApplicationBuilder(AppContext.class).build(args).run(args); + log.warn("Start AppApplication successfully."); + } + +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/AppContext.java b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/AppContext.java new file mode 100644 index 000000000..c29d06023 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/AppContext.java @@ -0,0 +1,29 @@ +package com.pcloud.booksflow.form; + +import com.pcloud.booksflow.form.config.BooksflowFormDataSourceConfig; +import com.pcloud.common.config.PublicConfig; +import com.pcloud.common.constant.AppLabelConstant; +import com.pcloud.common.core.datasource.DataSourceConfig; +import com.pcloud.common.readwrite.config.ReadWriteSplittingDataSourceConfig; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.cloud.netflix.eureka.EnableEurekaClient; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.FilterType; +import org.springframework.scheduling.annotation.EnableScheduling; + + +@Configuration +@ComponentScan(basePackages = {"com.pcloud"}, excludeFilters = { + @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = DataSourceConfig.class), + @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = ReadWriteSplittingDataSourceConfig.class), + @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = PublicConfig.class), + @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = AppLabelConstant.class) +}) +@EnableScheduling +@EnableEurekaClient +@EnableFeignClients({"com.pcloud", "com.commons.weboffice.api.service", "com.pcloud.llm.cockpit.client"}) +@MapperScan(basePackages = "com.pcloud.booksflow.form.mybatis.mapper", sqlSessionFactoryRef = BooksflowFormDataSourceConfig.SESSION_FACTORY_NAME) +public class AppContext { +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/BooksflowFormDataSourceConfig.java b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/BooksflowFormDataSourceConfig.java new file mode 100644 index 000000000..e6bb96dbd --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/BooksflowFormDataSourceConfig.java @@ -0,0 +1,173 @@ +package com.pcloud.booksflow.form.config; + +import com.alibaba.druid.pool.DruidDataSource; +import com.alibaba.druid.support.http.StatViewServlet; +import com.pcloud.booksflow.form.utils.TenantHelper; +import com.pcloud.common.core.mybatis.interceptor.ExecutorInterceptor; +import com.pcloud.common.druid.DruidDatasourceBuilder; +import com.pcloud.common.druid.DruidDefaultProperties; +import com.pcloud.common.readwrite.datasource.ReadWriteDataSource; +import com.pcloud.common.readwrite.route.ReadWriteMybatisRouter; +import com.pcloud.common.readwrite.route.context.ReadWriteLookupKey; +import com.pcloud.mybatis.Interceptor.MybatisPlusInterceptor; +import com.pcloud.mybatis.Interceptor.tenant.TenantLineInnerInterceptor; +import com.pcloud.mybatis.Interceptor.tenant.handler.TenantLineHandler; +import net.sf.jsqlparser.expression.Expression; +import net.sf.jsqlparser.expression.LongValue; +import org.apache.ibatis.plugin.Interceptor; +import org.apache.ibatis.session.SqlSessionFactory; +import org.mybatis.spring.SqlSessionFactoryBean; +import org.mybatis.spring.SqlSessionTemplate; +import org.mybatis.spring.annotation.MapperScan; +import org.mybatis.spring.boot.autoconfigure.SpringBootVFS; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.web.servlet.ServletRegistrationBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.DependsOn; +import org.springframework.context.annotation.Primary; +import org.springframework.transaction.TransactionManager; + +import javax.sql.DataSource; +import java.io.IOException; +import java.sql.SQLException; +import java.util.*; + +@Configuration +@MapperScan(basePackages = "com.pcloud.booksflow.form.mybatis.mapper") +public class BooksflowFormDataSourceConfig { + private final Logger logger = LoggerFactory.getLogger(getClass()); + + private static final String PREFIX = "booksflowForm"; + + public static final String DATASOURCE_NAME = PREFIX + "DataSource"; + private static final String MASTER_DATASOURCE_NAME = PREFIX + "MasterDataSource"; + private static final String SLAVE_DATASOURCE_NAME = PREFIX + "SlaveDataSource"; + public static final String TRANSACTION_MANAGER_NAME = PREFIX + "TransactionManager"; + public static final String SESSION_FACTORY_NAME = PREFIX + "SqlSessionFactory"; + public static final String SESSION_TEMPLATE_NAME = PREFIX + "SqlSessionTemplate"; + + @Value("${mybatis.mapper-locations}") + private String mapperLocations; + + @Value("${mybatis.type-aliases-package}") + private String typeAliasesPackage; + + @Bean(DruidDatasourceBuilder.DRUID_DEFAULT_PROPERTIES_NAME) + @ConditionalOnMissingBean + @ConfigurationProperties(prefix = "spring.datasource") + public DruidDefaultProperties druidDefaultProperties() { + return new DruidDefaultProperties(); + } + + @Bean(MASTER_DATASOURCE_NAME) + @ConfigurationProperties(prefix = "spring.datasource.booksflow-form.master") + public DruidDataSource master() { + logger.info("start create master datasource {}", PREFIX); + return DruidDatasourceBuilder.createDruidDatasource(druidDefaultProperties()); + } + + @Bean(SLAVE_DATASOURCE_NAME) + @ConfigurationProperties(prefix = "spring.datasource.booksflow-form.slave") + public DruidDataSource slave() { + logger.info("start create slave datasource {}", PREFIX); + return DruidDatasourceBuilder.createDruidDatasource(druidDefaultProperties()); + } + + @Primary + @Bean(DATASOURCE_NAME) + @DependsOn({MASTER_DATASOURCE_NAME, SLAVE_DATASOURCE_NAME}) + public DataSource dataSource(DruidDefaultProperties druidDefaultProperties, + @Qualifier(MASTER_DATASOURCE_NAME) DruidDataSource master, + @Qualifier(SLAVE_DATASOURCE_NAME) DruidDataSource slave) throws SQLException, IOException { + ReadWriteDataSource ds = new ReadWriteDataSource(); + ds.setDefaultTargetDataSource(master); + + Map dataSourceMap = new HashMap<>(); + dataSourceMap.put(ReadWriteLookupKey.MASTER, master); + dataSourceMap.put(ReadWriteLookupKey.SLAVE, slave); + + ds.setTargetDataSources(dataSourceMap); + return ds; + } + + @Primary + @Bean(SESSION_FACTORY_NAME) + public SqlSessionFactory sqlSessionFactory(@Qualifier(DATASOURCE_NAME) DataSource dataSource, + ExecutorInterceptor interceptor, + ReadWriteMybatisRouter rw) throws Exception { + logger.info("【DataSource {}】初始化SqlSessionFactory,", PREFIX); + final SqlSessionFactoryBean sessionFactoryBean = DruidDatasourceBuilder.createSqlSessionFactory(dataSource, mapperLocations); + logger.info("【DataSource {}】初始化SqlSessionFactory,mapperLocations={}", PREFIX, mapperLocations); + + sessionFactoryBean.setVfs(SpringBootVFS.class); + sessionFactoryBean.setTypeAliasesPackage(typeAliasesPackage); + sessionFactoryBean.setPlugins(new Interceptor[] { rw, interceptor, mybatisPlusInterceptor()}); + return sessionFactoryBean.getObject(); + } + + private MybatisPlusInterceptor mybatisPlusInterceptor() { + MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); + TenantLineInnerInterceptor tenant = new TenantHandler(Arrays.asList("tenant_init_status"), "agent_id"); + interceptor.addInnerInterceptor(tenant); + return interceptor; + } + + + public static class TenantHandler extends TenantLineInnerInterceptor { + /** + * 多租户初始化设置 + * + * @param ignoreTable 忽略的表 + * @param idName 租户id + */ + public TenantHandler(final List ignoreTable, final String idName) { + super(new TenantLineHandler() { + @Override + public Expression getTenantId() { + String tenantId = String.valueOf(TenantHelper.getTenantId()); + return new LongValue(tenantId); + } + + // 忽略表,true 表示忽略该表 + @Override + public boolean ignoreTable(String tableName) { + return ignoreTable.contains(tableName); + } + + // 多租户的列名自定义 + @Override + public String getTenantIdColumn() { + return idName; + } + }); + } + } + + @Primary + @Bean(TRANSACTION_MANAGER_NAME) + public TransactionManager transactionManager(@Qualifier(DATASOURCE_NAME) DataSource dataSource) { + return DruidDatasourceBuilder.createTransactionManager(dataSource); + } + + @Bean(name = SESSION_TEMPLATE_NAME) + @Primary + public SqlSessionTemplate sqlSessionTemplate(@Qualifier(SESSION_FACTORY_NAME) SqlSessionFactory sqlSessionFactory, + ExecutorInterceptor interceptor) throws Exception { + logger.info("【DataSource {}】初始化SqlSessionTemplate,", PREFIX); + return new SqlSessionTemplate(sqlSessionFactory); + } + + @Bean(DruidDatasourceBuilder.DRUID_STAT_VIEW_SERVLET_BEAN_NAME) + @ConditionalOnMissingBean(name = DruidDatasourceBuilder.DRUID_STAT_VIEW_SERVLET_BEAN_NAME) + public ServletRegistrationBean druidStatViewServlet(){ + return DruidDatasourceBuilder.createDruidStatViewServlet(); + } + + +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/BooksflowFormExceptionHandler.java b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/BooksflowFormExceptionHandler.java new file mode 100644 index 000000000..367568023 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/BooksflowFormExceptionHandler.java @@ -0,0 +1,55 @@ +package com.pcloud.booksflow.form.config; + +import com.pcloud.common.core.exception.GlobalExceptionHandler; +import com.pcloud.common.dto.ResponseDto; +import com.pcloud.common.exceptions.BizException; +import com.pcloud.common.permission.PermissionException; +import lombok.extern.slf4j.Slf4j; +import org.mybatis.spring.MyBatisSystemException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.BindException; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; + +import javax.servlet.http.HttpServletRequest; +import java.util.stream.Collectors; + +@ControllerAdvice +@Slf4j +public class BooksflowFormExceptionHandler { + + @Autowired + private GlobalExceptionHandler globalExceptionHandler; + + @ExceptionHandler(BindException.class) + public ResponseEntity handleBindException(BindException e) { + String errorMsg = "参数校验失败: " + e.getBindingResult().getFieldErrors() + .stream() + .map(error -> error.getField() + ": " + error.getDefaultMessage()) + .collect(Collectors.joining(", ")); + log.warn(errorMsg, e); + ResponseDto responseDto = new ResponseDto<>(HttpStatus.BAD_REQUEST.value(), errorMsg); + return new ResponseEntity<>(responseDto, HttpStatus.BAD_REQUEST); + } + + @ExceptionHandler(BizException.class) + public ResponseEntity bizException(BizException e) { + log.error("错误:", e); + ResponseDto responseDto = new ResponseDto<>(HttpStatus.INTERNAL_SERVER_ERROR.value(), e.getMessage()); + return new ResponseEntity<>(responseDto, HttpStatus.INTERNAL_SERVER_ERROR); + } + + @ExceptionHandler(MyBatisSystemException.class) + public ResponseEntity myBatisSystemException(HttpServletRequest request, MyBatisSystemException e) throws Exception { + Throwable cause = e.getCause().getCause(); + if (cause instanceof PermissionException) { + return globalExceptionHandler.exceptionHandler(request, (PermissionException) cause); + } + log.warn("MyBatisSystemException:", e); + ResponseDto responseDto = new ResponseDto<>(HttpStatus.INTERNAL_SERVER_ERROR.value(), "系统繁忙,请稍后再试!"); + return new ResponseEntity<>(responseDto, HttpStatus.INTERNAL_SERVER_ERROR); + } + +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/NacosPropertyLoadConfig.java b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/NacosPropertyLoadConfig.java new file mode 100644 index 000000000..a6446c80b --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/NacosPropertyLoadConfig.java @@ -0,0 +1,19 @@ +package com.pcloud.booksflow.form.config; + +import com.alibaba.nacos.spring.context.annotation.config.EnableNacosConfig; +import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource; +import lombok.Data; +import org.springframework.context.annotation.Configuration; +import org.springframework.stereotype.Component; + +@Configuration +@EnableNacosConfig +@NacosPropertySource(dataId = "booksflow-form.yml", autoRefreshed = true, groupId = "${config.group.id:DEFAULT_GROUP}") +@NacosPropertySource(dataId = "db-default.yml") +@NacosPropertySource(dataId = "eureka.yml", first = true, groupId = "${config.group.id:DEFAULT_GROUP}") +@NacosPropertySource(dataId = "redis.properties", groupId = "${config.group.id:DEFAULT_GROUP}") +@Data +@Component +public class NacosPropertyLoadConfig { + +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/SwaggerConfig.java b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/SwaggerConfig.java new file mode 100644 index 000000000..81e85f0d7 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/java/com/pcloud/booksflow/form/config/SwaggerConfig.java @@ -0,0 +1,37 @@ +package com.pcloud.booksflow.form.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.service.ApiInfo; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + + +@Configuration +@EnableSwagger2 +@Profile({"dev", "test"}) +public class SwaggerConfig { + + @Bean + public Docket api() { + return new Docket(DocumentationType.SWAGGER_2) + .select() + .apis(RequestHandlerSelectors.basePackage("com.pcloud.booksflow.form")) + .paths(PathSelectors.any()) + .build() + .apiInfo(apiInfo()); + } + + private ApiInfo apiInfo() { + return new ApiInfoBuilder() + .title("BooksFlow Form API") + .description("表单管理服务API文档") + .version("1.0") + .build(); + } +} diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-dev.yml b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-dev.yml new file mode 100644 index 000000000..6c0893948 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-dev.yml @@ -0,0 +1,20 @@ +##DEV Environment + +# Overwrite, Local Dev Env do not register service to eureka +eureka: + client: + register-with-eureka: false + +# Overwrite, Local Dev Env get the Test Configurations +nacos: + config: + namespace: test + +# Overwrite, Local Dev Env do not register rabbitmq listener +spring: + rabbitmq: + listener: + direct: + auto-startup: false + simple: + auto-startup: false \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-perf.yml b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-perf.yml new file mode 100644 index 000000000..af9a321cf --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-perf.yml @@ -0,0 +1 @@ +##Perf Environment diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-prod.yml b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-prod.yml new file mode 100644 index 000000000..3a145e02f --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-prod.yml @@ -0,0 +1 @@ +##Prod Environment diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-test.yml b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-test.yml new file mode 100644 index 000000000..eeb3e4723 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-test.yml @@ -0,0 +1 @@ +##Test Environment diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-tsrpd.yml b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-tsrpd.yml new file mode 100644 index 000000000..3a145e02f --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-tsrpd.yml @@ -0,0 +1 @@ +##Prod Environment diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-uat.yml b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-uat.yml new file mode 100644 index 000000000..e4b5e4d20 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application-uat.yml @@ -0,0 +1 @@ +##Uat Environment diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application.yml b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application.yml new file mode 100644 index 000000000..8d1102490 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/config/application.yml @@ -0,0 +1,76 @@ +## +## Common configs, none business with Environment +## +spring: + application: + name: booksflow-form-service + profiles: + active: dev + main: + allow-bean-definition-overriding: true + +nacos: + config: + server-addr: http://192.168.92.37:8848 + namespace: ${spring.profiles.active} + username: rays_app + password: app@read + +server: + port: 8352 + servlet: + context-path: / + +eureka: + instance: + status-page-url-path: /health + client: + register-with-eureka: true + +mybatis: + mapper-locations: classpath*:mapper/*Mapper*.xml;classpath*:mq-tx-mapper/*Mapper*.xml + type-aliases-package: com.pcloud.booksflow.form + + +management: + security: + enabled: false + endpoints: + web: + base-path: / + exposure: + include: "*" + endpoint: + shutdown: + enabled: true + sensitive: false +ribbon: + ServerListRefreshInterval: 5 + OkToRetryOnAllOperations: false + MaxAutoRetriesNextServer: 0 + MaxAutoRetries: 0 + ReadTimeout: 60000 + ConnectTimeout: 60000 +feign: + hystrix: + enabled: true + client: + config: + knowledgeBaseDocumentApiFeignClient: + connectTimeout: 5000 + readTimeout: 1200000 +hystrix: + command: + default: + execution: + isolation: + thread: + timeoutInMilliseconds: 60000 + DocumentRecordServiceFeign#ingestDocument(IngestRequestDTO): + execution: + isolation: + thread: + timeoutInMilliseconds: 1200000 + threadpool: + default: + coreSize: 300 \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/logback.xml b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/logback.xml new file mode 100644 index 000000000..fe4b98269 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/main/resources/logback.xml @@ -0,0 +1,139 @@ + + + + + + + + + + + ${pattern} + + + + DEBUG + + + + + + + + logs/info/${application}-info-%d{yyyy-MM-dd}.%i.log + + 10 + + + + 70MB + + + + + ${pattern} + + + + INFO + + + + + + + + + logs/warn/${application}-warn-%d{yyyy-MM-dd}.%i.log + + 20 + + + + 20MB + + + + + ${pattern} + + + + WARN + + + + + + + + + logs/error/${application}-error-%d{yyyy-MM-dd}.%i.log + + 30 + + + + 20MB + + + + + ${pattern} + + + + ERROR + + + + + + + + logs/monitor/${application}-monitor-%d{yyyy-MM-dd_HH}.%i.log + + 10 + + + + 3GB + + + + + %msg%n + + + + INFO + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/test/resources/config/application-dev.yml b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/test/resources/config/application-dev.yml new file mode 100644 index 000000000..6c0893948 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/booksflow-form-starter/src/test/resources/config/application-dev.yml @@ -0,0 +1,20 @@ +##DEV Environment + +# Overwrite, Local Dev Env do not register service to eureka +eureka: + client: + register-with-eureka: false + +# Overwrite, Local Dev Env get the Test Configurations +nacos: + config: + namespace: test + +# Overwrite, Local Dev Env do not register rabbitmq listener +spring: + rabbitmq: + listener: + direct: + auto-startup: false + simple: + auto-startup: false \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/docs/20160130.sql b/ruoyi-modules/ruoyi-form/docs/20160130.sql new file mode 100644 index 000000000..7e55bed2e --- /dev/null +++ b/ruoyi-modules/ruoyi-form/docs/20160130.sql @@ -0,0 +1,66 @@ +alter table form_template_field + add fmt_constraint varchar(100) null comment '格式约束:int、double、str、boolean、date、select(下拉选择)' after `fixed`; + +alter table form_template_field + add edit tinyint(1) null comment '是否可编辑' after `fixed`; + +alter table form_template_field + add show_cascade varchar(2000) null comment '字典级联显示' after sort_order; + +alter table form_template_field + add line tinyint null comment '占行数量(0-不占一行,其他-占的行数)' after `fixed`; + +alter table form_template_field + add dcode varchar(50) null comment '字典code' after `show`; + +alter table form_template_field + add parent_id bigint null comment '父id' after `code`; + +alter table form_template_field + add edit_disabled tinyint(1) null comment '可编辑按钮禁用' after `sort_order`; + +alter table form_template_field + add edit_disabled_msg varchar(500) null comment '可编辑按钮禁用提示' after `sort_order`; + +alter table form_template_field + add cascade_open varchar(2000) null comment '级联显示关' after sort_order; +alter table form_template_field + add cascade_close varchar(2000) null comment '级联显示开' after sort_order; + +alter table form_template + add content_encoding varchar(100) null comment '内容编码,保存时和上次的编码是否一致,一致时则不进行更新' after `version`; + +-- 同步抽数据时不能为空 +alter table form_field_dict + modify update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间'; + +-- 表单打印需求 +alter table form_print_config + modify main_title varchar(255) null comment '主标题'; + +alter table form_print_config + add file_name varchar(500) null comment '模板文件name' after print_fields; +alter table form_print_config + add file_url varchar(500) null comment '模板文件url' after print_fields; +alter table form_print_config + add file_size int null comment '模板文件大小' after print_fields; +alter table form_print_config + add file_url_ai varchar(500) null comment 'ai模板文件url' after print_fields; +alter table form_print_config + add file_wps_id varchar(255) null comment 'file_wps_id' after print_fields; +alter table form_print_config + add file_type varchar(20) null comment '文件类型:doc、excel' after print_fields; + +## 模板字典数据初始化 +-- 执行插入前先查询是否存在,存在就不插入 +select * +from form_dict where agent_id =-1 and code = ? ; + +INSERT INTO form_dict (name, code, remarks, created_by, updated_by, agent_id, deleted) +VALUES ('费用科目', 'expenseSubject', null, 119, null, -1, 0); +INSERT INTO form_dict (name, code, remarks, created_by, updated_by, agent_id, deleted) +VALUES ('往来单位', 'contactUnit', null, 119, null, -1, 0); +INSERT INTO form_dict (name, code, remarks, created_by, updated_by, agent_id, deleted) +VALUES ('著作方式', 'writingType', null, 119, null, -1, 0); +INSERT INTO form_dict (name, code, remarks, created_by, updated_by, agent_id, deleted) +VALUES ('仓库管理', 'warehouse', null, 119, null, -1, 0); \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/docs/http/FormController.http b/ruoyi-modules/ruoyi-form/docs/http/FormController.http new file mode 100644 index 000000000..090cb3e5a --- /dev/null +++ b/ruoyi-modules/ruoyi-form/docs/http/FormController.http @@ -0,0 +1,41 @@ +### 创建表单 +POST {{baseUrl}}form/create +Content-Type: application/json +Token: {{token}} + +{ + "code": "xtsb2", + "name": "选题申报2" +} + +### 根据ID获取表单 +GET {{baseUrl}}form/get?id=3 +Token: {{token}} + +### 更新表单信息 +POST {{baseUrl}}form/update/1 +Content-Type: application/json + +{ + "name": "选题申报更新" +} + +### 删除表单 +POST {{baseUrl}}form/delete/1 + +### 获取表单列表 +GET {{baseUrl}}form/list?name=选题申报 + +### 初始化表单db数据 +POST {{baseUrl}}form/initialize?tenantId=53 +Content-Type: application/json +Token: {{token}} + +### 初始化表单 copy +POST {{baseUrl}}form/copy?sourceTenantId=5&targetTenantId=-1 +Token: {{token}} + +### 重置表单 reset +GET {{baseUrl}}form/reset?formId=7 +Token: {{token}} + diff --git a/ruoyi-modules/ruoyi-form/docs/http/FormDictController.http b/ruoyi-modules/ruoyi-form/docs/http/FormDictController.http new file mode 100644 index 000000000..0d99b9971 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/docs/http/FormDictController.http @@ -0,0 +1,35 @@ +### 创建或更新表单字典 +POST {{baseUrl}}/form/dict/createOrUpdate +Content-Type: application/json +Token: {{token}} + +{ + "name": "测试字典", + "code": "test_dict" +} + +### 根据ID获取表单字典 +GET {{baseUrl}}/form/dict/get?id=1 +Token: {{token}} + +### 删除表单字典 +POST {{baseUrl}}/form/dict/delete?id=1 +Token: {{token}} + +### 获取表单字典列表 +GET {{baseUrl}}/form/dict/list +Token: {{token}} + +### 根据编码获取表单字典 +GET {{baseUrl}}/form/dict/get-by-code?code=test_dict +Token: {{token}} + + +### form/dict/copy 同步字典到 targetTenantId 租户 +POST {{baseUrl}}/form/dict/copy?sourceTenantId=-1&targetTenantId=你的租户机构id +Content-Type: application/json +Token: {{token}} + +[ + "writingType" +] \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/docs/http/FormFieldDictController.http b/ruoyi-modules/ruoyi-form/docs/http/FormFieldDictController.http new file mode 100644 index 000000000..a438f7a93 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/docs/http/FormFieldDictController.http @@ -0,0 +1,73 @@ +### 创建新的表单字段配置 parentId 非必填 +POST {{baseUrl}}/form/field-dict/createOrUpdate +Content-Type: application/json +Token: {{token}} + +{ + "name": "lizhw1", + "code": "lizhw2", + "sortOrder": 1, + "configType": "contactUnit", + "status": 1, + "otherFields": { + "unitTypeId": 28, + "unitTypeTitle": "冒烟测试1" + } +} + +### 更新表单字段配置信息 +POST {{baseUrl}}/form/field-dict/createOrUpdate +Content-Type: application/json + +{ + "parentId": 4, + "configType": "contactUnit", + "name": "contactUnit名称", + "code": "123", + "sortOrder": 2, + "status": 1, + "otherFields": {} +} + +### 根据ID获取表单字段配置,parentId 参数非必填 +GET {{baseUrl}}/form/field-dict/getList?configType=contactUnit +Token: {{token}} + + +### 更新表单字段配置排序 +POST {{baseUrl}}/form/field-dict/update-status?id=1&status=1 +Token: {{token}} + +### 删除表单字段配置,软删除 +POST {{baseUrl}}/form/field-dict/delete?id=1 +Token: {{token}} + + +### form/field-dict/page +GET {{baseUrl}}/form/field-dict/page?currentPage=0&numPerPage=10&configType=contactUnit&queryStr=2 +Token: {{token}} + + +### /formService/field-dict/dict +POST {{baseUrl}}form/field-dict/dict +Content-Type: application/json + +["contactUnit"] + +### 根据ID获取表单字段配置 +POST {{baseUrl}}/formService/field-dict/get +Content-Type: application/json +Token: {{token}} + +{ + "contactUnit": { + "tree": true, + "parentId": null, + "level": null + }, + "unitContact": { + "tree": false, + "parentId": null, + "level": 1 + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/docs/http/FormPrintConfigController.http b/ruoyi-modules/ruoyi-form/docs/http/FormPrintConfigController.http new file mode 100644 index 000000000..f7f469f21 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/docs/http/FormPrintConfigController.http @@ -0,0 +1,65 @@ +### 创建或更新表单打印配置 +POST {{baseUrl}}/form-print-config/createOrUpdate +Content-Type: application/json +Token: {{token}} + +{ + "formId": 1, + "mainTitle": "采购订单", + "subTitle": "采购部专用", + "displayFormat": "standard", + "documentNoPrefix": "CG-", + "showDocumentNo": true, + "printDateFormat": "yyyy-MM-dd", + "showPrintDate": true, + "showPageNumber": true, + "columnWidthMode": "auto", + "tableStyle": "bordered", + "rowHeight": "normal", + "ext": "{\"fontSize\": 12, \"fontFamily\": \"Arial\"}" +} + + +### updateFile +POST {{baseUrl}}/form-print-config/updateFile +Content-Type: application/json +Token: {{token}} + +{ + "formId": 157, + "fileName":"test.docx", + "fileSize": 1000, + "fileUrl":"https://booksflow-file-dev.raysgo.com/upload/cip/1769397604769/63645b9bb3fab4ff284cbfebed9cdf2e.docx", + "fileType": "docx" +} + +### 根据表单ID获取表单打印配置 +GET {{baseUrl}}/form-print-config/get?formId=1 +Token: {{token}} + + +### updateTplFileWpsId +GET {{baseUrl}}form-print-config/updateTplFileWpsId?formPrintConfigTplId=1 +Token: {{token}} + + +### form-print-config/print +POST {{baseUrl}}form-print-config/print +Content-Type: application/json +Token: {{token}} + +{ + "formCode": "test", + "data": { + "sm": "项目名称1", + "tysh": "统一书号1", + "books": [ + { "ys":"1","ks": "开数1"}, + { "ys":"2","ks": "开数2"} + ], + "books2": [ + { "ys":"3","ks": "开数3"}, + { "ys":"4","ks": "开数4"} + ] + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/docs/http/FormTemplateController.http b/ruoyi-modules/ruoyi-form/docs/http/FormTemplateController.http new file mode 100644 index 000000000..facb2ed31 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/docs/http/FormTemplateController.http @@ -0,0 +1,137 @@ +### 保存表单模板信息 ,templateFields.code 一定要唯一,不然保存不上 +POST {{baseUrl}}/form/template/saveByVersion +Content-Type: application/json +Token: {{token}} + +{ + "id": 47, + "formId": 7, + "formName": "11", + "version": 8, + "templateFields": [ + { + "title": "书名", + "showTitle": "书名", + "code": "bookName", + "dbField": "bookName", + "required": true, + "show": true, + "type": "string" + }, + { + "title": "单据编号", + "showTitle": "单据编号", + "code": "orderNo", + "dbField": "orderNo", + "required": true, + "show": true, + "type": "string" + }, + { + "title": "丛书名", + "showTitle": "丛书名", + "code": "seriesName", + "dbField": "seriesName", + "required": true, + "show": true, + "type": "string" + }, + { + "title": "作者", + "showTitle": "作者", + "code": "author", + "dbField": "author", + "required": true, + "show": true, + "type": "string" + }, + { + "title": "编辑部门", + "showTitle": "编辑部门", + "code": "editorDept", + "dbField": "editorDept", + "required": true, + "show": true, + "type": "string" + }, + { + "title": "责任编辑", + "showTitle": "责任编辑", + "code": "majorEditorName", + "dbField": "majorEditorName", + "required": true, + "show": true, + "type": "string" + }, + { + "title": "中图分类", + "showTitle": "中图分类", + "code": "cnBookCategory", + "dbField": "cnBookCategory", + "required": false, + "show": true, + "type": "string" + }, + { + "title": "书稿类型", + "showTitle": "书稿类型", + "code": "bookType", + "dbField": "bookType", + "required": true, + "show": true, + "type": "string" + }, + { + "title": "稿件字数", + "showTitle": "稿件字数", + "code": "wordCount", + "dbField": "wordCount", + "required": true, + "show": true, + "type": "string" + }, + { + "title": "图表数量", + "showTitle": "图表数量", + "code": "chartCount", + "dbField": "chartCount", + "required": false, + "show": true, + "type": "string" + }, + { + "title": "书稿页数", + "showTitle": "书稿页数", + "code": "pageCount", + "dbField": "pageCount", + "required": false, + "show": true, + "type": "string" + }, + { + "title": "是否重点", + "showTitle": "是否重点", + "code": "hasImportant", + "dbField": "hasImportant", + "required": false, + "show": true, + "type": "string" + }, + { + "title": "内容简介", + "showTitle": "内容简介", + "code": "introduction", + "dbField": "introduction", + "required": false, + "show": true, + "type": "string" + } + ] +} + +### 根据ID获取表单模板 +GET {{baseUrl}}/form/template/get/3 + +### 查询相同formId下的最新的form模板 +GET {{baseUrl}}/form/template/get/maxVersion?formId=3 +Token: c3UjZGKPSFFwUiRxVEJNFaf5p2QzzPVa diff --git a/ruoyi-modules/ruoyi-form/docs/http/FormTemplateFieldController.http b/ruoyi-modules/ruoyi-form/docs/http/FormTemplateFieldController.http new file mode 100644 index 000000000..129d61f32 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/docs/http/FormTemplateFieldController.http @@ -0,0 +1,32 @@ +### 创建新的表单模板字段 +POST {{baseUrl}}/form/template-field/create +Content-Type: application/json + +{ + "templateId": 1, + "fieldName": "示例字段", + "fieldCode": "example_field", + "fieldType": "string", + "sortOrder": 1 +} + +### 根据ID获取表单模板字段 +GET {{baseUrl}}/form/template-field/get/1 + +### 获取所有表单模板字段列表 +GET {{baseUrl}}/form/template-field/list + +### 更新表单模板字段信息 +POST {{baseUrl}}/form/template-field/update/1 +Content-Type: application/json + +{ + "templateId": 1, + "fieldName": "更新后的字段", + "fieldCode": "updated_field", + "fieldType": "int", + "sortOrder": 2 +} + +### 删除表单模板字段 +POST {{baseUrl}}/form/template-field/delete/1 \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/docs/http/ModifyLogRecordController.http b/ruoyi-modules/ruoyi-form/docs/http/ModifyLogRecordController.http new file mode 100644 index 000000000..061667482 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/docs/http/ModifyLogRecordController.http @@ -0,0 +1,25 @@ +### 获取修改日志记录列表 +GET {{baseUrl}}/modify-log-record/list?entityType=test_table&entityId=1&formCode=formCode1 +Token: {{token}} + +### 批量创建修改日志记录 +POST {{baseUrl}}/modify-log-record/batchCreate +Content-Type: application/json +Token: {{token}} + +[ + { + "entityType": "test_table", + "entityId": "1", + "formCode": "formCode1", + "description": "测试修改日志", + "fieldChineseName": "字段中文名", + "fieldEnglishName": "fieldEnglishName", + "oldValue": "旧值", + "newValue": "新值", + "operator": 1001, + "operatorName": "张三", + "operationTime": "2023-05-09 10:00:00", + "serviceName": "booksflow-form" + } +] \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/docs/http/SystemDictController.http b/ruoyi-modules/ruoyi-form/docs/http/SystemDictController.http new file mode 100644 index 000000000..3a58479da --- /dev/null +++ b/ruoyi-modules/ruoyi-form/docs/http/SystemDictController.http @@ -0,0 +1,12 @@ + +### dict get +POST {{baseUrl}}form/not-agent/field-dict/get +Content-Type: application/json +Token: {{token}} + +{ + "code2": { + "parentId": null, + "level": null + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/docs/http/http-client.env.json b/ruoyi-modules/ruoyi-form/docs/http/http-client.env.json new file mode 100644 index 000000000..c0f0e13d6 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/docs/http/http-client.env.json @@ -0,0 +1,12 @@ +{ + "dev": { + "baseUrl": "http://localhost:8352/booksflow/form/v1.0/", + "token": "UwaxI6sx8Ps1SqVOZp5yOXZbSX1cl5eP" + }, + "test": { + "baseUrl": "http://test.example.com" + }, + "prod": { + "baseUrl": "https://api.example.com" + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-form/docs/init_table.sql b/ruoyi-modules/ruoyi-form/docs/init_table.sql new file mode 100644 index 000000000..0bee50740 --- /dev/null +++ b/ruoyi-modules/ruoyi-form/docs/init_table.sql @@ -0,0 +1,72 @@ +create table form +( + id bigint unsigned auto_increment comment '主键ID' + primary key, + code varchar(32) not null comment 'code', + name varchar(32) not null comment '表单名称', + agent_id bigint not null, + constraint un_code + unique (agent_id, code) +) + comment '动态表单' collate = utf8mb4_bin; + +create table form_field_dict +( + id bigint auto_increment comment '主键ID' + primary key, + config_type varchar(50) not null comment '类型:单位类型、往来单位、税率、费用分类、费用科目、仓库管理', + name varchar(100) not null comment '名称', + code varchar(100) not null comment '值', + parent_id bigint unsigned null comment '父级ID,也可以是关联的id', + other_fields json null comment '其他字段(JSON格式)', + sort_order int default 0 null comment '排序', + status tinyint default 1 not null comment '状态(1:启用,0:禁用)', + created_by bigint unsigned not null comment '创建人', + updated_by bigint unsigned null comment '更新人', + create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', + update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间', + agent_id bigint not null, + deleted tinyint default 0 not null comment '是否删除(0:否,1:是)' +) + comment '动态表单字段字典表'; + +create index idx_agent_id_config_type + on form_field_dict (agent_id, config_type); + +create table form_template +( + id bigint unsigned auto_increment comment '主键ID' + primary key, + form_id bigint unsigned not null comment 'form id', + version int not null comment '版本', + created_by bigint unsigned not null comment '创建人', + updated_by bigint unsigned null comment '更新人', + create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', + update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间', + agent_id bigint not null, + constraint un_name_version + unique (agent_id, form_id, version) +) + comment '动态表单模板' collate = utf8mb4_bin; + +create table form_template_field +( + id bigint unsigned auto_increment comment '主键ID' + primary key, + template_id bigint unsigned null comment 'form_template 的id', + code varchar(32) not null comment '编码', + title varchar(32) not null comment '标题', + show_title varchar(32) not null comment 'show标题', + type varchar(32) not null comment '字段类型', + fixed tinyint(1) not null comment '固定(0不固定,1固定)', + ext json not null comment '扩展属性(JSON格式)', + created_by bigint unsigned not null comment '创建人', + updated_by bigint unsigned null comment '更新人', + create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', + update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间', + agent_id bigint not null, + constraint un_template_id_code + unique (agent_id, template_id, code) +) + comment '动态表单模板字段' collate = utf8mb4_bin; + diff --git a/ruoyi-modules/ruoyi-form/pom.xml b/ruoyi-modules/ruoyi-form/pom.xml new file mode 100644 index 000000000..1ee9400fc --- /dev/null +++ b/ruoyi-modules/ruoyi-form/pom.xml @@ -0,0 +1,26 @@ + + + + org.dromara + ruoyi-modules + ${revision} + + 4.0.0 + + ruoyi-form + + pom + + 动态表单 + + + + booksflow-form-api + booksflow-form-mapper + booksflow-form-service + booksflow-form-starter + booksflow-form-feign + +