From 980cdbe4d76f403278246dd11ef42e8d5fd9be3f Mon Sep 17 00:00:00 2001 From: FCL Date: Thu, 11 Sep 2025 11:40:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BB=A3=E7=A0=81=E5=90=88?= =?UTF-8?q?=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 19 +- qms-server/pom.xml | 106 +-- qms-server/pom_bak.xml | 87 ++ .../qms/controller/qms/QmsController.java | 8 +- .../yudao-module-qms-api}/pom.xml | 4 +- .../module/qms/enums/ErrorCodeConstants.java | 83 ++ .../yudao-module-qms-server}/pom.xml | 63 +- .../module/qms/QmsServerApplication.java | 16 + .../admin/BusinessBaseSampleController.java | 106 +++ .../BusinessHandoverRecordSubController.java | 106 +++ .../BusinessSampleAssayResultController.java | 106 +++ ...BusinessSampleEntrustDetailController.java | 106 +++ ...usinessSampleEntrustProjectController.java | 106 +++ ...ssSampleEntrustRegistrationController.java | 107 +++ .../BusinessSubParentSampleController.java | 106 +++ .../admin/BusinessSubSampleController.java | 107 +++ .../admin/SampleEntrustController.java | 185 ++++ .../admin/SampleFlowController.java | 71 ++ .../vo/BusinessBaseSamplePageReqVO.java | 68 ++ .../vo/BusinessBaseSampleRespVO.java | 83 ++ .../vo/BusinessBaseSampleSaveReqVO.java | 75 ++ .../BusinessHandoverRecordSubPageReqVO.java | 58 ++ .../vo/BusinessHandoverRecordSubRespVO.java | 72 ++ .../BusinessHandoverRecordSubSaveReqVO.java | 63 ++ .../BusinessSampleAssayResultPageReqVO.java | 38 + .../vo/BusinessSampleAssayResultRespVO.java | 47 + .../BusinessSampleAssayResultSaveReqVO.java | 38 + ...sinessSampleEntrustDetailExtendRespVO.java | 24 + .../BusinessSampleEntrustDetailPageReqVO.java | 65 ++ .../vo/BusinessSampleEntrustDetailRespVO.java | 83 ++ .../BusinessSampleEntrustDetailSaveReqVO.java | 67 ++ ...inessSampleEntrustProjectExtendRespVO.java | 31 + ...BusinessSampleEntrustProjectPageReqVO.java | 41 + .../BusinessSampleEntrustProjectRespVO.java | 51 ++ ...BusinessSampleEntrustProjectSaveReqVO.java | 42 + ...SampleEntrustRegistrationExtendRespVO.java | 23 + ...essSampleEntrustRegistrationPageReqVO.java | 135 +++ ...sinessSampleEntrustRegistrationRespVO.java | 171 ++++ ...essSampleEntrustRegistrationSaveReqVO.java | 145 ++++ ...sSampleEntrustRegistrationSubmitReqVO.java | 33 + .../vo/BusinessSubParentSamplePageReqVO.java | 72 ++ .../vo/BusinessSubParentSampleRespVO.java | 91 ++ .../vo/BusinessSubParentSampleSaveReqVO.java | 79 ++ .../vo/BusinessSubSamplePageReqVO.java | 121 +++ .../vo/BusinessSubSampleRespVO.java | 151 ++++ .../vo/BusinessSubSampleSaveReqVO.java | 132 +++ .../dal/dataobject/BusinessBaseSampleDO.java | 113 +++ .../BusinessHandoverRecordSubDO.java | 97 +++ .../BusinessSampleAssayResultDO.java | 65 ++ .../BusinessSampleEntrustDetailDO.java | 110 +++ .../BusinessSampleEntrustProjectDO.java | 70 ++ .../BusinessSampleEntrustRegistrationDO.java | 224 +++++ .../dataobject/BusinessSubParentSampleDO.java | 121 +++ .../dal/dataobject/BusinessSubSampleDO.java | 200 +++++ .../dal/mapper/BusinessBaseSampleMapper.java | 41 + .../BusinessHandoverRecordSubMapper.java | 38 + .../BusinessSampleAssayResultMapper.java | 32 + .../BusinessSampleEntrustDetailMapper.java | 41 + .../BusinessSampleEntrustProjectMapper.java | 33 + ...sinessSampleEntrustRegistrationMapper.java | 62 ++ .../mapper/BusinessSubParentSampleMapper.java | 43 + .../dal/mapper/BusinessSubSampleMapper.java | 58 ++ .../liteflow/param/SampleEntrustDetail.java | 70 ++ .../param/SampleEntrustDetailProject.java | 36 + .../liteflow/param/SampleEntrustParam.java | 61 ++ .../bus/liteflow/param/SampleFlowParam.java | 46 + .../sample/entrust/SampleEntrustCheckCmp.java | 44 + .../entrust/SampleEntrustContextInitCmp.java | 127 +++ .../entrust/SampleEntrustCreateDataCmp.java | 112 +++ .../SampleEntrustGenSampleDataCmp.java | 27 + .../entrust/SampleEntrustIsCreateCmp.java | 34 + .../entrust/SampleEntrustUpdateDataCmp.java | 122 +++ .../flow/SampleDataSaveOrUpdateCmp.java | 58 ++ .../sample/flow/SampleFlowContextInitCmp.java | 75 ++ .../flow/SampleHandoverRecordSubCmp.java | 76 ++ .../sample/flow/SampleSubCheckCmp.java | 48 ++ .../flow/SampleSubProcessUpdateCmp.java | 67 ++ .../liteflow/slot/SampleEntrustContext.java | 91 ++ .../bus/liteflow/slot/SampleFlowContext.java | 70 ++ .../service/BusinessBaseSampleService.java | 62 ++ .../BusinessBaseSampleServiceImpl.java | 91 ++ .../BusinessHandoverRecordSubService.java | 62 ++ .../BusinessHandoverRecordSubServiceImpl.java | 91 ++ .../BusinessSampleAssayResultService.java | 62 ++ .../BusinessSampleAssayResultServiceImpl.java | 91 ++ .../BusinessSampleEntrustDetailService.java | 64 ++ ...usinessSampleEntrustDetailServiceImpl.java | 91 ++ .../BusinessSampleEntrustProjectService.java | 62 ++ ...sinessSampleEntrustProjectServiceImpl.java | 91 ++ ...inessSampleEntrustRegistrationService.java | 62 ++ ...sSampleEntrustRegistrationServiceImpl.java | 91 ++ .../BusinessSubParentSampleService.java | 62 ++ .../BusinessSubParentSampleServiceImpl.java | 91 ++ .../bus/service/BusinessSubSampleService.java | 64 ++ .../service/BusinessSubSampleServiceImpl.java | 93 ++ .../bus/service/SampleEntrustService.java | 37 + .../bus/service/SampleEntrustServiceImpl.java | 187 ++++ .../bus/service/SampleFlowService.java | 17 + .../bus/service/SampleFlowServiceImpl.java | 20 + .../admin/BaseSampleController.java | 116 +++ .../admin/ConfigAssayMethodController.java | 108 +++ .../ConfigAssayMethodProjectController.java | 108 +++ ...AssayMethodProjectParameterController.java | 108 +++ .../admin/ConfigBaseSampleController.java | 108 +++ .../admin/ConfigDocumentTypeController.java | 108 +++ .../admin/ConfigEntrustSourceController.java | 117 +++ .../admin/ConfigProjectController.java | 108 +++ .../admin/ConfigReportFieldController.java | 108 +++ .../admin/ConfigReportTemplateController.java | 629 ++++++++++++++ .../admin/ConfigReportTypeController.java | 108 +++ .../admin/ConfigSampleFlowController.java | 108 +++ .../admin/ConfigSampleReportController.java | 108 +++ .../admin/ConfigSimpleFlowCodeController.java | 108 +++ .../admin/ConfigSimpleFlowRuleController.java | 122 +++ ...ConfigStandardSampleProjectController.java | 108 +++ .../ConfigStandardSampleTypeController.java | 108 +++ .../admin/ConfigSubSampleController.java | 108 +++ .../ConfigSubSampleMethodController.java | 108 +++ .../ConfigSubSampleParentController.java | 108 +++ ...WarehouseLocationInfomationController.java | 108 +++ .../MaterialAssayStandardController.java | 146 ++++ ...MaterialAssayStandardDetailController.java | 140 +++ ...MaterialAssayStandardMethodController.java | 109 +++ .../controller/vo/BaseSamplePageReqVO.java | 44 + .../controller/vo/BaseSampleRespVO.java | 57 ++ .../controller/vo/BaseSampleSaveReqVO.java | 41 + .../vo/ConfigAssayMethodPageReqVO.java | 62 ++ .../vo/ConfigAssayMethodProjectPageReqVO.java | 62 ++ ...gAssayMethodProjectParameterPageReqVO.java | 56 ++ ...nfigAssayMethodProjectParameterRespVO.java | 71 ++ ...gAssayMethodProjectParameterSaveReqVO.java | 58 ++ .../vo/ConfigAssayMethodProjectRespVO.java | 79 ++ .../vo/ConfigAssayMethodProjectSaveReqVO.java | 64 ++ .../vo/ConfigAssayMethodRespVO.java | 79 ++ .../vo/ConfigAssayMethodSaveReqVO.java | 64 ++ .../vo/ConfigBaseSamplePageReqVO.java | 50 ++ .../controller/vo/ConfigBaseSampleRespVO.java | 63 ++ .../vo/ConfigBaseSampleSaveReqVO.java | 53 ++ .../vo/ConfigDocumentTypePageReqVO.java | 50 ++ .../vo/ConfigDocumentTypeRespVO.java | 63 ++ .../vo/ConfigDocumentTypeSaveReqVO.java | 54 ++ .../vo/ConfigEntrustSourcePageReqVO.java | 41 + .../vo/ConfigEntrustSourceReqVO.java | 52 ++ .../vo/ConfigEntrustSourceRespVO.java | 51 ++ .../vo/ConfigEntrustSourceSaveReqVO.java | 40 + .../controller/vo/ConfigProjectPageReqVO.java | 35 + .../controller/vo/ConfigProjectRespVO.java | 43 + .../controller/vo/ConfigProjectSaveReqVO.java | 33 + .../vo/ConfigReportFieldPageReqVO.java | 63 ++ .../vo/ConfigReportFieldRespVO.java | 79 ++ .../vo/ConfigReportFieldSaveReqVO.java | 69 ++ .../vo/ConfigReportTemplatePageReqVO.java | 43 + .../vo/ConfigReportTemplateRespVO.java | 54 ++ .../vo/ConfigReportTemplateSaveReqVO.java | 43 + .../vo/ConfigReportTypePageReqVO.java | 38 + .../controller/vo/ConfigReportTypeRespVO.java | 47 + .../vo/ConfigReportTypeSaveReqVO.java | 37 + .../vo/ConfigSampleFlowPageReqVO.java | 41 + .../controller/vo/ConfigSampleFlowRespVO.java | 51 ++ .../vo/ConfigSampleFlowSaveReqVO.java | 38 + .../vo/ConfigSampleReportPageReqVO.java | 41 + .../vo/ConfigSampleReportRespVO.java | 51 ++ .../vo/ConfigSampleReportSaveReqVO.java | 41 + .../vo/ConfigSimpleFlowCodePageReqVO.java | 41 + .../vo/ConfigSimpleFlowCodeReqVO.java | 43 + .../vo/ConfigSimpleFlowCodeRespVO.java | 51 ++ .../vo/ConfigSimpleFlowCodeSaveReqVO.java | 41 + .../vo/ConfigSimpleFlowRulePageReqVO.java | 44 + .../vo/ConfigSimpleFlowRuleReqVO.java | 44 + .../vo/ConfigSimpleFlowRuleRespVO.java | 55 ++ .../vo/ConfigSimpleFlowRuleSaveReqVO.java | 41 + .../ConfigStandardSampleProjectPageReqVO.java | 50 ++ .../vo/ConfigStandardSampleProjectRespVO.java | 63 ++ .../ConfigStandardSampleProjectSaveReqVO.java | 51 ++ .../vo/ConfigStandardSampleTypePageReqVO.java | 41 + .../vo/ConfigStandardSampleTypeRespVO.java | 51 ++ .../vo/ConfigStandardSampleTypeSaveReqVO.java | 42 + .../vo/ConfigSubSampleMethodPageReqVO.java | 44 + .../vo/ConfigSubSampleMethodRespVO.java | 55 ++ .../vo/ConfigSubSampleMethodSaveReqVO.java | 46 + .../vo/ConfigSubSamplePageReqVO.java | 56 ++ .../vo/ConfigSubSampleParentPageReqVO.java | 44 + .../vo/ConfigSubSampleParentRespVO.java | 55 ++ .../vo/ConfigSubSampleParentSaveReqVO.java | 45 + .../controller/vo/ConfigSubSampleRespVO.java | 71 ++ .../vo/ConfigSubSampleSaveReqVO.java | 60 ++ ...gWarehouseLocationInfomationPageReqVO.java | 38 + ...nfigWarehouseLocationInfomationRespVO.java | 47 + ...gWarehouseLocationInfomationSaveReqVO.java | 37 + .../config/controller/vo/GenReportBody.java | 50 ++ .../MaterialAssayStandardDetailPageReqVO.java | 66 ++ .../vo/MaterialAssayStandardDetailRespVO.java | 78 ++ .../MaterialAssayStandardDetailSaveReqVO.java | 65 ++ .../MaterialAssayStandardMethodPageReqVO.java | 37 + .../vo/MaterialAssayStandardMethodRespVO.java | 46 + .../MaterialAssayStandardMethodSaveReqVO.java | 36 + .../vo/MaterialAssayStandardPageReqVO.java | 52 ++ .../vo/MaterialAssayStandardRespVO.java | 68 ++ .../vo/MaterialAssayStandardSaveReqVO.java | 43 + .../config/dal/dataobject/BaseSampleDO.java | 74 ++ .../dal/dataobject/ConfigAssayMethodDO.java | 105 +++ .../ConfigAssayMethodProjectDO.java | 105 +++ .../ConfigAssayMethodProjectParameterDO.java | 95 +++ .../dal/dataobject/ConfigBaseSampleDO.java | 85 ++ .../dal/dataobject/ConfigDocumentTypeDO.java | 85 ++ .../dal/dataobject/ConfigEntrustSourceDO.java | 70 ++ .../dal/dataobject/ConfigProjectDO.java | 60 ++ .../dal/dataobject/ConfigReportFieldDO.java | 105 +++ .../dataobject/ConfigReportTemplateDO.java | 73 ++ .../dal/dataobject/ConfigReportTypeDO.java | 65 ++ .../dal/dataobject/ConfigSampleFlowDO.java | 70 ++ .../dal/dataobject/ConfigSampleReportDO.java | 70 ++ .../dataobject/ConfigSimpleFlowCodeDO.java | 70 ++ .../dataobject/ConfigSimpleFlowRuleDO.java | 75 ++ .../ConfigStandardSampleProjectDO.java | 85 ++ .../ConfigStandardSampleTypeDO.java | 70 ++ .../dal/dataobject/ConfigSubSampleDO.java | 95 +++ .../dataobject/ConfigSubSampleMethodDO.java | 75 ++ .../dataobject/ConfigSubSampleParentDO.java | 75 ++ .../ConfigWarehouseLocationInfomationDO.java | 65 ++ .../dataobject/MaterialAssayStandardDO.java | 60 ++ .../MaterialAssayStandardDetailDO.java | 90 ++ .../MaterialAssayStandardDetailExtendDO.java | 27 + .../MaterialAssayStandardExtendDO.java | 34 + .../MaterialAssayStandardMethodDO.java | 62 ++ .../config/dal/mapper/BaseSampleMapper.java | 35 + .../dal/mapper/ConfigAssayMethodMapper.java | 40 + .../ConfigAssayMethodProjectMapper.java | 40 + ...nfigAssayMethodProjectParameterMapper.java | 38 + .../dal/mapper/ConfigBaseSampleMapper.java | 36 + .../dal/mapper/ConfigDocumentTypeMapper.java | 36 + .../dal/mapper/ConfigEntrustSourceMapper.java | 46 + .../dal/mapper/ConfigProjectMapper.java | 31 + .../dal/mapper/ConfigReportFieldMapper.java | 40 + .../mapper/ConfigReportTemplateMapper.java | 32 + .../dal/mapper/ConfigReportTypeMapper.java | 32 + .../dal/mapper/ConfigSampleFlowMapper.java | 38 + .../dal/mapper/ConfigSampleReportMapper.java | 33 + .../mapper/ConfigSimpleFlowCodeMapper.java | 48 ++ .../mapper/ConfigSimpleFlowRuleMapper.java | 44 + .../ConfigStandardSampleProjectMapper.java | 36 + .../ConfigStandardSampleTypeMapper.java | 33 + .../dal/mapper/ConfigSubSampleMapper.java | 38 + .../mapper/ConfigSubSampleMethodMapper.java | 34 + .../mapper/ConfigSubSampleParentMapper.java | 34 + ...nfigWarehouseLocationInfomationMapper.java | 32 + .../MaterialAssayStandardDetailMapper.java | 42 + .../mapper/MaterialAssayStandardMapper.java | 41 + .../MaterialAssayStandardMethodMapper.java | 30 + .../config/service/BaseSampleService.java | 66 ++ .../config/service/BaseSampleServiceImpl.java | 95 +++ ...figAssayMethodProjectParameterService.java | 62 ++ ...ssayMethodProjectParameterServiceImpl.java | 89 ++ .../ConfigAssayMethodProjectService.java | 62 ++ .../ConfigAssayMethodProjectServiceImpl.java | 89 ++ .../service/ConfigAssayMethodService.java | 62 ++ .../service/ConfigAssayMethodServiceImpl.java | 89 ++ .../service/ConfigBaseSampleService.java | 62 ++ .../service/ConfigBaseSampleServiceImpl.java | 89 ++ .../service/ConfigDocumentTypeService.java | 62 ++ .../ConfigDocumentTypeServiceImpl.java | 89 ++ .../service/ConfigEntrustSourceService.java | 70 ++ .../ConfigEntrustSourceServiceImpl.java | 96 +++ .../config/service/ConfigProjectService.java | 62 ++ .../service/ConfigProjectServiceImpl.java | 89 ++ .../service/ConfigReportFieldService.java | 62 ++ .../service/ConfigReportFieldServiceImpl.java | 89 ++ .../service/ConfigReportTemplateService.java | 66 ++ .../ConfigReportTemplateServiceImpl.java | 99 +++ .../service/ConfigReportTypeService.java | 62 ++ .../service/ConfigReportTypeServiceImpl.java | 89 ++ .../service/ConfigSampleFlowService.java | 64 ++ .../service/ConfigSampleFlowServiceImpl.java | 97 +++ .../service/ConfigSampleReportService.java | 62 ++ .../ConfigSampleReportServiceImpl.java | 89 ++ .../service/ConfigSimpleFlowCodeService.java | 78 ++ .../ConfigSimpleFlowCodeServiceImpl.java | 116 +++ .../service/ConfigSimpleFlowRuleService.java | 78 ++ .../ConfigSimpleFlowRuleServiceImpl.java | 117 +++ .../ConfigStandardSampleProjectService.java | 62 ++ ...onfigStandardSampleProjectServiceImpl.java | 89 ++ .../ConfigStandardSampleTypeService.java | 62 ++ .../ConfigStandardSampleTypeServiceImpl.java | 89 ++ .../service/ConfigSubSampleMethodService.java | 62 ++ .../ConfigSubSampleMethodServiceImpl.java | 89 ++ .../service/ConfigSubSampleParentService.java | 62 ++ .../ConfigSubSampleParentServiceImpl.java | 89 ++ .../service/ConfigSubSampleService.java | 62 ++ .../service/ConfigSubSampleServiceImpl.java | 89 ++ ...figWarehouseLocationInfomationService.java | 62 ++ ...arehouseLocationInfomationServiceImpl.java | 89 ++ .../MaterialAssayStandardDetailService.java | 70 ++ ...aterialAssayStandardDetailServiceImpl.java | 114 +++ .../MaterialAssayStandardMethodService.java | 64 ++ ...aterialAssayStandardMethodServiceImpl.java | 92 ++ .../service/MaterialAssayStandardService.java | 70 ++ .../MaterialAssayStandardServiceImpl.java | 111 +++ .../admin/DictionaryParameterController.java | 105 +++ .../admin/DictionaryProjectController.java | 105 +++ .../DictionarySampleFlowNodeController.java | 105 +++ .../admin/DictionarySampleTypeController.java | 105 +++ .../vo/DictionaryParameterPageReqVO.java | 59 ++ .../vo/DictionaryParameterRespVO.java | 75 ++ .../vo/DictionaryParameterSaveReqVO.java | 60 ++ .../vo/DictionaryProjectPageReqVO.java | 47 + .../vo/DictionaryProjectRespVO.java | 59 ++ .../vo/DictionaryProjectSaveReqVO.java | 45 + .../vo/DictionarySampleFlowNodePageReqVO.java | 44 + .../vo/DictionarySampleFlowNodeRespVO.java | 54 ++ .../vo/DictionarySampleFlowNodeSaveReqVO.java | 41 + .../vo/DictionarySampleTypePageReqVO.java | 35 + .../vo/DictionarySampleTypeRespVO.java | 43 + .../vo/DictionarySampleTypeSaveReqVO.java | 34 + .../dal/dataobject/DictionaryParameterDO.java | 97 +++ .../dal/dataobject/DictionaryProjectDO.java | 77 ++ .../DictionarySampleFlowNodeDO.java | 72 ++ .../dataobject/DictionarySampleTypeDO.java | 57 ++ .../dal/mapper/DictionaryParameterMapper.java | 37 + .../dal/mapper/DictionaryProjectMapper.java | 32 + .../DictionarySampleFlowNodeMapper.java | 30 + .../mapper/DictionarySampleTypeMapper.java | 29 + .../service/DictionaryParameterService.java | 64 ++ .../DictionaryParameterServiceImpl.java | 89 ++ .../dic/service/DictionaryProjectService.java | 64 ++ .../service/DictionaryProjectServiceImpl.java | 89 ++ .../DictionarySampleFlowNodeService.java | 64 ++ .../DictionarySampleFlowNodeServiceImpl.java | 89 ++ .../service/DictionarySampleTypeService.java | 64 ++ .../DictionarySampleTypeServiceImpl.java | 89 ++ .../admin/DataCollectionController.java | 129 +++ .../admin/DataCollectionFieldController.java | 104 +++ .../vo/DataCollectionFieldPageReqVO.java | 47 + .../vo/DataCollectionFieldRespVO.java | 59 ++ .../vo/DataCollectionFieldSaveReqVO.java | 45 + .../vo/DataCollectionPageReqVO.java | 74 ++ .../controller/vo/DataCollectionRespVO.java | 95 +++ .../vo/DataCollectionSaveReqVO.java | 84 ++ .../data/dal/dataobject/DataCollectionDO.java | 122 +++ .../dal/dataobject/DataCollectionFieldDO.java | 78 ++ .../dal/mapper/DataCollectionFieldMapper.java | 33 + .../data/dal/mapper/DataCollectionMapper.java | 50 ++ .../service/DataCollectionFieldService.java | 72 ++ .../DataCollectionFieldServiceImpl.java | 136 +++ .../data/service/DataCollectionService.java | 79 ++ .../service/DataCollectionServiceImpl.java | 236 +++++ .../admin/DictionaryBusinessController.java | 142 ++++ .../vo/DictionaryBusinessPageReqVO.java | 50 ++ .../vo/DictionaryBusinessRespVO.java | 63 ++ .../vo/DictionaryBusinessSaveReqVO.java | 43 + .../dal/dataobject/DictionaryBusinessDO.java | 82 ++ .../dal/mapper/DictionaryBusinessMapper.java | 57 ++ .../service/DictionaryBusinessService.java | 100 +++ .../DictionaryBusinessServiceImpl.java | 397 +++++++++ .../module/qms/core/aspect/DictAspect.java | 397 +++++++++ .../qms/core/aspect/annotation/Dict.java | 22 + .../module/qms/core/code/CodeGenUtil.java | 252 ++++++ .../qms/core/code/SampleEncryptUtil.java | 57 ++ .../module/qms/core/code/SequenceUtil.java | 58 ++ .../qms/core/constant/CacheConstant.java | 8 + .../qms/core/constant/CommonConstant.java | 78 ++ .../qms/core/constant/DataTypeConstant.java | 21 + .../qms/core/constant/SymbolConstant.java | 114 +++ .../module/qms/core/legend/LegendApi.java | 83 ++ .../qms/core/legend/LegendConvertUtils.java | 804 ++++++++++++++++++ .../qms/core/legend/SqlInjectionUtil.java | 344 ++++++++ .../AbstractQueryBlackListHandler.java | 241 ++++++ .../security/DictQueryBlackListHandler.java | 80 ++ .../module/qms/core/legend/vo/DictModel.java | 41 + .../qms/core/legend/vo/DictModelMany.java | 19 + .../core/liteflow/cmp/DefaultNoHandleCmp.java | 25 + .../constant/QmsXmlFlowElParserConstant.java | 16 + .../handler/LoderLiteFlowHandler.java | 33 + .../handler/RedisLiteFlowMessage.java | 23 + .../liteflow/parser/QmsXmlFlowELParser.java | 80 ++ .../core/sampleflow/SampleFlowDefinition.java | 34 + .../qms/core/sampleflow/SampleFlowNode.java | 38 + .../qms/framework/gridreport/GridReport.java | 188 ++++ .../qms/framework/gridreport/PdfHelper.java | 144 ++++ .../gridreport/config/GridReportConfig.java | 27 + .../exception/GridReportException.java | 37 + .../rpc/config/RpcConfiguration.java | 12 + .../qms/framework/rpc/package-info.java | 4 + .../config/SecurityConfiguration.java | 6 +- .../iocoder/yudao/module/qms/manage/deleteme | 0 .../iocoder/yudao/module/qms/office/deleteme | 0 .../yudao/module/qms/resource/deleteme | 0 .../src/main/resources/application-dev.yaml | 176 ++++ .../src/main/resources/application-local.yaml | 208 +++++ .../src/main/resources/application.yaml | 57 +- .../dal/mapper/BusinessBaseSampleMapper.xml | 12 + .../BusinessHandoverRecordSubMapper.xml | 12 + .../BusinessSampleAssayResultMapper.xml | 12 + .../BusinessSampleEntrustDetailMapper.xml | 12 + .../BusinessSampleEntrustProjectMapper.xml | 12 + ...usinessSampleEntrustRegistrationMapper.xml | 12 + .../mapper/BusinessSubParentSampleMapper.xml | 12 + .../dal/mapper/BusinessSubSampleMapper.xml | 12 + .../config/dal/mapper/BaseSampleMapper.xml | 29 + .../dal/mapper/ConfigAssayMethodMapper.xml | 12 + .../mapper/ConfigAssayMethodProjectMapper.xml | 12 + ...onfigAssayMethodProjectParameterMapper.xml | 12 + .../dal/mapper/ConfigBaseSampleMapper.xml | 12 + .../dal/mapper/ConfigDocumentTypeMapper.xml | 12 + .../dal/mapper/ConfigEntrustSourceMapper.xml | 12 + .../config/dal/mapper/ConfigProjectMapper.xml | 12 + .../dal/mapper/ConfigReportFieldMapper.xml | 12 + .../dal/mapper/ConfigReportTemplateMapper.xml | 12 + .../dal/mapper/ConfigReportTypeMapper.xml | 12 + .../dal/mapper/ConfigSampleFlowMapper.xml | 12 + .../dal/mapper/ConfigSampleReportMapper.xml | 12 + .../dal/mapper/ConfigSimpleFlowCodeMapper.xml | 12 + .../dal/mapper/ConfigSimpleFlowRuleMapper.xml | 12 + .../ConfigStandardSampleProjectMapper.xml | 12 + .../mapper/ConfigStandardSampleTypeMapper.xml | 12 + .../dal/mapper/ConfigSubSampleMapper.xml | 12 + .../mapper/ConfigSubSampleMethodMapper.xml | 12 + .../mapper/ConfigSubSampleParentMapper.xml | 12 + ...onfigWarehouseLocationInfomationMapper.xml | 12 + .../MaterialAssayStandardDetailMapper.xml | 52 ++ .../mapper/MaterialAssayStandardMapper.xml | 39 + .../MaterialAssayStandardMethodMapper.xml | 12 + .../dal/mapper/DictionaryParameterMapper.xml | 12 + .../dal/mapper/DictionaryProjectMapper.xml | 12 + .../mapper/DictionarySampleFlowNodeMapper.xml | 12 + .../dal/mapper/DictionarySampleTypeMapper.xml | 12 + .../dal/mapper/DataCollectionFieldMapper.xml | 12 + .../data/dal/mapper/DataCollectionMapper.xml | 12 + .../dal/mapper/DictionaryBusinessMapper.xml | 43 + .../iocoder/yudao/module/qms/manage/deleteme | 0 .../iocoder/yudao/module/qms/office/deleteme | 0 .../yudao/module/qms/resource/deleteme | 0 .../src/main/resources/logback-spring.xml | 76 ++ yudao-dependencies/pom.xml | 734 ++++++++++++++++ yudao-module-jy-business/pom.xml | 24 - .../yudao-module-jy-business-api/pom.xml | 46 - .../jybusiness/enums/ErrorCodeConstants.java | 17 - .../yudao-module-jy-business-server/pom.xml | 151 ---- .../JyBusinessServerApplication.java | 18 - .../jybusiness/JyBusinessController.java | 29 - .../rpc/config/RpcConfiguration.java | 10 - .../config/SecurityConfiguration.java | 40 - .../src/main/resources/application-dev.yml | 107 --- .../src/main/resources/application-local.yml | 97 --- .../src/main/resources/application.yml | 123 --- yudao-module-jy-iot/pom.xml | 24 - .../jyiot/enums/ErrorCodeConstants.java | 17 - .../yudao-module-jy-iot-server/pom.xml | 151 ---- .../module/jyiot/JyIotServerApplication.java | 18 - .../admin/jyiot/JyIotController.java | 29 - .../rpc/config/RpcConfiguration.java | 10 - .../src/main/resources/application-dev.yml | 107 --- .../src/main/resources/application-local.yml | 97 --- .../src/main/resources/application.yml | 123 --- yudao-module-jy-manage/pom.xml | 24 - .../yudao-module-jy-manage-api/pom.xml | 46 - .../jymanage/enums/ErrorCodeConstants.java | 17 - .../yudao-module-jy-manage-server/pom.xml | 151 ---- .../jymanage/JyManageServerApplication.java | 18 - .../admin/jymanage/JyManageController.java | 29 - .../rpc/config/RpcConfiguration.java | 10 - .../config/SecurityConfiguration.java | 40 - .../src/main/resources/application-dev.yml | 107 --- .../src/main/resources/application-local.yml | 97 --- yudao-module-jy-office/pom.xml | 24 - .../yudao-module-jy-office-api/pom.xml | 46 - .../jyoffice/enums/ErrorCodeConstants.java | 17 - .../yudao-module-jy-office-server/pom.xml | 151 ---- .../jyoffice/JyOfficeServerApplication.java | 18 - .../admin/jyoffice/JyOfficeController.java | 29 - .../rpc/config/RpcConfiguration.java | 10 - .../config/SecurityConfiguration.java | 40 - .../src/main/resources/application-dev.yml | 107 --- .../src/main/resources/application-local.yml | 97 --- .../src/main/resources/application.yml | 123 --- yudao-module-jy-report/pom.xml | 24 - .../yudao-module-jy-report-api/pom.xml | 46 - .../jyreport/enums/ErrorCodeConstants.java | 17 - .../yudao-module-jy-report-server/pom.xml | 151 ---- .../jyreport/JyReportServerApplication.java | 18 - .../admin/jyreport/JyReportController.java | 29 - .../rpc/config/RpcConfiguration.java | 10 - .../config/SecurityConfiguration.java | 40 - .../src/main/resources/application-dev.yml | 107 --- .../src/main/resources/application-local.yml | 97 --- .../src/main/resources/application.yml | 123 --- yudao-module-jy-resource/pom.xml | 24 - .../yudao-module-jy-resource-api/pom.xml | 46 - .../jyresource/enums/ErrorCodeConstants.java | 17 - .../JyResourceServerApplication.java | 18 - .../jyresource/JyResourceController.java | 29 - .../rpc/config/RpcConfiguration.java | 10 - .../config/SecurityConfiguration.java | 40 - .../src/main/resources/application-dev.yml | 107 --- .../src/main/resources/application-local.yml | 97 --- .../src/main/resources/application.yml | 123 --- 495 files changed, 30792 insertions(+), 3745 deletions(-) create mode 100644 qms-server/pom_bak.xml rename {yudao-module-jy-iot/yudao-module-jy-iot-api => qms-server/yudao-module-qms-api}/pom.xml (93%) create mode 100644 qms-server/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/enums/ErrorCodeConstants.java rename {yudao-module-jy-resource/yudao-module-jy-resource-server => qms-server/yudao-module-qms-server}/pom.xml (71%) create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/QmsServerApplication.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessBaseSampleController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessHandoverRecordSubController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleAssayResultController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustDetailController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustProjectController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustRegistrationController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubParentSampleController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubSampleController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/SampleEntrustController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/SampleFlowController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSamplePageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSampleRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSampleSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailExtendRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectExtendRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationExtendRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationSubmitReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSamplePageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSampleRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSampleSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSamplePageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessBaseSampleDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessHandoverRecordSubDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleAssayResultDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustDetailDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustProjectDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustRegistrationDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubParentSampleDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubSampleDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessBaseSampleMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessHandoverRecordSubMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleAssayResultMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustProjectMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustRegistrationMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubParentSampleMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustDetail.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustDetailProject.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustParam.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleFlowParam.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustCheckCmp.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustContextInitCmp.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustCreateDataCmp.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustGenSampleDataCmp.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustIsCreateCmp.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustUpdateDataCmp.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleDataSaveOrUpdateCmp.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleFlowContextInitCmp.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleHandoverRecordSubCmp.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubCheckCmp.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubProcessUpdateCmp.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/slot/SampleEntrustContext.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/slot/SampleFlowContext.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessBaseSampleService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessBaseSampleServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessHandoverRecordSubService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessHandoverRecordSubServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleAssayResultService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleAssayResultServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustDetailService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustDetailServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustProjectService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustProjectServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustRegistrationService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustRegistrationServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubParentSampleService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubParentSampleServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleEntrustService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleEntrustServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleFlowService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleFlowServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/BaseSampleController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodProjectController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodProjectParameterController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigBaseSampleController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigDocumentTypeController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigEntrustSourceController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigProjectController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportFieldController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportTemplateController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportTypeController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleFlowController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleReportController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSimpleFlowCodeController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSimpleFlowRuleController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigStandardSampleProjectController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigStandardSampleTypeController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleMethodController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleParentController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigWarehouseLocationInfomationController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardDetailController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardMethodController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSamplePageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSampleRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSampleSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSamplePageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSampleRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSampleSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypePageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypeRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypeSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourcePageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplatePageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplateRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplateSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypePageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypeRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypeSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodePageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRulePageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypePageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypeRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypeSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSamplePageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/GenReportBody.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/BaseSampleDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodProjectDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodProjectParameterDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigBaseSampleDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigDocumentTypeDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigEntrustSourceDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigProjectDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportFieldDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportTemplateDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportTypeDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleFlowDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleReportDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSimpleFlowCodeDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSimpleFlowRuleDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigStandardSampleProjectDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigStandardSampleTypeDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleMethodDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleParentDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigWarehouseLocationInfomationDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDetailDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDetailExtendDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardExtendDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardMethodDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/BaseSampleMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectParameterMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigBaseSampleMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigDocumentTypeMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigProjectMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportFieldMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTemplateMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTypeMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleFlowMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleReportMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowCodeMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowRuleMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleProjectMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleTypeMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMethodMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleParentMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigWarehouseLocationInfomationMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardDetailMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/BaseSampleService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/BaseSampleServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectParameterService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectParameterServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigBaseSampleService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigBaseSampleServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigDocumentTypeService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigDocumentTypeServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigEntrustSourceService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigEntrustSourceServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigProjectService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigProjectServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportFieldService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportFieldServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTemplateService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTemplateServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTypeService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTypeServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleFlowService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleFlowServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleReportService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleReportServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowCodeService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowCodeServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowRuleService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowRuleServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleProjectService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleProjectServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleTypeService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleTypeServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleMethodService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleMethodServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleParentService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleParentServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigWarehouseLocationInfomationService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigWarehouseLocationInfomationServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardDetailService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardDetailServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardMethodService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardMethodServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionaryParameterController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionaryProjectController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionarySampleFlowNodeController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionarySampleTypeController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodePageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodeRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodeSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypePageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypeRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypeSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionaryParameterDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionaryProjectDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionarySampleFlowNodeDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionarySampleTypeDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryParameterMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryProjectMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleFlowNodeMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleTypeMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryParameterService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryParameterServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryProjectService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryProjectServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleFlowNodeService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleFlowNodeServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleTypeService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleTypeServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataCollectionController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataCollectionFieldController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataCollectionDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataCollectionFieldDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionFieldMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionFieldService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionFieldServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/admin/DictionaryBusinessController.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessPageReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessRespVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessSaveReqVO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/dal/dataobject/DictionaryBusinessDO.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/dal/mapper/DictionaryBusinessMapper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/service/DictionaryBusinessService.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/service/DictionaryBusinessServiceImpl.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/aspect/DictAspect.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/aspect/annotation/Dict.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/CodeGenUtil.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/SampleEncryptUtil.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/SequenceUtil.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/CacheConstant.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/CommonConstant.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/DataTypeConstant.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/SymbolConstant.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/LegendApi.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/LegendConvertUtils.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/SqlInjectionUtil.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/security/AbstractQueryBlackListHandler.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/security/DictQueryBlackListHandler.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/vo/DictModel.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/vo/DictModelMany.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/cmp/DefaultNoHandleCmp.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/constant/QmsXmlFlowElParserConstant.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/handler/LoderLiteFlowHandler.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/handler/RedisLiteFlowMessage.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/parser/QmsXmlFlowELParser.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/sampleflow/SampleFlowDefinition.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/sampleflow/SampleFlowNode.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/GridReport.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/PdfHelper.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/config/GridReportConfig.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/exception/GridReportException.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/rpc/config/RpcConfiguration.java create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/rpc/package-info.java rename {yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot => qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms}/framework/security/config/SecurityConfiguration.java (91%) create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/manage/deleteme create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/office/deleteme create mode 100644 qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/resource/deleteme create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/application-dev.yaml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/application-local.yaml rename yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application.yml => qms-server/yudao-module-qms-server/src/main/resources/application.yaml (66%) create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessBaseSampleMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessHandoverRecordSubMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleAssayResultMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustProjectMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustRegistrationMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubParentSampleMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/BaseSampleMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectParameterMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigBaseSampleMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigDocumentTypeMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigProjectMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportFieldMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTemplateMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTypeMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleFlowMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleReportMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowCodeMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowRuleMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleProjectMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleTypeMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMethodMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleParentMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigWarehouseLocationInfomationMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardDetailMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryParameterMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryProjectMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleFlowNodeMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleTypeMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionFieldMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/dic/dal/mapper/DictionaryBusinessMapper.xml create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/manage/deleteme create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/office/deleteme create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/resource/deleteme create mode 100644 qms-server/yudao-module-qms-server/src/main/resources/logback-spring.xml create mode 100644 yudao-dependencies/pom.xml delete mode 100644 yudao-module-jy-business/pom.xml delete mode 100644 yudao-module-jy-business/yudao-module-jy-business-api/pom.xml delete mode 100644 yudao-module-jy-business/yudao-module-jy-business-api/src/main/java/cn/iocoder/yudao/module/jybusiness/enums/ErrorCodeConstants.java delete mode 100644 yudao-module-jy-business/yudao-module-jy-business-server/pom.xml delete mode 100644 yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/JyBusinessServerApplication.java delete mode 100644 yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/controller/admin/jybusiness/JyBusinessController.java delete mode 100644 yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/rpc/config/RpcConfiguration.java delete mode 100644 yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/security/config/SecurityConfiguration.java delete mode 100644 yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application-dev.yml delete mode 100644 yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application-local.yml delete mode 100644 yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application.yml delete mode 100644 yudao-module-jy-iot/pom.xml delete mode 100644 yudao-module-jy-iot/yudao-module-jy-iot-api/src/main/java/cn/iocoder/yudao/module/jyiot/enums/ErrorCodeConstants.java delete mode 100644 yudao-module-jy-iot/yudao-module-jy-iot-server/pom.xml delete mode 100644 yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/JyIotServerApplication.java delete mode 100644 yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/controller/admin/jyiot/JyIotController.java delete mode 100644 yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/framework/rpc/config/RpcConfiguration.java delete mode 100644 yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application-dev.yml delete mode 100644 yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application-local.yml delete mode 100644 yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application.yml delete mode 100644 yudao-module-jy-manage/pom.xml delete mode 100644 yudao-module-jy-manage/yudao-module-jy-manage-api/pom.xml delete mode 100644 yudao-module-jy-manage/yudao-module-jy-manage-api/src/main/java/cn/iocoder/yudao/module/jymanage/enums/ErrorCodeConstants.java delete mode 100644 yudao-module-jy-manage/yudao-module-jy-manage-server/pom.xml delete mode 100644 yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/JyManageServerApplication.java delete mode 100644 yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/controller/admin/jymanage/JyManageController.java delete mode 100644 yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/framework/rpc/config/RpcConfiguration.java delete mode 100644 yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/framework/security/config/SecurityConfiguration.java delete mode 100644 yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application-dev.yml delete mode 100644 yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application-local.yml delete mode 100644 yudao-module-jy-office/pom.xml delete mode 100644 yudao-module-jy-office/yudao-module-jy-office-api/pom.xml delete mode 100644 yudao-module-jy-office/yudao-module-jy-office-api/src/main/java/cn/iocoder/yudao/module/jyoffice/enums/ErrorCodeConstants.java delete mode 100644 yudao-module-jy-office/yudao-module-jy-office-server/pom.xml delete mode 100644 yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/JyOfficeServerApplication.java delete mode 100644 yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/controller/admin/jyoffice/JyOfficeController.java delete mode 100644 yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/framework/rpc/config/RpcConfiguration.java delete mode 100644 yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/framework/security/config/SecurityConfiguration.java delete mode 100644 yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application-dev.yml delete mode 100644 yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application-local.yml delete mode 100644 yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application.yml delete mode 100644 yudao-module-jy-report/pom.xml delete mode 100644 yudao-module-jy-report/yudao-module-jy-report-api/pom.xml delete mode 100644 yudao-module-jy-report/yudao-module-jy-report-api/src/main/java/cn/iocoder/yudao/module/jyreport/enums/ErrorCodeConstants.java delete mode 100644 yudao-module-jy-report/yudao-module-jy-report-server/pom.xml delete mode 100644 yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/JyReportServerApplication.java delete mode 100644 yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/controller/admin/jyreport/JyReportController.java delete mode 100644 yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/framework/rpc/config/RpcConfiguration.java delete mode 100644 yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/framework/security/config/SecurityConfiguration.java delete mode 100644 yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application-dev.yml delete mode 100644 yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application-local.yml delete mode 100644 yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application.yml delete mode 100644 yudao-module-jy-resource/pom.xml delete mode 100644 yudao-module-jy-resource/yudao-module-jy-resource-api/pom.xml delete mode 100644 yudao-module-jy-resource/yudao-module-jy-resource-api/src/main/java/cn/iocoder/yudao/module/jyresource/enums/ErrorCodeConstants.java delete mode 100644 yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/JyResourceServerApplication.java delete mode 100644 yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/controller/admin/jyresource/JyResourceController.java delete mode 100644 yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/framework/rpc/config/RpcConfiguration.java delete mode 100644 yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/framework/security/config/SecurityConfiguration.java delete mode 100644 yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application-dev.yml delete mode 100644 yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application-local.yml delete mode 100644 yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application.yml diff --git a/pom.xml b/pom.xml index 7ef1892..71dc209 100644 --- a/pom.xml +++ b/pom.xml @@ -8,12 +8,7 @@ ${revision} pom - yudao-module-jy-business - yudao-module-jy-manage - yudao-module-jy-resource - yudao-module-jy-office - yudao-module-jy-report - yudao-module-jy-iot + yudao-dependencies qms-server @@ -155,7 +150,6 @@ aliyun https://maven.aliyun.com/repository/public - spring-milestones Spring Milestones @@ -176,9 +170,14 @@ ZT 中铜 ZStack 私服 http://172.16.46.63:30708/repository/maven-hosted/ - - false - + + + + + + zzjc-release + Release Repository + https://nexus.will-way.cn/repository/zzjc-releases/ diff --git a/qms-server/pom.xml b/qms-server/pom.xml index e0728e7..8e5bd71 100644 --- a/qms-server/pom.xml +++ b/qms-server/pom.xml @@ -9,109 +9,13 @@ 4.0.0 qms-server - jar + pom qms-server Qms 服务器 - - - - cn.iocoder.cloud - yudao-module-system-api - ${revision} - - - cn.iocoder.cloud - yudao-module-infra-api - ${revision} - - - cn.iocoder.cloud - yudao-module-jy-business-server - ${revision} - - - cn.iocoder.cloud - yudao-module-jy-manage-server - ${revision} - - - cn.iocoder.cloud - yudao-module-jy-resource-server - ${revision} - - - cn.iocoder.cloud - yudao-module-jy-office-server - ${revision} - - - cn.iocoder.cloud - yudao-module-jy-report-server - ${revision} - - - cn.iocoder.cloud - yudao-module-jy-iot-server - ${revision} - - - org.springframework.boot - spring-boot-configuration-processor - true - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-protection - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-discovery - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-config - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-rpc - - - - org.springframework.cloud - spring-cloud-starter-openfeign - - - - - - - - - ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - - + + yudao-module-qms-api + yudao-module-qms-server + diff --git a/qms-server/pom_bak.xml b/qms-server/pom_bak.xml new file mode 100644 index 0000000..5c73c8d --- /dev/null +++ b/qms-server/pom_bak.xml @@ -0,0 +1,87 @@ + + + + cn.iocoder.cloud + dsc-qms + ${revision} + + 4.0.0 + qms-server + jar + + qms-server + Qms 服务器 + + + + cn.iocoder.cloud + yudao-module-system-api + ${revision} + + + cn.iocoder.cloud + yudao-module-infra-api + ${revision} + + + org.springframework.boot + spring-boot-configuration-processor + true + + + + + cn.iocoder.cloud + yudao-spring-boot-starter-protection + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + + cn.iocoder.cloud + yudao-spring-boot-starter-rpc + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + + + + + + + ${project.artifactId} + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + + + repackage + + + + + + + + diff --git a/qms-server/src/main/java/cn/iocoder/yudao/qms/controller/qms/QmsController.java b/qms-server/src/main/java/cn/iocoder/yudao/qms/controller/qms/QmsController.java index 1d44c2c..eeffb7d 100644 --- a/qms-server/src/main/java/cn/iocoder/yudao/qms/controller/qms/QmsController.java +++ b/qms-server/src/main/java/cn/iocoder/yudao/qms/controller/qms/QmsController.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.qms.controller.qms; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; +//import io.swagger.v3.oas.annotations.Operation; +//import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -15,13 +15,13 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; * * @author ZT */ -@Tag(name = "qms") +//@Tag(name = "qms") @RestController @RequestMapping("/qms") public class QmsController { @GetMapping("/hello") - @Operation(summary = "Hello qms") +// @Operation(summary = "Hello qms") public CommonResult hello() { return success("Hello, qms!"); } diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-api/pom.xml b/qms-server/yudao-module-qms-api/pom.xml similarity index 93% rename from yudao-module-jy-iot/yudao-module-jy-iot-api/pom.xml rename to qms-server/yudao-module-qms-api/pom.xml index c5fd837..2b66828 100644 --- a/yudao-module-jy-iot/yudao-module-jy-iot-api/pom.xml +++ b/qms-server/yudao-module-qms-api/pom.xml @@ -3,12 +3,12 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - yudao-module-jy-iot + qms-server cn.iocoder.cloud ${revision} 4.0.0 - yudao-module-jy-iot-api + yudao-module-qms-api jar ${project.artifactId} diff --git a/qms-server/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/enums/ErrorCodeConstants.java b/qms-server/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/enums/ErrorCodeConstants.java new file mode 100644 index 0000000..b52825b --- /dev/null +++ b/qms-server/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/enums/ErrorCodeConstants.java @@ -0,0 +1,83 @@ +package cn.iocoder.yudao.module.qms.enums; + +import cn.iocoder.yudao.framework.common.exception.ErrorCode; + +/** + * ErrorCodeConstants + * 错误码枚举类 + * qms 系统,使用 1_200_000_000 段 + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年8月29日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年8月28日 + */ +public interface ErrorCodeConstants { + + /*==============================common===============================*/ + ErrorCode MISS_PARAMETER = new ErrorCode(500, "缺少参数"); + ErrorCode SQL_INJECTION_EXCEPTION = new ErrorCode(500, "表名不合法,存在SQL注入风险,联系管理员处理"); + + ErrorCode DATA_COLLECTION_NOT_EXISTS = new ErrorCode(1_200_000_000, "数据集不存在"); + ErrorCode DATA_COLLECTION_CLASSIFY_DUPLICATE = new ErrorCode(500, "分类名称重复,请重新输入"); + ErrorCode DATA_COLLECTION_CLASSIFY_PARENT_ERROR = new ErrorCode(800, "上级分类不能设置为当前分类及其的后代分类"); + ErrorCode DATA_COLLECTION_FIELD_NOT_EXISTS = new ErrorCode(1_200_000_000, "数据集字段不存在"); + + ErrorCode DICTIONARY_BUSINESS_NOT_EXISTS = new ErrorCode(500, "业务参数字典不存在"); + + ErrorCode DICTIONARY_BUSINESS_DATA_MORE_THAN_ONE = new ErrorCode(500, "业务参数字典[数据]key重名,请联系管理员处理!"); + ErrorCode DICTIONARY_BUSINESS_CATEGORY_MORE_THAN_ONE = new ErrorCode(500, "业务参数字典[分类]key重名,请联系管理员处理!"); + ErrorCode DICTIONARY_BUSINESS_CLASSIFY_DUPLICATE = new ErrorCode(500, "分类名称重复,请重新输入"); + + + /*==============================config===============================*/ + ErrorCode CONFIG_REPORT_TEMPLATE_NOT_EXISTS = new ErrorCode(1_200_000_000, "报表模版配置不存在"); + ErrorCode CONFIG_ASSAY_METHOD_NOT_EXISTS = new ErrorCode(1_200_000_000, "检测方法配置不存在"); + ErrorCode CONFIG_ASSAY_METHOD_PROJECT_NOT_EXISTS = new ErrorCode(1_200_000_000, "检测方法分析项目配置不存在"); + ErrorCode CONFIG_REPORT_FIELD_NOT_EXISTS = new ErrorCode(1_200_000_000, "报表字段配置不存在"); + ErrorCode CONFIG_STANDARD_SAMPLE_TYPE_NOT_EXISTS = new ErrorCode(1_200_000_000, "标准样类型配置不存在"); + ErrorCode CONFIG_STANDARD_SAMPLE_PROJECT_NOT_EXISTS = new ErrorCode(1_200_000_000, "标准样检测项目配置不存在"); + ErrorCode CONFIG_SUB_SAMPLE_PARENT_NOT_EXISTS = new ErrorCode(1_200_000_000, "分样配置不存在"); + ErrorCode CONFIG_SUB_SAMPLE_METHOD_NOT_EXISTS = new ErrorCode(1_200_000_000, "子样与检测方法配置不存在"); + ErrorCode CONFIG_SUB_SAMPLE_NOT_EXISTS = new ErrorCode(1_200_000_000, "子样配置不存在"); + ErrorCode CONFIG_SAMPLE_REPORT_NOT_EXISTS = new ErrorCode(1_200_000_000, "样品报表关系不存在"); + ErrorCode CONFIG_SAMPLE_FLOW_NOT_EXISTS = new ErrorCode(1_200_000_000, "样品流程配置不存在"); + ErrorCode CONFIG_REPORT_TYPE_NOT_EXISTS = new ErrorCode(1_200_000_000, "报表类型配置不存在"); + ErrorCode CONFIG_PROJECT_NOT_EXISTS = new ErrorCode(1_200_000_000, "检测项目配置不存在"); + ErrorCode CONFIG_ENTRUST_SOURCE_NOT_EXISTS = new ErrorCode(1_200_000_000, "检验委托来源配置不存在"); + ErrorCode CONFIG_DOCUMENT_TYPE_NOT_EXISTS = new ErrorCode(1_200_000_000, "报告类型配置不存在"); + ErrorCode CONFIG_BASE_SAMPLE_NOT_EXISTS = new ErrorCode(1_200_000_000, "主样配置不存在"); + ErrorCode CONFIG_ASSAY_METHOD_PROJECT_PARAMETER_NOT_EXISTS = new ErrorCode(1_200_000_000, "检测方法分析项目参数配置不存在"); + ErrorCode CONFIG_WAREHOUSE_LOCATION_INFOMATION_NOT_EXISTS = new ErrorCode(1_200_000_000, "样品库位信息不存在"); + ErrorCode CONFIG_SIMPLE_FLOW_RULE_NOT_EXISTS = new ErrorCode(1_200_000_000, "LiteFlow规则配置不存在"); + ErrorCode CONFIG_SIMPLE_FLOW_CODE_NOT_EXISTS = new ErrorCode(1_200_000_000, "LiteFlow脚本配置不存在"); + + ErrorCode BASE_SAMPLE_NOT_EXISTS = new ErrorCode(500, "样品大类管理不存在"); + ErrorCode MATERIAL_ASSAY_STANDARD_DETAIL_NOT_EXISTS = new ErrorCode(500, "检测标准明细不存在"); + ErrorCode MATERIAL_ASSAY_STANDARD_NOT_EXISTS = new ErrorCode(500, "检测标准不存在"); + ErrorCode MATERIAL_ASSAY_STANDARD_METHOD_NOT_EXISTS = new ErrorCode(500, "检测标准方法不存在"); + + + /*==============================dictionary===============================*/ + ErrorCode DICTIONARY_SAMPLE_FLOW_NODE_NOT_EXISTS = new ErrorCode(1_200_000_000, "样品流程节点字典不存在"); + ErrorCode DICTIONARY_PARAMETER_NOT_EXISTS = new ErrorCode(1_200_000_000, "检测参数字典不存在"); + ErrorCode DICTIONARY_PROJECT_NOT_EXISTS = new ErrorCode(1_200_000_000, "检测项目字典不存在"); + ErrorCode DICTIONARY_SAMPLE_TYPE_NOT_EXISTS = new ErrorCode(1_200_000_000, "样品类型字典不存在"); + + /*=================================bus==================================*/ + ErrorCode BUSINESS_SAMPLE_ENTRUST_REGISTRATION_NOT_EXISTS = new ErrorCode(1_200_000_000, "委检登记业务不存在"); + ErrorCode BUSINESS_SAMPLE_ENTRUST_DETAIL_NOT_EXISTS = new ErrorCode(1_200_000_000, "委检登记样品明细不存在"); + ErrorCode BUSINESS_SAMPLE_ENTRUST_PROJECT_NOT_EXISTS = new ErrorCode(1_200_000_000, "委检样品检测项目业务不存在"); + + ErrorCode BUSINESS_BASE_SAMPLE_NOT_EXISTS = new ErrorCode(1_200_000_000, "主样业务不存在"); + ErrorCode BUSINESS_SUB_PARENT_SAMPLE_NOT_EXISTS = new ErrorCode(1_200_000_000, "分样业务不存在"); + ErrorCode BUSINESS_SUB_SAMPLE_NOT_EXISTS = new ErrorCode(1_200_000_000, "子样业务不存在"); + ErrorCode BUSINESS_HANDOVER_RECORD_SUB_NOT_EXISTS = new ErrorCode(1_200_000_000, "子样交接记录业务不存在"); + ErrorCode BUSINESS_SAMPLE_ASSAY_RESULT_NOT_EXISTS = new ErrorCode(1_200_000_000, "委检登记来样品位不存在"); + + +} diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-server/pom.xml b/qms-server/yudao-module-qms-server/pom.xml similarity index 71% rename from yudao-module-jy-resource/yudao-module-jy-resource-server/pom.xml rename to qms-server/yudao-module-qms-server/pom.xml index 3846cdf..61ad8dc 100644 --- a/yudao-module-jy-resource/yudao-module-jy-resource-server/pom.xml +++ b/qms-server/yudao-module-qms-server/pom.xml @@ -3,18 +3,18 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - yudao-module-jy-resource + qms-server cn.iocoder.cloud ${revision} 4.0.0 jar - yudao-module-jy-resource-server + yudao-module-qms-server ${project.artifactId} - JyResource 模块。 + 样例模块。 @@ -38,7 +38,7 @@ cn.iocoder.cloud - yudao-module-jy-resource-api + yudao-module-qms-api ${revision} @@ -116,6 +116,60 @@ yudao-spring-boot-starter-excel + + org.apache.commons + commons-text + 1.14.0 + + + + + cn.rubylong + gridreport + 20230309.RELEASE + + + + + com.yomahub + liteflow-spring-boot-starter + 2.15.0 + + + com.yomahub + liteflow-script-javax-pro + 2.15.0 + + + com.yomahub + liteflow-script-groovy + 2.15.0 + + + com.yomahub + liteflow-script-qlexpress + 2.15.0 + + + com.yomahub + liteflow-script-graaljs + 2.15.0 + + + + + org.apache.pdfbox + pdfbox + 2.0.33 + + + + + e-iceblue + spire.pdf.free + 9.13.0 + + cn.iocoder.cloud @@ -147,5 +201,4 @@ - diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/QmsServerApplication.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/QmsServerApplication.java new file mode 100644 index 0000000..4c6280f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/QmsServerApplication.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.qms; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * 项目的启动类 + */ +@SpringBootApplication +public class QmsServerApplication { + + public static void main(String[] args) { + SpringApplication.run(QmsServerApplication.class, args); + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessBaseSampleController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessBaseSampleController.java new file mode 100644 index 0000000..6d6df32 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessBaseSampleController.java @@ -0,0 +1,106 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessBaseSampleService; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "管理后台 - 主样业务") +@RestController +@RequestMapping("/qms/business-base-sample") +@Validated +public class BusinessBaseSampleController implements BusinessControllerMarker { + + + @Resource + private BusinessBaseSampleService businessBaseSampleService; + + @PostMapping("/create") + @Operation(summary = "创建主样业务") + @PreAuthorize("@ss.hasPermission('qms:business-base-sample:create')") + public CommonResult createBusinessBaseSample(@Valid @RequestBody BusinessBaseSampleSaveReqVO createReqVO) { + return success(businessBaseSampleService.createBusinessBaseSample(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新主样业务") + @PreAuthorize("@ss.hasPermission('qms:business-base-sample:update')") + public CommonResult updateBusinessBaseSample(@Valid @RequestBody BusinessBaseSampleSaveReqVO updateReqVO) { + businessBaseSampleService.updateBusinessBaseSample(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除主样业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-base-sample:delete')") + public CommonResult deleteBusinessBaseSample(@RequestParam("id") Long id) { + businessBaseSampleService.deleteBusinessBaseSample(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除主样业务") + @PreAuthorize("@ss.hasPermission('qms:business-base-sample:delete')") + public CommonResult deleteBusinessBaseSampleList(@RequestBody BatchDeleteReqVO req) { + businessBaseSampleService.deleteBusinessBaseSampleListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得主样业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-base-sample:query')") + public CommonResult getBusinessBaseSample(@RequestParam("id") Long id) { + BusinessBaseSampleDO businessBaseSample = businessBaseSampleService.getBusinessBaseSample(id); + return success(BeanUtils.toBean(businessBaseSample, BusinessBaseSampleRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得主样业务分页") + @PreAuthorize("@ss.hasPermission('qms:business-base-sample:query')") + public CommonResult> getBusinessBaseSamplePage(@Valid BusinessBaseSamplePageReqVO pageReqVO) { + PageResult pageResult = businessBaseSampleService.getBusinessBaseSamplePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessBaseSampleRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出主样业务 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-base-sample:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessBaseSampleExcel(@Valid BusinessBaseSamplePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessBaseSampleService.getBusinessBaseSamplePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "主样业务.xls", "数据", BusinessBaseSampleRespVO.class, + BeanUtils.toBean(list, BusinessBaseSampleRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessHandoverRecordSubController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessHandoverRecordSubController.java new file mode 100644 index 0000000..7cf0ea6 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessHandoverRecordSubController.java @@ -0,0 +1,106 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessHandoverRecordSubDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessHandoverRecordSubService; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "管理后台 - 子样交接记录业务") +@RestController +@RequestMapping("/qms/business-handover-record-sub") +@Validated +public class BusinessHandoverRecordSubController implements BusinessControllerMarker { + + + @Resource + private BusinessHandoverRecordSubService businessHandoverRecordSubService; + + @PostMapping("/create") + @Operation(summary = "创建子样交接记录业务") + @PreAuthorize("@ss.hasPermission('qms:business-handover-record-sub:create')") + public CommonResult createBusinessHandoverRecordSub(@Valid @RequestBody BusinessHandoverRecordSubSaveReqVO createReqVO) { + return success(businessHandoverRecordSubService.createBusinessHandoverRecordSub(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新子样交接记录业务") + @PreAuthorize("@ss.hasPermission('qms:business-handover-record-sub:update')") + public CommonResult updateBusinessHandoverRecordSub(@Valid @RequestBody BusinessHandoverRecordSubSaveReqVO updateReqVO) { + businessHandoverRecordSubService.updateBusinessHandoverRecordSub(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除子样交接记录业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-handover-record-sub:delete')") + public CommonResult deleteBusinessHandoverRecordSub(@RequestParam("id") Long id) { + businessHandoverRecordSubService.deleteBusinessHandoverRecordSub(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除子样交接记录业务") + @PreAuthorize("@ss.hasPermission('qms:business-handover-record-sub:delete')") + public CommonResult deleteBusinessHandoverRecordSubList(@RequestBody BatchDeleteReqVO req) { + businessHandoverRecordSubService.deleteBusinessHandoverRecordSubListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得子样交接记录业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-handover-record-sub:query')") + public CommonResult getBusinessHandoverRecordSub(@RequestParam("id") Long id) { + BusinessHandoverRecordSubDO businessHandoverRecordSub = businessHandoverRecordSubService.getBusinessHandoverRecordSub(id); + return success(BeanUtils.toBean(businessHandoverRecordSub, BusinessHandoverRecordSubRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得子样交接记录业务分页") + @PreAuthorize("@ss.hasPermission('qms:business-handover-record-sub:query')") + public CommonResult> getBusinessHandoverRecordSubPage(@Valid BusinessHandoverRecordSubPageReqVO pageReqVO) { + PageResult pageResult = businessHandoverRecordSubService.getBusinessHandoverRecordSubPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessHandoverRecordSubRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出子样交接记录业务 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-handover-record-sub:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessHandoverRecordSubExcel(@Valid BusinessHandoverRecordSubPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessHandoverRecordSubService.getBusinessHandoverRecordSubPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "子样交接记录业务.xls", "数据", BusinessHandoverRecordSubRespVO.class, + BeanUtils.toBean(list, BusinessHandoverRecordSubRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleAssayResultController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleAssayResultController.java new file mode 100644 index 0000000..c4afd25 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleAssayResultController.java @@ -0,0 +1,106 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleAssayResultDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessSampleAssayResultService; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "管理后台 - 委检登记来样品位") +@RestController +@RequestMapping("/qms/business-sample-assay-result") +@Validated +public class BusinessSampleAssayResultController implements BusinessControllerMarker { + + + @Resource + private BusinessSampleAssayResultService businessSampleAssayResultService; + + @PostMapping("/create") + @Operation(summary = "创建委检登记来样品位") + @PreAuthorize("@ss.hasPermission('qms:business-sample-assay-result:create')") + public CommonResult createBusinessSampleAssayResult(@Valid @RequestBody BusinessSampleAssayResultSaveReqVO createReqVO) { + return success(businessSampleAssayResultService.createBusinessSampleAssayResult(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新委检登记来样品位") + @PreAuthorize("@ss.hasPermission('qms:business-sample-assay-result:update')") + public CommonResult updateBusinessSampleAssayResult(@Valid @RequestBody BusinessSampleAssayResultSaveReqVO updateReqVO) { + businessSampleAssayResultService.updateBusinessSampleAssayResult(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除委检登记来样品位") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-sample-assay-result:delete')") + public CommonResult deleteBusinessSampleAssayResult(@RequestParam("id") Long id) { + businessSampleAssayResultService.deleteBusinessSampleAssayResult(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除委检登记来样品位") + @PreAuthorize("@ss.hasPermission('qms:business-sample-assay-result:delete')") + public CommonResult deleteBusinessSampleAssayResultList(@RequestBody BatchDeleteReqVO req) { + businessSampleAssayResultService.deleteBusinessSampleAssayResultListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得委检登记来样品位") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-sample-assay-result:query')") + public CommonResult getBusinessSampleAssayResult(@RequestParam("id") Long id) { + BusinessSampleAssayResultDO businessSampleAssayResult = businessSampleAssayResultService.getBusinessSampleAssayResult(id); + return success(BeanUtils.toBean(businessSampleAssayResult, BusinessSampleAssayResultRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得委检登记来样品位分页") + @PreAuthorize("@ss.hasPermission('qms:business-sample-assay-result:query')") + public CommonResult> getBusinessSampleAssayResultPage(@Valid BusinessSampleAssayResultPageReqVO pageReqVO) { + PageResult pageResult = businessSampleAssayResultService.getBusinessSampleAssayResultPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessSampleAssayResultRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出委检登记来样品位 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-sample-assay-result:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessSampleAssayResultExcel(@Valid BusinessSampleAssayResultPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessSampleAssayResultService.getBusinessSampleAssayResultPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "委检登记来样品位.xls", "数据", BusinessSampleAssayResultRespVO.class, + BeanUtils.toBean(list, BusinessSampleAssayResultRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustDetailController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustDetailController.java new file mode 100644 index 0000000..e8ba02c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustDetailController.java @@ -0,0 +1,106 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessSampleEntrustDetailService; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "管理后台 - 委检登记样品明细") +@RestController +@RequestMapping("/qms/business-sample-entrust-detail") +@Validated +public class BusinessSampleEntrustDetailController implements BusinessControllerMarker { + + + @Resource + private BusinessSampleEntrustDetailService businessSampleEntrustDetailService; + + @PostMapping("/create") + @Operation(summary = "创建委检登记样品明细") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-detail:create')") + public CommonResult createBusinessSampleEntrustDetail(@Valid @RequestBody BusinessSampleEntrustDetailSaveReqVO createReqVO) { + return success(businessSampleEntrustDetailService.createBusinessSampleEntrustDetail(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新委检登记样品明细") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-detail:update')") + public CommonResult updateBusinessSampleEntrustDetail(@Valid @RequestBody BusinessSampleEntrustDetailSaveReqVO updateReqVO) { + businessSampleEntrustDetailService.updateBusinessSampleEntrustDetail(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除委检登记样品明细") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-detail:delete')") + public CommonResult deleteBusinessSampleEntrustDetail(@RequestParam("id") Long id) { + businessSampleEntrustDetailService.deleteBusinessSampleEntrustDetail(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除委检登记样品明细") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-detail:delete')") + public CommonResult deleteBusinessSampleEntrustDetailList(@RequestBody BatchDeleteReqVO req) { + businessSampleEntrustDetailService.deleteBusinessSampleEntrustDetailListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得委检登记样品明细") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-detail:query')") + public CommonResult getBusinessSampleEntrustDetail(@RequestParam("id") Long id) { + BusinessSampleEntrustDetailDO businessSampleEntrustDetail = businessSampleEntrustDetailService.getBusinessSampleEntrustDetail(id); + return success(BeanUtils.toBean(businessSampleEntrustDetail, BusinessSampleEntrustDetailRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得委检登记样品明细分页") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-detail:query')") + public CommonResult> getBusinessSampleEntrustDetailPage(@Valid BusinessSampleEntrustDetailPageReqVO pageReqVO) { + PageResult pageResult = businessSampleEntrustDetailService.getBusinessSampleEntrustDetailPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessSampleEntrustDetailRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出委检登记样品明细 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-detail:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessSampleEntrustDetailExcel(@Valid BusinessSampleEntrustDetailPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessSampleEntrustDetailService.getBusinessSampleEntrustDetailPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "委检登记样品明细.xls", "数据", BusinessSampleEntrustDetailRespVO.class, + BeanUtils.toBean(list, BusinessSampleEntrustDetailRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustProjectController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustProjectController.java new file mode 100644 index 0000000..5454121 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustProjectController.java @@ -0,0 +1,106 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustProjectDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessSampleEntrustProjectService; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "管理后台 - 委检样品检测项目业务") +@RestController +@RequestMapping("/qms/business-sample-entrust-project") +@Validated +public class BusinessSampleEntrustProjectController implements BusinessControllerMarker { + + + @Resource + private BusinessSampleEntrustProjectService businessSampleEntrustProjectService; + + @PostMapping("/create") + @Operation(summary = "创建委检样品检测项目业务") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-project:create')") + public CommonResult createBusinessSampleEntrustProject(@Valid @RequestBody BusinessSampleEntrustProjectSaveReqVO createReqVO) { + return success(businessSampleEntrustProjectService.createBusinessSampleEntrustProject(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新委检样品检测项目业务") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-project:update')") + public CommonResult updateBusinessSampleEntrustProject(@Valid @RequestBody BusinessSampleEntrustProjectSaveReqVO updateReqVO) { + businessSampleEntrustProjectService.updateBusinessSampleEntrustProject(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除委检样品检测项目业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-project:delete')") + public CommonResult deleteBusinessSampleEntrustProject(@RequestParam("id") Long id) { + businessSampleEntrustProjectService.deleteBusinessSampleEntrustProject(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除委检样品检测项目业务") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-project:delete')") + public CommonResult deleteBusinessSampleEntrustProjectList(@RequestBody BatchDeleteReqVO req) { + businessSampleEntrustProjectService.deleteBusinessSampleEntrustProjectListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得委检样品检测项目业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-project:query')") + public CommonResult getBusinessSampleEntrustProject(@RequestParam("id") Long id) { + BusinessSampleEntrustProjectDO businessSampleEntrustProject = businessSampleEntrustProjectService.getBusinessSampleEntrustProject(id); + return success(BeanUtils.toBean(businessSampleEntrustProject, BusinessSampleEntrustProjectRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得委检样品检测项目业务分页") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-project:query')") + public CommonResult> getBusinessSampleEntrustProjectPage(@Valid BusinessSampleEntrustProjectPageReqVO pageReqVO) { + PageResult pageResult = businessSampleEntrustProjectService.getBusinessSampleEntrustProjectPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessSampleEntrustProjectRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出委检样品检测项目业务 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-project:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessSampleEntrustProjectExcel(@Valid BusinessSampleEntrustProjectPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessSampleEntrustProjectService.getBusinessSampleEntrustProjectPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "委检样品检测项目业务.xls", "数据", BusinessSampleEntrustProjectRespVO.class, + BeanUtils.toBean(list, BusinessSampleEntrustProjectRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustRegistrationController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustRegistrationController.java new file mode 100644 index 0000000..2438444 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustRegistrationController.java @@ -0,0 +1,107 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessSampleEntrustRegistrationService; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + + +@Tag(name = "管理后台 - 委检登记业务") +@RestController +@RequestMapping("/qms/business-sample-entrust-registration") +@Validated +public class BusinessSampleEntrustRegistrationController implements BusinessControllerMarker { + + + @Resource + private BusinessSampleEntrustRegistrationService businessSampleEntrustRegistrationService; + + @PostMapping("/create") + @Operation(summary = "创建委检登记业务") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-registration:create')") + public CommonResult createBusinessSampleEntrustRegistration(@Valid @RequestBody BusinessSampleEntrustRegistrationSaveReqVO createReqVO) { + return success(businessSampleEntrustRegistrationService.createBusinessSampleEntrustRegistration(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新委检登记业务") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-registration:update')") + public CommonResult updateBusinessSampleEntrustRegistration(@Valid @RequestBody BusinessSampleEntrustRegistrationSaveReqVO updateReqVO) { + businessSampleEntrustRegistrationService.updateBusinessSampleEntrustRegistration(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除委检登记业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-registration:delete')") + public CommonResult deleteBusinessSampleEntrustRegistration(@RequestParam("id") Long id) { + businessSampleEntrustRegistrationService.deleteBusinessSampleEntrustRegistration(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除委检登记业务") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-registration:delete')") + public CommonResult deleteBusinessSampleEntrustRegistrationList(@RequestBody BatchDeleteReqVO req) { + businessSampleEntrustRegistrationService.deleteBusinessSampleEntrustRegistrationListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得委检登记业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-registration:query')") + public CommonResult getBusinessSampleEntrustRegistration(@RequestParam("id") Long id) { + BusinessSampleEntrustRegistrationDO businessSampleEntrustRegistration = businessSampleEntrustRegistrationService.getBusinessSampleEntrustRegistration(id); + return success(BeanUtils.toBean(businessSampleEntrustRegistration, BusinessSampleEntrustRegistrationRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得委检登记业务分页") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-registration:query')") + public CommonResult> getBusinessSampleEntrustRegistrationPage(@Valid BusinessSampleEntrustRegistrationPageReqVO pageReqVO) { + PageResult pageResult = businessSampleEntrustRegistrationService.getBusinessSampleEntrustRegistrationPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessSampleEntrustRegistrationRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出委检登记业务 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-registration:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessSampleEntrustRegistrationExcel(@Valid BusinessSampleEntrustRegistrationPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessSampleEntrustRegistrationService.getBusinessSampleEntrustRegistrationPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "委检登记业务.xls", "数据", BusinessSampleEntrustRegistrationRespVO.class, + BeanUtils.toBean(list, BusinessSampleEntrustRegistrationRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubParentSampleController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubParentSampleController.java new file mode 100644 index 0000000..7e1691a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubParentSampleController.java @@ -0,0 +1,106 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessSubParentSampleService; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "管理后台 - 分样业务") +@RestController +@RequestMapping("/qms/business-sub-parent-sample") +@Validated +public class BusinessSubParentSampleController implements BusinessControllerMarker { + + + @Resource + private BusinessSubParentSampleService businessSubParentSampleService; + + @PostMapping("/create") + @Operation(summary = "创建分样业务") + @PreAuthorize("@ss.hasPermission('qms:business-sub-parent-sample:create')") + public CommonResult createBusinessSubParentSample(@Valid @RequestBody BusinessSubParentSampleSaveReqVO createReqVO) { + return success(businessSubParentSampleService.createBusinessSubParentSample(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新分样业务") + @PreAuthorize("@ss.hasPermission('qms:business-sub-parent-sample:update')") + public CommonResult updateBusinessSubParentSample(@Valid @RequestBody BusinessSubParentSampleSaveReqVO updateReqVO) { + businessSubParentSampleService.updateBusinessSubParentSample(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除分样业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-sub-parent-sample:delete')") + public CommonResult deleteBusinessSubParentSample(@RequestParam("id") Long id) { + businessSubParentSampleService.deleteBusinessSubParentSample(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除分样业务") + @PreAuthorize("@ss.hasPermission('qms:business-sub-parent-sample:delete')") + public CommonResult deleteBusinessSubParentSampleList(@RequestBody BatchDeleteReqVO req) { + businessSubParentSampleService.deleteBusinessSubParentSampleListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得分样业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-sub-parent-sample:query')") + public CommonResult getBusinessSubParentSample(@RequestParam("id") Long id) { + BusinessSubParentSampleDO businessSubParentSample = businessSubParentSampleService.getBusinessSubParentSample(id); + return success(BeanUtils.toBean(businessSubParentSample, BusinessSubParentSampleRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得分样业务分页") + @PreAuthorize("@ss.hasPermission('qms:business-sub-parent-sample:query')") + public CommonResult> getBusinessSubParentSamplePage(@Valid BusinessSubParentSamplePageReqVO pageReqVO) { + PageResult pageResult = businessSubParentSampleService.getBusinessSubParentSamplePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessSubParentSampleRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出分样业务 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-sub-parent-sample:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessSubParentSampleExcel(@Valid BusinessSubParentSamplePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessSubParentSampleService.getBusinessSubParentSamplePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "分样业务.xls", "数据", BusinessSubParentSampleRespVO.class, + BeanUtils.toBean(list, BusinessSubParentSampleRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubSampleController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubSampleController.java new file mode 100644 index 0000000..e50bf9a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubSampleController.java @@ -0,0 +1,107 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSubSamplePageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSubSampleRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSubSampleSaveReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessSubSampleService; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "管理后台 - 子样业务") +@RestController +@RequestMapping("/qms/bus/iness-sub-sample") +@Validated +public class BusinessSubSampleController implements BusinessControllerMarker { + + + @Resource + private BusinessSubSampleService businessSubSampleService; + + @PostMapping("/create") + @Operation(summary = "创建子样业务") + @PreAuthorize("@ss.hasPermission('bus:iness-sub-sample:create')") + public CommonResult createinessSubSample(@Valid @RequestBody BusinessSubSampleSaveReqVO createReqVO) { + return success(businessSubSampleService.createinessSubSample(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新子样业务") + @PreAuthorize("@ss.hasPermission('bus:iness-sub-sample:update')") + public CommonResult updateinessSubSample(@Valid @RequestBody BusinessSubSampleSaveReqVO updateReqVO) { + businessSubSampleService.updateinessSubSample(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除子样业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('bus:iness-sub-sample:delete')") + public CommonResult deleteinessSubSample(@RequestParam("id") Long id) { + businessSubSampleService.deleteinessSubSample(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除子样业务") + @PreAuthorize("@ss.hasPermission('bus:iness-sub-sample:delete')") + public CommonResult deleteinessSubSampleList(@RequestParam("ids") List ids) { + businessSubSampleService.deleteinessSubSampleListByIds(ids); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得子样业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('bus:iness-sub-sample:query')") + public CommonResult getinessSubSample(@RequestParam("id") Long id) { + BusinessSubSampleDO inessSubSample = businessSubSampleService.getinessSubSample(id); + return success(BeanUtils.toBean(inessSubSample, BusinessSubSampleRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得子样业务分页") + @PreAuthorize("@ss.hasPermission('bus:iness-sub-sample:query')") + public CommonResult> getinessSubSamplePage(@Valid BusinessSubSamplePageReqVO pageReqVO) { + PageResult pageResult = businessSubSampleService.getinessSubSamplePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessSubSampleRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出子样业务 Excel") + @PreAuthorize("@ss.hasPermission('bus:iness-sub-sample:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportinessSubSampleExcel(@Valid BusinessSubSamplePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessSubSampleService.getinessSubSamplePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "子样业务.xls", "数据", BusinessSubSampleRespVO.class, + BeanUtils.toBean(list, BusinessSubSampleRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/SampleEntrustController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/SampleEntrustController.java new file mode 100644 index 0000000..9739127 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/SampleEntrustController.java @@ -0,0 +1,185 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.admin; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.DeleteMapping; +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.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.alibaba.fastjson2.JSON; +import com.yomahub.liteflow.core.FlowExecutor; +import com.yomahub.liteflow.flow.LiteflowResponse; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleEntrustDetail; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleEntrustDetailProject; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleEntrustParam; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleFlowParam; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleEntrustContext; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleFlowContext; +import cn.iocoder.yudao.module.qms.business.bus.service.SampleEntrustService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; + +/** + * SampleEntrustController + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月9日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月9日 + */ +@Tag(name = "管理后台 - 样品委托") +@RestController +@RequestMapping("/qms/bus/sample/entrust") +@Validated +public class SampleEntrustController { + + @Resource + private FlowExecutor flowExecutor; + + @Resource + private SampleEntrustService sampleEntrustService; + + @PostMapping("/create") + @Operation(summary = "创建委托登记") + public CommonResult create(@Valid @RequestBody SampleEntrustParam sampleEntrustParam) { + LiteflowResponse response = sampleEntrustService.create(sampleEntrustParam); + if (response.isSuccess()) { + return success(response.getContextBean(SampleEntrustContext.class)); + } else { + return error(500, response.getMessage()); + } + } + + @GetMapping("/detail") + @Operation(summary = "委托登记详情") + public CommonResult detail(@RequestParam("id") Long id) { + BusinessSampleEntrustRegistrationExtendRespVO sampleEntrustRegistration = sampleEntrustService.detail(id); + return success(sampleEntrustRegistration); + } + + @PostMapping("/update") + @Operation(summary = "修改委托登记") + public CommonResult update(@Valid @RequestBody SampleEntrustParam sampleEntrustParam) { + LiteflowResponse response = sampleEntrustService.update(sampleEntrustParam); + if (response.isSuccess()) { + return success(response.getContextBean(SampleEntrustContext.class)); + } else { + return error(500, response.getMessage()); + } + } + + @PostMapping("/submit") + @Operation(summary = "提交托登记") + public CommonResult submit(@Valid @RequestBody BusinessSampleEntrustRegistrationSubmitReqVO req) { + //如果仅勾选了送样,则需要把收样也勾选 + if (req.getIsSendSample().equals(1) && req.getIsReceiveSample().equals(0)) { + req.setIsReceiveSample(1); + } + sampleEntrustService.submit(req); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除委托登记") + @Parameter(name = "id", description = "ID", required = true) + public CommonResult delete(@RequestParam("id") Long id) { + sampleEntrustService.delete(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "ID", required = true) + @Operation(summary = "批量删除委托登记") + public CommonResult deleteList(@RequestParam("ids") List ids) { + sampleEntrustService.deleteList(ids); + return success(true); + } + + @PostMapping("/test") + public CommonResult test() { + + Long tenantId = TenantContextHolder.getRequiredTenantId(); + + SampleEntrustDetail sampleEntrustDetail_1 = new SampleEntrustDetail(); + sampleEntrustDetail_1.setBaseSampleId(1000000000000000001L);//铜精矿(结算样) + sampleEntrustDetail_1.setDictionaryBusinessId(1965289473129664514L); + sampleEntrustDetail_1.setSampleName("铜精矿"); + sampleEntrustDetail_1.setEntrustSampleCode("SRC0001"); + sampleEntrustDetail_1.setEntrustSampleName("来样名称-铜精矿"); + sampleEntrustDetail_1.setSort(1); + sampleEntrustDetail_1.setAssayProject(""); + sampleEntrustDetail_1.setForecastResult(""); + sampleEntrustDetail_1.setRemark(""); + + List sampleEntrustDetailProjectList_1 = new ArrayList<>(); + SampleEntrustDetailProject sampleEntrustDetailProject_1_1 = new SampleEntrustDetailProject(); + sampleEntrustDetailProject_1_1.setMaterialAssayStandardDetailId(1000000000000000001L); + sampleEntrustDetailProject_1_1.setIsEnabled(1); + sampleEntrustDetailProjectList_1.add(sampleEntrustDetailProject_1_1); + sampleEntrustDetail_1.setSampleEntrustDetailProjectList(sampleEntrustDetailProjectList_1); + + SampleEntrustDetail sampleEntrustDetail_2 = new SampleEntrustDetail(); + sampleEntrustDetail_2.setBaseSampleId(1000000000000000001L);//铜精矿(结算样) + sampleEntrustDetail_2.setDictionaryBusinessId(1965289473129664514L); + sampleEntrustDetail_2.setSampleName("铜精矿"); + sampleEntrustDetail_2.setEntrustSampleCode("SRC0002"); + sampleEntrustDetail_2.setEntrustSampleName("来样名称-铜精矿"); + sampleEntrustDetail_2.setSort(2); + sampleEntrustDetail_2.setAssayProject(""); + sampleEntrustDetail_2.setForecastResult(""); + sampleEntrustDetail_2.setRemark(""); + + List sampleEntrustDetailProjectList_2 = new ArrayList<>(); + SampleEntrustDetailProject sampleEntrustDetailProject_2_1 = new SampleEntrustDetailProject(); + sampleEntrustDetailProject_2_1.setMaterialAssayStandardDetailId(1000000000000000001L); + sampleEntrustDetailProject_2_1.setIsEnabled(1); + sampleEntrustDetailProjectList_2.add(sampleEntrustDetailProject_2_1); + sampleEntrustDetail_2.setSampleEntrustDetailProjectList(sampleEntrustDetailProjectList_2); + + List sampleEntrustDetailList = new ArrayList<>(); + sampleEntrustDetailList.add(sampleEntrustDetail_1); + sampleEntrustDetailList.add(sampleEntrustDetail_2); + + + SampleEntrustParam sampleEntrustParam = new SampleEntrustParam(); + sampleEntrustParam.setEntrustUnit("西南铜业"); + sampleEntrustParam.setSampleSender("送样人"); + sampleEntrustParam.setConfigEntrustSourceId(1000000000000000001L); + sampleEntrustParam.setSampleSendDate(LocalDateTime.now()); + sampleEntrustParam.setSampleQuantity(2); + sampleEntrustParam.setRemaineSampleRequirement("放弃"); + sampleEntrustParam.setSampleEntrustDetailList(sampleEntrustDetailList); + + String jsonString = JSON.toJSONString(sampleEntrustParam); + System.out.println(jsonString); + + LiteflowResponse response = flowExecutor.execute2Resp("sampleEntrustChain" + tenantId, sampleEntrustParam, SampleEntrustContext.class); + if (response.isSuccess()) { + return success(response.getContextBean(SampleEntrustContext.class)); + } else { + return error(500, response.getMessage()); + } + //return success(FlowBus.getNodeMap()); + } +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/SampleFlowController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/SampleFlowController.java new file mode 100644 index 0000000..7af56c4 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/SampleFlowController.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.admin; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.yomahub.liteflow.core.FlowExecutor; +import com.yomahub.liteflow.flow.FlowBus; +import com.yomahub.liteflow.flow.LiteflowResponse; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleFlowParam; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleFlowContext; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error; + +/** + * SampleFlowController + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月6日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月6日 + */ +@Tag(name = "管理后台 - 样品流转") +@RestController +@RequestMapping("/qms/bus/sample/flow") +@Validated +public class SampleFlowController { + + @Resource + private FlowExecutor flowExecutor; + + + @GetMapping("/test") + public CommonResult test() { + + Long tenantId = TenantContextHolder.getRequiredTenantId(); + + List sampleIdList = new ArrayList<>(); + sampleIdList.add(1111L); + + SampleFlowParam sampleFlowParam = new SampleFlowParam(); + sampleFlowParam.setSampleSourceType(2); + sampleFlowParam.setSampleProcessNo("P3000"); + sampleFlowParam.setSampleIdList(sampleIdList); + + + + LiteflowResponse response = flowExecutor.execute2Resp("sampleFlowChain" + tenantId, sampleFlowParam, SampleFlowContext.class); + if (response.isSuccess()) { + return success(response.getContextBean(SampleFlowContext.class)); + } else { + return error(500, response.getMessage()); + } + //return success(FlowBus.getNodeMap()); + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSamplePageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSamplePageReqVO.java new file mode 100644 index 0000000..c8081f2 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSamplePageReqVO.java @@ -0,0 +1,68 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 主样业务分页 Request VO") +@Data +public class BusinessBaseSamplePageReqVO extends PageParam { + + @Schema(description = "样品名称", example = "芋艿") + private String sampleName; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "主样配置ID", example = "26608") + private Long configBaseSampleId; + + @Schema(description = "主样类型ID,字典表:【T_DIC_BSN】结算样、抽查样、委检样", example = "27887") + private Long dictionaryBusinessId; + + @Schema(description = "样品生成时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] sampleTime; + + @Schema(description = "打印次数", example = "20143") + private Integer printCount; + + @Schema(description = "末次打印时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] printLastTime; + + @Schema(description = "样品流程ID", example = "25222") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY") + private String sampleFlowKey; + + @Schema(description = "样品流程节点时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] sampleFlowTime; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", example = "1") + private String sampleStatus; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建人名称") + private String operator; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "13116") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSampleRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSampleRespVO.java new file mode 100644 index 0000000..3ce07dc --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSampleRespVO.java @@ -0,0 +1,83 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 主样业务 Response VO") +@Data +@ExcelIgnoreUnannotated +public class BusinessBaseSampleRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "14424") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品编号") + private String sampleCode; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26608") + @ExcelProperty("主样配置ID") + private Long configBaseSampleId; + + @Schema(description = "主样类型ID,字典表:【T_DIC_BSN】结算样、抽查样、委检样", requiredMode = Schema.RequiredMode.REQUIRED, example = "27887") + @ExcelProperty("主样类型ID,字典表:【T_DIC_BSN】结算样、抽查样、委检样") + private Long dictionaryBusinessId; + + @Schema(description = "样品生成时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品生成时间") + private LocalDateTime sampleTime; + + @Schema(description = "打印次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "20143") + @ExcelProperty("打印次数") + private Integer printCount; + + @Schema(description = "末次打印时间") + @ExcelProperty("末次打印时间") + private LocalDateTime printLastTime; + + @Schema(description = "样品流程ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25222") + @ExcelProperty("样品流程ID") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品流程KEY") + private String sampleFlowKey; + + @Schema(description = "样品流程节点时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品流程节点时间") + private LocalDateTime sampleFlowTime; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废") + private String sampleStatus; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建人名称", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建人名称") + private String operator; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "13116") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSampleSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSampleSaveReqVO.java new file mode 100644 index 0000000..e5b9b11 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSampleSaveReqVO.java @@ -0,0 +1,75 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 主样业务新增/修改 Request VO") +@Data +public class BusinessBaseSampleSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "14424") + private Long id; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品编号不能为空") + private String sampleCode; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26608") + @NotNull(message = "主样配置ID不能为空") + private Long configBaseSampleId; + + @Schema(description = "主样类型ID,字典表:【T_DIC_BSN】结算样、抽查样、委检样", requiredMode = Schema.RequiredMode.REQUIRED, example = "27887") + @NotNull(message = "主样类型ID,字典表:【T_DIC_BSN】结算样、抽查样、委检样不能为空") + private Long dictionaryBusinessId; + + @Schema(description = "样品生成时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "样品生成时间不能为空") + private LocalDateTime sampleTime; + + @Schema(description = "打印次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "20143") + @NotNull(message = "打印次数不能为空") + private Integer printCount; + + @Schema(description = "末次打印时间") + private LocalDateTime printLastTime; + + @Schema(description = "样品流程ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25222") + @NotNull(message = "样品流程ID不能为空") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品流程KEY不能为空") + private String sampleFlowKey; + + @Schema(description = "样品流程节点时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "样品流程节点时间不能为空") + private LocalDateTime sampleFlowTime; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废不能为空") + private String sampleStatus; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "创建人名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "创建人名称不能为空") + private String operator; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "13116") + @NotNull(message = "乐观锁不能为空") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubPageReqVO.java new file mode 100644 index 0000000..3bc0461 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubPageReqVO.java @@ -0,0 +1,58 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 子样交接记录业务分页 Request VO") +@Data +public class BusinessHandoverRecordSubPageReqVO extends PageParam { + + @Schema(description = "样品子样ID", example = "7268") + private Long businessSubSampleId; + + @Schema(description = "样品流程ID", example = "27410") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY") + private String sampleFlowKey; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "样品重量") + private BigDecimal sampleWeight; + + @Schema(description = "操作时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] operationTime; + + @Schema(description = "操作人") + private String operator; + + @Schema(description = "操作人ID", example = "9370") + private Long operatorId; + + @Schema(description = "送样人") + private String sendSampleOperator; + + @Schema(description = "收样人") + private String receiveSampleOperator; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubRespVO.java new file mode 100644 index 0000000..71535ee --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubRespVO.java @@ -0,0 +1,72 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 子样交接记录业务 Response VO") +@Data +@ExcelIgnoreUnannotated +public class BusinessHandoverRecordSubRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3962") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "样品子样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7268") + @ExcelProperty("样品子样ID") + private Long businessSubSampleId; + + @Schema(description = "样品流程ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27410") + @ExcelProperty("样品流程ID") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品流程KEY") + private String sampleFlowKey; + + @Schema(description = "样品编号") + @ExcelProperty("样品编号") + private String sampleCode; + + @Schema(description = "样品重量") + @ExcelProperty("样品重量") + private BigDecimal sampleWeight; + + @Schema(description = "操作时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("操作时间") + private LocalDateTime operationTime; + + @Schema(description = "操作人", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("操作人") + private String operator; + + @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9370") + @ExcelProperty("操作人ID") + private Long operatorId; + + @Schema(description = "送样人", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("送样人") + private String sendSampleOperator; + + @Schema(description = "收样人", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("收样人") + private String receiveSampleOperator; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubSaveReqVO.java new file mode 100644 index 0000000..cd9d777 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubSaveReqVO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 子样交接记录业务新增/修改 Request VO") +@Data +public class BusinessHandoverRecordSubSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3962") + private Long id; + + @Schema(description = "样品子样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7268") + @NotNull(message = "样品子样ID不能为空") + private Long businessSubSampleId; + + @Schema(description = "样品流程ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27410") + @NotNull(message = "样品流程ID不能为空") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品流程KEY不能为空") + private String sampleFlowKey; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "样品重量") + private BigDecimal sampleWeight; + + @Schema(description = "操作时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "操作时间不能为空") + private LocalDateTime operationTime; + + @Schema(description = "操作人", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "操作人不能为空") + private String operator; + + @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9370") + @NotNull(message = "操作人ID不能为空") + private Long operatorId; + + @Schema(description = "送样人", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "送样人不能为空") + private String sendSampleOperator; + + @Schema(description = "收样人", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "收样人不能为空") + private String receiveSampleOperator; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultPageReqVO.java new file mode 100644 index 0000000..532ed51 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultPageReqVO.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 委检登记来样品位分页 Request VO") +@Data +public class BusinessSampleAssayResultPageReqVO extends PageParam { + + @Schema(description = "委托登记样品明细ID", example = "5711") + private Long businessSampleEntrustDetailId; + + @Schema(description = "样品主样ID", example = "22353") + private Long businessBaseSampleId; + + @Schema(description = "来样品位") + private String data; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "18328") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultRespVO.java new file mode 100644 index 0000000..8d10cc9 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultRespVO.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 委检登记来样品位 Response VO") +@Data +@ExcelIgnoreUnannotated +public class BusinessSampleAssayResultRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31437") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "委托登记样品明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5711") + @ExcelProperty("委托登记样品明细ID") + private Long businessSampleEntrustDetailId; + + @Schema(description = "样品主样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22353") + @ExcelProperty("样品主样ID") + private Long businessBaseSampleId; + + @Schema(description = "来样品位", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("来样品位") + private String data; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "18328") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultSaveReqVO.java new file mode 100644 index 0000000..927970d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultSaveReqVO.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 委检登记来样品位新增/修改 Request VO") +@Data +public class BusinessSampleAssayResultSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31437") + private Long id; + + @Schema(description = "委托登记样品明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5711") + @NotNull(message = "委托登记样品明细ID不能为空") + private Long businessSampleEntrustDetailId; + + @Schema(description = "样品主样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22353") + @NotNull(message = "样品主样ID不能为空") + private Long businessBaseSampleId; + + @Schema(description = "来样品位", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "来样品位不能为空") + private String data; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "18328") + @NotNull(message = "乐观锁不能为空") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailExtendRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailExtendRespVO.java new file mode 100644 index 0000000..f32df16 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailExtendRespVO.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import java.util.List; + +import lombok.Data; + +/** + * BusinessSampleEntrustDetailExtendRespVO + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月10日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月10日 + */ +@Data +public class BusinessSampleEntrustDetailExtendRespVO extends BusinessSampleEntrustDetailRespVO { + + private List sampleEntrustDetailProjectList; + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailPageReqVO.java new file mode 100644 index 0000000..a875a4d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailPageReqVO.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 委检登记样品明细分页 Request VO") +@Data +public class BusinessSampleEntrustDetailPageReqVO extends PageParam { + + @Schema(description = "检验委托登记ID", example = "3509") + private Long businessSampleEntrustRegistrationId; + + @Schema(description = "主样业务ID", example = "24710") + private Long businessBaseSampleId; + + @Schema(description = "样品大类ID", example = "10243") + private Long baseSampleId; + + @Schema(description = "样品类型ID,字典表:【T_DIC_BSN】结算样、委检样、生产样等", example = "27392") + private Long dictionaryBusinessId; + + @Schema(description = "样品名称", example = "芋艿") + private String sampleName; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "委托样品名称", example = "赵六") + private String entrustSampleName; + + @Schema(description = "委托样品编号") + private String entrustSampleCode; + + @Schema(description = "排序") + private Integer sort; + + @Schema(description = "检测项目") + private String assayProject; + + @Schema(description = "预报结果") + private String forecastResult; + + @Schema(description = "是否称重,1-启用,0-不启用") + private Integer isWeighing; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "12540") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailRespVO.java new file mode 100644 index 0000000..545dd5b --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailRespVO.java @@ -0,0 +1,83 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 委检登记样品明细 Response VO") +@Data +@ExcelIgnoreUnannotated +public class BusinessSampleEntrustDetailRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12340") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "检验委托登记ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3509") + @ExcelProperty("检验委托登记ID") + private Long businessSampleEntrustRegistrationId; + + @Schema(description = "主样业务ID", example = "24710") + @ExcelProperty("主样业务ID") + private Long businessBaseSampleId; + + @Schema(description = "样品大类ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10243") + @ExcelProperty("样品大类ID") + private Long baseSampleId; + + @Schema(description = "样品类型ID,字典表:【T_DIC_BSN】结算样、委检样、生产样等", requiredMode = Schema.RequiredMode.REQUIRED, example = "27392") + @ExcelProperty("样品类型ID,字典表:【T_DIC_BSN】结算样、委检样、生产样等") + private Long dictionaryBusinessId; + + @Schema(description = "样品名称", example = "芋艿") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "样品编号") + @ExcelProperty("样品编号") + private String sampleCode; + + @Schema(description = "委托样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @ExcelProperty("委托样品名称") + private String entrustSampleName; + + @Schema(description = "委托样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("委托样品编号") + private String entrustSampleCode; + + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("排序") + private Integer sort; + + @Schema(description = "检测项目") + @ExcelProperty("检测项目") + private String assayProject; + + @Schema(description = "预报结果") + @ExcelProperty("预报结果") + private String forecastResult; + + @Schema(description = "是否称重,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否称重,1-启用,0-不启用") + private Integer isWeighing; + + @Schema(description = "所属部门") + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", example = "12540") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailSaveReqVO.java new file mode 100644 index 0000000..603e30a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailSaveReqVO.java @@ -0,0 +1,67 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 委检登记样品明细新增/修改 Request VO") +@Data +public class BusinessSampleEntrustDetailSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12340") + private Long id; + + @Schema(description = "检验委托登记ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3509") + @NotNull(message = "检验委托登记ID不能为空") + private Long businessSampleEntrustRegistrationId; + + @Schema(description = "主样业务ID", example = "24710") + private Long businessBaseSampleId; + + @Schema(description = "样品大类ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10243") + @NotNull(message = "样品大类ID不能为空") + private Long baseSampleId; + + @Schema(description = "样品类型ID,字典表:【T_DIC_BSN】结算样、委检样、生产样等", requiredMode = Schema.RequiredMode.REQUIRED, example = "27392") + @NotNull(message = "样品类型ID,字典表:【T_DIC_BSN】结算样、委检样、生产样等不能为空") + private Long dictionaryBusinessId; + + @Schema(description = "样品名称", example = "芋艿") + private String sampleName; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "委托样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @NotEmpty(message = "委托样品名称不能为空") + private String entrustSampleName; + + @Schema(description = "委托样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "委托样品编号不能为空") + private String entrustSampleCode; + + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "排序不能为空") + private Integer sort; + + @Schema(description = "检测项目") + private String assayProject; + + @Schema(description = "预报结果") + private String forecastResult; + + @Schema(description = "是否称重,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否称重,1-启用,0-不启用不能为空") + private Integer isWeighing; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", example = "12540") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectExtendRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectExtendRespVO.java new file mode 100644 index 0000000..fad8a2c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectExtendRespVO.java @@ -0,0 +1,31 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import lombok.Data; + +/** + * BusinessSampleEntrustProjectExtendRespVO + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月10日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月10日 + */ +@Data +public class BusinessSampleEntrustProjectExtendRespVO extends BusinessSampleEntrustProjectRespVO { + + /** 检测项目编码 **/ + private String projectCode; + + /** 检测项目名称 **/ + private String projectName; + + /** 检测项目缩写 **/ + private String projectSimpleName; + + /** 检测项目显示名称 **/ + private String projectShowName; +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectPageReqVO.java new file mode 100644 index 0000000..a91537f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectPageReqVO.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 委检样品检测项目业务分页 Request VO") +@Data +public class BusinessSampleEntrustProjectPageReqVO extends PageParam { + + @Schema(description = "样品检验委托明细ID", example = "31234") + private Long businessSampleEntrustDetailId; + + @Schema(description = "物料检测标准检测项目ID", example = "1780") + private Long materialAssayStandardDetailId; + + @Schema(description = "检测项目ID,字典表:【T_DIC_PRJ】", example = "29566") + private Long dictionaryProjectId; + + @Schema(description = "是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "22753") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectRespVO.java new file mode 100644 index 0000000..ff2e6b0 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectRespVO.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 委检样品检测项目业务 Response VO") +@Data +@ExcelIgnoreUnannotated +public class BusinessSampleEntrustProjectRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6960") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "样品检验委托明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31234") + @ExcelProperty("样品检验委托明细ID") + private Long businessSampleEntrustDetailId; + + @Schema(description = "物料检测标准检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1780") + @ExcelProperty("物料检测标准检测项目ID") + private Long materialAssayStandardDetailId; + + @Schema(description = "检测项目ID,字典表:【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "29566") + @ExcelProperty("检测项目ID,字典表:【T_DIC_PRJ】") + private Long dictionaryProjectId; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "22753") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectSaveReqVO.java new file mode 100644 index 0000000..9320b59 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectSaveReqVO.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 委检样品检测项目业务新增/修改 Request VO") +@Data +public class BusinessSampleEntrustProjectSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6960") + private Long id; + + @Schema(description = "样品检验委托明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31234") + @NotNull(message = "样品检验委托明细ID不能为空") + private Long businessSampleEntrustDetailId; + + @Schema(description = "物料检测标准检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1780") + @NotNull(message = "物料检测标准检测项目ID不能为空") + private Long materialAssayStandardDetailId; + + @Schema(description = "检测项目ID,字典表:【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "29566") + @NotNull(message = "检测项目ID,字典表:【T_DIC_PRJ】不能为空") + private Long dictionaryProjectId; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否启用,1-启用,0-不启用不能为空") + private Integer isEnabled; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "22753") + @NotNull(message = "乐观锁不能为空") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationExtendRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationExtendRespVO.java new file mode 100644 index 0000000..c727fd3 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationExtendRespVO.java @@ -0,0 +1,23 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import java.util.List; + +import lombok.Data; + +/** + * BusinessSampleEntrustRegistrationExtendRespVO + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月10日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月10日 + */ +@Data +public class BusinessSampleEntrustRegistrationExtendRespVO extends BusinessSampleEntrustRegistrationRespVO { + + private List sampleEntrustDetailList; +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationPageReqVO.java new file mode 100644 index 0000000..f5fbab6 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationPageReqVO.java @@ -0,0 +1,135 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 委检登记业务分页 Request VO") +@Data +public class BusinessSampleEntrustRegistrationPageReqVO extends PageParam { + + @Schema(description = "委托ID", example = "8324") + private Long entrustId; + + @Schema(description = "委托单号") + private String entrustNumber; + + @Schema(description = "委托单位/送样单位") + private String entrustUnit; + + @Schema(description = "委托来源,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托", example = "25366") + private Long configEntrustSourceId; + + @Schema(description = "样品数量") + private Integer sampleQuantity; + + @Schema(description = "任务数量") + private Integer taskQuantity; + + @Schema(description = "已完成任务数量") + private Integer taskFinishedQuantity; + + @Schema(description = "余样要求,【字典】【jy_sample_entrust_remaine_requirement】余样返回、放弃") + private String remaineSampleRequirement; + + @Schema(description = "样品状态,【字典】【jy_sample_entrust_status】块状、粉末、颗粒、液体", example = "2") + private String sampleStatus; + + @Schema(description = "电话") + private String tel; + + @Schema(description = "传真") + private String fax; + + @Schema(description = "通讯地址") + private String address; + + @Schema(description = "邮编") + private String postal; + + @Schema(description = "E-mail") + private String email; + + @Schema(description = "委托检测类别,【字典】【jy_sample_entrust_category】一般委托、仲裁委托") + private String entrustCategory; + + @Schema(description = "样品类别(装港/卸港),【字典】【jy_sample_entrust_category】装港样、卸港样") + private String sampleCategory; + + @Schema(description = "样品来源,【字典】【jy_sample_entrust_origin】送样、邮寄、现场取样") + private String sampleOrigin; + + @Schema(description = "保密要求,【字典】【jy_sample_entrust_secrecy_requirement】要求对样品和文件保密、无保密要求") + private String secrecyRequire; + + @Schema(description = "检测方法,【字典】【jy_sample_entrust_assay_method】国标、行标、客户要求、检测方依据样品选择") + private String assayMethod; + + @Schema(description = "送样人") + private String sampleSender; + + @Schema(description = "送样日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] sampleSendDate; + + @Schema(description = "收样人") + private String sampleReceiver; + + @Schema(description = "收样日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] sampleReceiveDate; + + @Schema(description = "登记状态,register-登记中、submitted-已提交", example = "1") + private String registrationStatus; + + @Schema(description = "数据校验状态,success-数据校验成功、fail-数据校验失败", example = "2") + private String dataCheckStatus; + + @Schema(description = "检验状态,unchecked-未检验;checked-已检验", example = "1") + private String assayStatus; + + @Schema(description = "数据回报状态,unreturned-未回报;returned-已回报", example = "1") + private String dataStatus; + + @Schema(description = "报告IDs", example = "17931") + private String documentMainId; + + @Schema(description = "报告发送方式,【字典】【jy_sample_entrust_send_way】自取、邮寄、电话、传真、E-mail") + private String documentSendWay; + + @Schema(description = "报告发送人") + private String documentPublisher; + + @Schema(description = "报告发送日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] documentPublisherDate; + + @Schema(description = "报告接收人") + private String documentReceiver; + + @Schema(description = "报告接收日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] documentReceiveDate; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "6291") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "扩展信息") + private String externalInfomation; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationRespVO.java new file mode 100644 index 0000000..0180201 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationRespVO.java @@ -0,0 +1,171 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 委检登记业务 Response VO") +@Data +@ExcelIgnoreUnannotated +public class BusinessSampleEntrustRegistrationRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9288") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "委托ID", example = "8324") + @ExcelProperty("委托ID") + private Long entrustId; + + @Schema(description = "委托单号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("委托单号") + private String entrustNumber; + + @Schema(description = "委托单位/送样单位", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("委托单位/送样单位") + private String entrustUnit; + + @Schema(description = "委托来源,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托", requiredMode = Schema.RequiredMode.REQUIRED, example = "25366") + @ExcelProperty("委托来源,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托") + private Long configEntrustSourceId; + + @Schema(description = "样品数量", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品数量") + private Integer sampleQuantity; + + @Schema(description = "任务数量", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("任务数量") + private Integer taskQuantity; + + @Schema(description = "已完成任务数量") + @ExcelProperty("已完成任务数量") + private Integer taskFinishedQuantity; + + @Schema(description = "余样要求,【字典】【jy_sample_entrust_remaine_requirement】余样返回、放弃", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("余样要求,【字典】【jy_sample_entrust_remaine_requirement】余样返回、放弃") + private String remaineSampleRequirement; + + @Schema(description = "样品状态,【字典】【jy_sample_entrust_status】块状、粉末、颗粒、液体", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("样品状态,【字典】【jy_sample_entrust_status】块状、粉末、颗粒、液体") + private String sampleStatus; + + @Schema(description = "电话") + @ExcelProperty("电话") + private String tel; + + @Schema(description = "传真") + @ExcelProperty("传真") + private String fax; + + @Schema(description = "通讯地址") + @ExcelProperty("通讯地址") + private String address; + + @Schema(description = "邮编") + @ExcelProperty("邮编") + private String postal; + + @Schema(description = "E-mail") + @ExcelProperty("E-mail") + private String email; + + @Schema(description = "委托检测类别,【字典】【jy_sample_entrust_category】一般委托、仲裁委托") + @ExcelProperty("委托检测类别,【字典】【jy_sample_entrust_category】一般委托、仲裁委托") + private String entrustCategory; + + @Schema(description = "样品类别(装港/卸港),【字典】【jy_sample_entrust_category】装港样、卸港样") + @ExcelProperty("样品类别(装港/卸港),【字典】【jy_sample_entrust_category】装港样、卸港样") + private String sampleCategory; + + @Schema(description = "样品来源,【字典】【jy_sample_entrust_origin】送样、邮寄、现场取样", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品来源,【字典】【jy_sample_entrust_origin】送样、邮寄、现场取样") + private String sampleOrigin; + + @Schema(description = "保密要求,【字典】【jy_sample_entrust_secrecy_requirement】要求对样品和文件保密、无保密要求", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("保密要求,【字典】【jy_sample_entrust_secrecy_requirement】要求对样品和文件保密、无保密要求") + private String secrecyRequire; + + @Schema(description = "检测方法,【字典】【jy_sample_entrust_assay_method】国标、行标、客户要求、检测方依据样品选择", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("检测方法,【字典】【jy_sample_entrust_assay_method】国标、行标、客户要求、检测方依据样品选择") + private String assayMethod; + + @Schema(description = "送样人", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("送样人") + private String sampleSender; + + @Schema(description = "送样日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("送样日期") + private LocalDateTime sampleSendDate; + + @Schema(description = "收样人", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("收样人") + private String sampleReceiver; + + @Schema(description = "收样日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("收样日期") + private LocalDateTime sampleReceiveDate; + + @Schema(description = "登记状态,register-登记中、submitted-已提交", example = "1") + @ExcelProperty("登记状态,register-登记中、submitted-已提交") + private String registrationStatus; + + @Schema(description = "数据校验状态,success-数据校验成功、fail-数据校验失败", example = "2") + @ExcelProperty("数据校验状态,success-数据校验成功、fail-数据校验失败") + private String dataCheckStatus; + + @Schema(description = "检验状态,unchecked-未检验;checked-已检验", example = "1") + @ExcelProperty("检验状态,unchecked-未检验;checked-已检验") + private String assayStatus; + + @Schema(description = "数据回报状态,unreturned-未回报;returned-已回报", example = "1") + @ExcelProperty("数据回报状态,unreturned-未回报;returned-已回报") + private String dataStatus; + + @Schema(description = "报告IDs", example = "17931") + @ExcelProperty("报告IDs") + private String documentMainId; + + @Schema(description = "报告发送方式,【字典】【jy_sample_entrust_send_way】自取、邮寄、电话、传真、E-mail") + @ExcelProperty("报告发送方式,【字典】【jy_sample_entrust_send_way】自取、邮寄、电话、传真、E-mail") + private String documentSendWay; + + @Schema(description = "报告发送人") + @ExcelProperty("报告发送人") + private String documentPublisher; + + @Schema(description = "报告发送日期") + @ExcelProperty("报告发送日期") + private LocalDateTime documentPublisherDate; + + @Schema(description = "报告接收人") + @ExcelProperty("报告接收人") + private String documentReceiver; + + @Schema(description = "报告接收日期") + @ExcelProperty("报告接收日期") + private LocalDateTime documentReceiveDate; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "6291") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("备注") + private String remark; + + @Schema(description = "扩展信息") + @ExcelProperty("扩展信息") + private String externalInfomation; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationSaveReqVO.java new file mode 100644 index 0000000..f59e1ad --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationSaveReqVO.java @@ -0,0 +1,145 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 委检登记业务新增/修改 Request VO") +@Data +public class BusinessSampleEntrustRegistrationSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9288") + private Long id; + + @Schema(description = "委托ID", example = "8324") + private Long entrustId; + + @Schema(description = "委托单号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "委托单号不能为空") + private String entrustNumber; + + @Schema(description = "委托单位/送样单位", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "委托单位/送样单位不能为空") + private String entrustUnit; + + @Schema(description = "委托来源,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托", requiredMode = Schema.RequiredMode.REQUIRED, example = "25366") + @NotNull(message = "委托来源,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托不能为空") + private Long configEntrustSourceId; + + @Schema(description = "样品数量", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "样品数量不能为空") + private Integer sampleQuantity; + + @Schema(description = "任务数量", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "任务数量不能为空") + private Integer taskQuantity; + + @Schema(description = "已完成任务数量") + private Integer taskFinishedQuantity; + + @Schema(description = "余样要求,【字典】【jy_sample_entrust_remaine_requirement】余样返回、放弃", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "余样要求,【字典】【jy_sample_entrust_remaine_requirement】余样返回、放弃不能为空") + private String remaineSampleRequirement; + + @Schema(description = "样品状态,【字典】【jy_sample_entrust_status】块状、粉末、颗粒、液体", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotEmpty(message = "样品状态,【字典】【jy_sample_entrust_status】块状、粉末、颗粒、液体不能为空") + private String sampleStatus; + + @Schema(description = "电话") + private String tel; + + @Schema(description = "传真") + private String fax; + + @Schema(description = "通讯地址") + private String address; + + @Schema(description = "邮编") + private String postal; + + @Schema(description = "E-mail") + private String email; + + @Schema(description = "委托检测类别,【字典】【jy_sample_entrust_category】一般委托、仲裁委托") + private String entrustCategory; + + @Schema(description = "样品类别(装港/卸港),【字典】【jy_sample_entrust_category】装港样、卸港样") + private String sampleCategory; + + @Schema(description = "样品来源,【字典】【jy_sample_entrust_origin】送样、邮寄、现场取样", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品来源,【字典】【jy_sample_entrust_origin】送样、邮寄、现场取样不能为空") + private String sampleOrigin; + + @Schema(description = "保密要求,【字典】【jy_sample_entrust_secrecy_requirement】要求对样品和文件保密、无保密要求", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "保密要求,【字典】【jy_sample_entrust_secrecy_requirement】要求对样品和文件保密、无保密要求不能为空") + private String secrecyRequire; + + @Schema(description = "检测方法,【字典】【jy_sample_entrust_assay_method】国标、行标、客户要求、检测方依据样品选择", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "检测方法,【字典】【jy_sample_entrust_assay_method】国标、行标、客户要求、检测方依据样品选择不能为空") + private String assayMethod; + + @Schema(description = "送样人", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "送样人不能为空") + private String sampleSender; + + @Schema(description = "送样日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "送样日期不能为空") + private LocalDateTime sampleSendDate; + + @Schema(description = "收样人", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "收样人不能为空") + private String sampleReceiver; + + @Schema(description = "收样日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "收样日期不能为空") + private LocalDateTime sampleReceiveDate; + + @Schema(description = "登记状态,register-登记中、submitted-已提交", example = "1") + private String registrationStatus; + + @Schema(description = "数据校验状态,success-数据校验成功、fail-数据校验失败", example = "2") + private String dataCheckStatus; + + @Schema(description = "检验状态,unchecked-未检验;checked-已检验", example = "1") + private String assayStatus; + + @Schema(description = "数据回报状态,unreturned-未回报;returned-已回报", example = "1") + private String dataStatus; + + @Schema(description = "报告IDs", example = "17931") + private String documentMainId; + + @Schema(description = "报告发送方式,【字典】【jy_sample_entrust_send_way】自取、邮寄、电话、传真、E-mail") + private String documentSendWay; + + @Schema(description = "报告发送人") + private String documentPublisher; + + @Schema(description = "报告发送日期") + private LocalDateTime documentPublisherDate; + + @Schema(description = "报告接收人") + private String documentReceiver; + + @Schema(description = "报告接收日期") + private LocalDateTime documentReceiveDate; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "6291") + @NotNull(message = "乐观锁不能为空") + private Integer updateCount; + + @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "备注不能为空") + private String remark; + + @Schema(description = "扩展信息") + private String externalInfomation; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationSubmitReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationSubmitReqVO.java new file mode 100644 index 0000000..3b74a63 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationSubmitReqVO.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import java.time.LocalDateTime; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** + * BusinessSampleEntrustRegistrationSubmitReqVO + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月10日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月10日 + */ +@Schema(description = "管理后台 - 委检登记业务提交 Request VO") +@Data +public class BusinessSampleEntrustRegistrationSubmitReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9288") + private Long id; + + @Schema(description = "是否收样", example = "1") + private Integer isReceiveSample = 0; + + @Schema(description = "是否送样", example = "1") + private Integer isSendSample = 0; + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSamplePageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSamplePageReqVO.java new file mode 100644 index 0000000..b11f91d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSamplePageReqVO.java @@ -0,0 +1,72 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 分样业务分页 Request VO") +@Data +public class BusinessSubParentSamplePageReqVO extends PageParam { + + @Schema(description = "样品ID", example = "18364") + private Long sampleId; + + @Schema(description = "样品主样ID", example = "26057") + private Long businessBaseSampleId; + + @Schema(description = "分样配置ID", example = "2344") + private Long configSubSampleParentId; + + @Schema(description = "分样类型ID,字典表:【T_DIC_BSN】化学样、试金样、仪器样", example = "21472") + private Long dictionaryBusinessId; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "样品名称", example = "张三") + private String sampleName; + + @Schema(description = "子样样品编号") + private String subSampleCode; + + @Schema(description = "子样归库码") + private String subSampleReturnCode; + + @Schema(description = "上报人") + private String reporter; + + @Schema(description = "上报时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] reportTime; + + @Schema(description = "审核流程code") + private String auditFlowCode; + + @Schema(description = "超差标注", example = "2") + private Integer assessmentStatus; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", example = "2") + private String sampleStatus; + + @Schema(description = "是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "4381") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSampleRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSampleRespVO.java new file mode 100644 index 0000000..7bc1478 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSampleRespVO.java @@ -0,0 +1,91 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 分样业务 Response VO") +@Data +@ExcelIgnoreUnannotated +public class BusinessSubParentSampleRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25832") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "样品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18364") + @ExcelProperty("样品ID") + private Long sampleId; + + @Schema(description = "样品主样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26057") + @ExcelProperty("样品主样ID") + private Long businessBaseSampleId; + + @Schema(description = "分样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2344") + @ExcelProperty("分样配置ID") + private Long configSubSampleParentId; + + @Schema(description = "分样类型ID,字典表:【T_DIC_BSN】化学样、试金样、仪器样", requiredMode = Schema.RequiredMode.REQUIRED, example = "21472") + @ExcelProperty("分样类型ID,字典表:【T_DIC_BSN】化学样、试金样、仪器样") + private Long dictionaryBusinessId; + + @Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品编号") + private String sampleCode; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "子样样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("子样样品编号") + private String subSampleCode; + + @Schema(description = "子样归库码") + @ExcelProperty("子样归库码") + private String subSampleReturnCode; + + @Schema(description = "上报人") + @ExcelProperty("上报人") + private String reporter; + + @Schema(description = "上报时间") + @ExcelProperty("上报时间") + private LocalDateTime reportTime; + + @Schema(description = "审核流程code") + @ExcelProperty("审核流程code") + private String auditFlowCode; + + @Schema(description = "超差标注", example = "2") + @ExcelProperty("超差标注") + private Integer assessmentStatus; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废") + private String sampleStatus; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "4381") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSampleSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSampleSaveReqVO.java new file mode 100644 index 0000000..be18873 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSampleSaveReqVO.java @@ -0,0 +1,79 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 分样业务新增/修改 Request VO") +@Data +public class BusinessSubParentSampleSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25832") + private Long id; + + @Schema(description = "样品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18364") + @NotNull(message = "样品ID不能为空") + private Long sampleId; + + @Schema(description = "样品主样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26057") + @NotNull(message = "样品主样ID不能为空") + private Long businessBaseSampleId; + + @Schema(description = "分样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2344") + @NotNull(message = "分样配置ID不能为空") + private Long configSubSampleParentId; + + @Schema(description = "分样类型ID,字典表:【T_DIC_BSN】化学样、试金样、仪器样", requiredMode = Schema.RequiredMode.REQUIRED, example = "21472") + @NotNull(message = "分样类型ID,字典表:【T_DIC_BSN】化学样、试金样、仪器样不能为空") + private Long dictionaryBusinessId; + + @Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品编号不能为空") + private String sampleCode; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @Schema(description = "子样样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "子样样品编号不能为空") + private String subSampleCode; + + @Schema(description = "子样归库码") + private String subSampleReturnCode; + + @Schema(description = "上报人") + private String reporter; + + @Schema(description = "上报时间") + private LocalDateTime reportTime; + + @Schema(description = "审核流程code") + private String auditFlowCode; + + @Schema(description = "超差标注", example = "2") + private Integer assessmentStatus; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotEmpty(message = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废不能为空") + private String sampleStatus; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否启用,1-启用,0-不启用不能为空") + private Integer isEnabled; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "4381") + @NotNull(message = "乐观锁不能为空") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSamplePageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSamplePageReqVO.java new file mode 100644 index 0000000..9fe61a8 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSamplePageReqVO.java @@ -0,0 +1,121 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 子样业务分页 Request VO") +@Data +public class BusinessSubSamplePageReqVO extends PageParam { + + @Schema(description = "样品主样ID", example = "11587") + private Long businessBaseSampleId; + + @Schema(description = "样品分样ID", example = "2157") + private Long businessSubParentSampleId; + + @Schema(description = "子样配置ID", example = "20299") + private Long configSubSampleId; + + @Schema(description = "子样类型ID,字典表:【T_DIC_BSN】化学分析样、试金分析样、仪器分析样", example = "30304") + private Long dictionaryBusinessId; + + @Schema(description = "库位信息ID", example = "28807") + private Long configWarehouseLocationInfomationId; + + @Schema(description = "样品ID", example = "13062") + private Long sampleId; + + @Schema(description = "组ID,如果是委托创建的,则组ID和样品分样ID一致", example = "29885") + private String groupId; + + @Schema(description = "样品名称", example = "赵六") + private String sampleName; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "分析编号") + private String sampleAssayCode; + + @Schema(description = "归库编号") + private String sampleReturnCode; + + @Schema(description = "样品流程ID", example = "18294") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY") + private String sampleFlowKey; + + @Schema(description = "下一步样品流程名称") + private String nextSampleFlow; + + @Schema(description = "是否已生成归库码") + private Integer isGenerateReturnCode; + + @Schema(description = "任务指派给分析人") + private String assayOperator; + + @Schema(description = "是否已指派") + private Integer isTasked; + + @Schema(description = "指派时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] taskTime; + + @Schema(description = "是否已上报") + private Integer isReported; + + @Schema(description = "上报人") + private String reporter; + + @Schema(description = "上报时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] reportTime; + + @Schema(description = "归库时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] returnTime; + + @Schema(description = "归库状态,【字典】【jy_sample_return_status】待归库、已归库、已调拨、已下架、待销毁、已销毁", example = "1") + private Integer returnStatus; + + @Schema(description = "打印次数", example = "28859") + private Integer returnCodePrintCount; + + @Schema(description = "末次打印时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] printLastTime; + + @Schema(description = "样品流程节点时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] sampleFlowTime; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", example = "2") + private String sampleStatus; + + @Schema(description = "是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "分析元素备注") + private String analysisRemark; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "8971") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleRespVO.java new file mode 100644 index 0000000..f950cff --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleRespVO.java @@ -0,0 +1,151 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 子样业务 Response VO") +@Data +@ExcelIgnoreUnannotated +public class BusinessSubSampleRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18282") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "样品主样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11587") + @ExcelProperty("样品主样ID") + private Long businessBaseSampleId; + + @Schema(description = "样品分样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2157") + @ExcelProperty("样品分样ID") + private Long businessSubParentSampleId; + + @Schema(description = "子样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20299") + @ExcelProperty("子样配置ID") + private Long configSubSampleId; + + @Schema(description = "子样类型ID,字典表:【T_DIC_BSN】化学分析样、试金分析样、仪器分析样", requiredMode = Schema.RequiredMode.REQUIRED, example = "30304") + @ExcelProperty("子样类型ID,字典表:【T_DIC_BSN】化学分析样、试金分析样、仪器分析样") + private Long dictionaryBusinessId; + + @Schema(description = "库位信息ID", example = "28807") + @ExcelProperty("库位信息ID") + private Long configWarehouseLocationInfomationId; + + @Schema(description = "样品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13062") + @ExcelProperty("样品ID") + private Long sampleId; + + @Schema(description = "组ID,如果是委托创建的,则组ID和样品分样ID一致", example = "29885") + @ExcelProperty("组ID,如果是委托创建的,则组ID和样品分样ID一致") + private String groupId; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品编号") + private String sampleCode; + + @Schema(description = "分析编号") + @ExcelProperty("分析编号") + private String sampleAssayCode; + + @Schema(description = "归库编号") + @ExcelProperty("归库编号") + private String sampleReturnCode; + + @Schema(description = "样品流程ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18294") + @ExcelProperty("样品流程ID") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品流程KEY") + private String sampleFlowKey; + + @Schema(description = "下一步样品流程名称", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("下一步样品流程名称") + private String nextSampleFlow; + + @Schema(description = "是否已生成归库码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否已生成归库码") + private Integer isGenerateReturnCode; + + @Schema(description = "任务指派给分析人") + @ExcelProperty("任务指派给分析人") + private String assayOperator; + + @Schema(description = "是否已指派", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否已指派") + private Integer isTasked; + + @Schema(description = "指派时间") + @ExcelProperty("指派时间") + private LocalDateTime taskTime; + + @Schema(description = "是否已上报", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否已上报") + private Integer isReported; + + @Schema(description = "上报人") + @ExcelProperty("上报人") + private String reporter; + + @Schema(description = "上报时间") + @ExcelProperty("上报时间") + private LocalDateTime reportTime; + + @Schema(description = "归库时间") + @ExcelProperty("归库时间") + private LocalDateTime returnTime; + + @Schema(description = "归库状态,【字典】【jy_sample_return_status】待归库、已归库、已调拨、已下架、待销毁、已销毁", example = "1") + @ExcelProperty("归库状态,【字典】【jy_sample_return_status】待归库、已归库、已调拨、已下架、待销毁、已销毁") + private Integer returnStatus; + + @Schema(description = "打印次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "28859") + @ExcelProperty("打印次数") + private Integer returnCodePrintCount; + + @Schema(description = "末次打印时间") + @ExcelProperty("末次打印时间") + private LocalDateTime printLastTime; + + @Schema(description = "样品流程节点时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品流程节点时间") + private LocalDateTime sampleFlowTime; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废") + private String sampleStatus; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "分析元素备注") + @ExcelProperty("分析元素备注") + private String analysisRemark; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "8971") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleSaveReqVO.java new file mode 100644 index 0000000..214ffed --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleSaveReqVO.java @@ -0,0 +1,132 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 子样业务新增/修改 Request VO") +@Data +public class BusinessSubSampleSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18282") + private Long id; + + @Schema(description = "样品主样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11587") + @NotNull(message = "样品主样ID不能为空") + private Long businessBaseSampleId; + + @Schema(description = "样品分样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2157") + @NotNull(message = "样品分样ID不能为空") + private Long businessSubParentSampleId; + + @Schema(description = "子样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20299") + @NotNull(message = "子样配置ID不能为空") + private Long configSubSampleId; + + @Schema(description = "子样类型ID,字典表:【T_DIC_BSN】化学分析样、试金分析样、仪器分析样", requiredMode = Schema.RequiredMode.REQUIRED, example = "30304") + @NotNull(message = "子样类型ID,字典表:【T_DIC_BSN】化学分析样、试金分析样、仪器分析样不能为空") + private Long dictionaryBusinessId; + + @Schema(description = "库位信息ID", example = "28807") + private Long configWarehouseLocationInfomationId; + + @Schema(description = "样品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13062") + @NotNull(message = "样品ID不能为空") + private Long sampleId; + + @Schema(description = "组ID,如果是委托创建的,则组ID和样品分样ID一致", example = "29885") + private String groupId; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品编号不能为空") + private String sampleCode; + + @Schema(description = "分析编号") + private String sampleAssayCode; + + @Schema(description = "归库编号") + private String sampleReturnCode; + + @Schema(description = "样品流程ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18294") + @NotNull(message = "样品流程ID不能为空") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品流程KEY不能为空") + private String sampleFlowKey; + + @Schema(description = "下一步样品流程名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "下一步样品流程名称不能为空") + private String nextSampleFlow; + + @Schema(description = "是否已生成归库码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否已生成归库码不能为空") + private Integer isGenerateReturnCode; + + @Schema(description = "任务指派给分析人") + private String assayOperator; + + @Schema(description = "是否已指派", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否已指派不能为空") + private Integer isTasked; + + @Schema(description = "指派时间") + private LocalDateTime taskTime; + + @Schema(description = "是否已上报", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否已上报不能为空") + private Integer isReported; + + @Schema(description = "上报人") + private String reporter; + + @Schema(description = "上报时间") + private LocalDateTime reportTime; + + @Schema(description = "归库时间") + private LocalDateTime returnTime; + + @Schema(description = "归库状态,【字典】【jy_sample_return_status】待归库、已归库、已调拨、已下架、待销毁、已销毁", example = "1") + private Integer returnStatus; + + @Schema(description = "打印次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "28859") + @NotNull(message = "打印次数不能为空") + private Integer returnCodePrintCount; + + @Schema(description = "末次打印时间") + private LocalDateTime printLastTime; + + @Schema(description = "样品流程节点时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "样品流程节点时间不能为空") + private LocalDateTime sampleFlowTime; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotEmpty(message = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废不能为空") + private String sampleStatus; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否启用,1-启用,0-不启用不能为空") + private Integer isEnabled; + + @Schema(description = "分析元素备注") + private String analysisRemark; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "8971") + @NotNull(message = "乐观锁不能为空") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessBaseSampleDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessBaseSampleDO.java new file mode 100644 index 0000000..40b070c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessBaseSampleDO.java @@ -0,0 +1,113 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 主样业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_bse_smp") +@KeySequence("t_bsn_bse_smp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessBaseSampleDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 样品编号 + */ + @TableField("SMP_CD") + private String sampleCode; + /** + * 主样配置ID + */ + @TableField("CFG_BSE_SMP_ID") + private Long configBaseSampleId; + /** + * 主样类型ID,字典表:【T_DIC_BSN】结算样、抽查样、委检样 + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 样品生成时间 + */ + @TableField("SMP_TM") + private LocalDateTime sampleTime; + /** + * 打印次数 + */ + @TableField("PRNT_CNT") + private Integer printCount; + /** + * 末次打印时间 + */ + @TableField("PRNT_LST_TM") + private LocalDateTime printLastTime; + /** + * 样品流程ID + */ + @TableField("SMP_FLW_ID") + private Long sampleFlowId; + /** + * 样品流程KEY + */ + @TableField("SMP_FLW_KY") + private String sampleFlowKey; + /** + * 样品流程节点时间 + */ + @TableField("SMP_FLW_TM") + private LocalDateTime sampleFlowTime; + /** + * 样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废 + */ + @TableField("SMP_STS") + private String sampleStatus; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 创建人名称 + */ + @TableField("OPTR") + private String operator; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessHandoverRecordSubDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessHandoverRecordSubDO.java new file mode 100644 index 0000000..3c39819 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessHandoverRecordSubDO.java @@ -0,0 +1,97 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.math.BigDecimal; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 子样交接记录业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_hnd_rcd_sb") +@KeySequence("t_bsn_hnd_rcd_sb_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessHandoverRecordSubDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品子样ID + */ + @TableField("BSN_SB_SMP_ID") + private Long businessSubSampleId; + /** + * 样品流程ID + */ + @TableField("SMP_FLW_ID") + private Long sampleFlowId; + /** + * 样品流程KEY + */ + @TableField("SMP_FLW_KY") + private String sampleFlowKey; + /** + * 样品编号 + */ + @TableField("SMP_CD") + private String sampleCode; + /** + * 样品重量 + */ + @TableField("SMP_WGT") + private BigDecimal sampleWeight; + /** + * 操作时间 + */ + @TableField("OPTN_TM") + private LocalDateTime operationTime; + /** + * 操作人 + */ + @TableField("OPTR") + private String operator; + /** + * 操作人ID + */ + @TableField("OPTR_ID") + private Long operatorId; + /** + * 送样人 + */ + @TableField("SND_SMP_OPTR") + private String sendSampleOperator; + /** + * 收样人 + */ + @TableField("RCV_SMP_OPTR") + private String receiveSampleOperator; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleAssayResultDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleAssayResultDO.java new file mode 100644 index 0000000..01c4a8f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleAssayResultDO.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 委检登记来样品位 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_smp_asy_rslt") +@KeySequence("t_bsn_smp_asy_rslt_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSampleAssayResultDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 委托登记样品明细ID + */ + @TableField("BSN_SMP_ENTT_DTL_ID") + private Long businessSampleEntrustDetailId; + /** + * 样品主样ID + */ + @TableField("BSN_BSE_SMP_ID") + private Long businessBaseSampleId; + /** + * 来样品位 + */ + @TableField("DAT") + private String data; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustDetailDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustDetailDO.java new file mode 100644 index 0000000..2952aca --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustDetailDO.java @@ -0,0 +1,110 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 委检登记样品明细 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_smp_entt_dtl") +@KeySequence("t_bsn_smp_entt_dtl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSampleEntrustDetailDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 检验委托登记ID + */ + @TableField("BSN_SMP_ENTT_REG_ID") + private Long businessSampleEntrustRegistrationId; + /** + * 主样业务ID + */ + @TableField("BSN_BSE_SMP_ID") + private Long businessBaseSampleId; + /** + * 样品大类ID + */ + @TableField("BSE_SMP_ID") + private Long baseSampleId; + /** + * 样品类型ID,字典表:【T_DIC_BSN】结算样、委检样、生产样等 + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 样品编号 + */ + @TableField("SMP_CD") + private String sampleCode; + /** + * 委托样品名称 + */ + @TableField("ENTT_SMP_NAME") + private String entrustSampleName; + /** + * 委托样品编号 + */ + @TableField("ENTT_SMP_CD") + private String entrustSampleCode; + /** + * 排序 + */ + @TableField("SRT") + private Integer sort; + /** + * 检测项目 + */ + @TableField("ASY_PRJ") + private String assayProject; + /** + * 预报结果 + */ + @TableField("FRCST_RSLT") + private String forecastResult; + /** + * 是否称重,1-启用,0-不启用 + */ + @TableField("IS_WG") + private Integer isWeighing; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustProjectDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustProjectDO.java new file mode 100644 index 0000000..e5a0bab --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustProjectDO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 委检样品检测项目业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_smp_entt_prj") +@KeySequence("t_bsn_smp_entt_prj_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSampleEntrustProjectDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品检验委托明细ID + */ + @TableField("BSN_SMP_ENTT_DTL_ID") + private Long businessSampleEntrustDetailId; + /** + * 物料检测标准检测项目ID + */ + @TableField("MTRL_ASY_STD_DTL_ID") + private Long materialAssayStandardDetailId; + /** + * 检测项目ID,字典表:【T_DIC_PRJ】 + */ + @TableField("DIC_PRJ_ID") + private Long dictionaryProjectId; + /** + * 是否启用,1-启用,0-不启用 + */ + @TableField("IS_ENBD") + private Integer isEnabled; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustRegistrationDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustRegistrationDO.java new file mode 100644 index 0000000..2dc57fa --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustRegistrationDO.java @@ -0,0 +1,224 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 委检登记业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_smp_entt_reg") +@KeySequence("t_bsn_smp_entt_reg_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSampleEntrustRegistrationDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 委托ID + */ + @TableField("ENTT_ID") + private Long entrustId; + /** + * 委托单号 + */ + @TableField("ENTT_NUM") + private String entrustNumber; + /** + * 委托单位/送样单位 + */ + @TableField("ENTT_UNT") + private String entrustUnit; + /** + * 委托来源,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托 + */ + @TableField("CFG_ENTT_SRC_ID") + private Long configEntrustSourceId; + /** + * 样品数量 + */ + @TableField("SMP_QTY") + private Integer sampleQuantity; + /** + * 任务数量 + */ + @TableField("TSK_QTY") + private Integer taskQuantity; + /** + * 已完成任务数量 + */ + @TableField("TSK_FIND_QTY") + private Integer taskFinishedQuantity; + /** + * 余样要求,【字典】【jy_sample_entrust_remaine_requirement】余样返回、放弃 + */ + @TableField("RMNE_SMP_REQM") + private String remaineSampleRequirement; + /** + * 样品状态,【字典】【jy_sample_entrust_status】块状、粉末、颗粒、液体 + */ + @TableField("SMP_STS") + private String sampleStatus; + /** + * 电话 + */ + @TableField("TEL") + private String tel; + /** + * 传真 + */ + @TableField("FAX") + private String fax; + /** + * 通讯地址 + */ + @TableField("ADR") + private String address; + /** + * 邮编 + */ + @TableField("PSTL") + private String postal; + /** + * E-mail + */ + @TableField("EM") + private String email; + /** + * 委托检测类别,【字典】【jy_sample_entrust_category】一般委托、仲裁委托 + */ + @TableField("ENTT_CTGR") + private String entrustCategory; + /** + * 样品类别(装港/卸港),【字典】【jy_sample_entrust_category】装港样、卸港样 + */ + @TableField("SMP_CTGR") + private String sampleCategory; + /** + * 样品来源,【字典】【jy_sample_entrust_origin】送样、邮寄、现场取样 + */ + @TableField("SMP_ORGN") + private String sampleOrigin; + /** + * 保密要求,【字典】【jy_sample_entrust_secrecy_requirement】要求对样品和文件保密、无保密要求 + */ + @TableField("SCRY_REQR") + private String secrecyRequire; + /** + * 检测方法,【字典】【jy_sample_entrust_assay_method】国标、行标、客户要求、检测方依据样品选择 + */ + @TableField("ASY_MTHD") + private String assayMethod; + /** + * 送样人 + */ + @TableField("SMP_SNDR") + private String sampleSender; + /** + * 送样日期 + */ + @TableField("SMP_SND_DT") + private LocalDateTime sampleSendDate; + /** + * 收样人 + */ + @TableField("SMP_RCVR") + private String sampleReceiver; + /** + * 收样日期 + */ + @TableField("SMP_RCV_DT") + private LocalDateTime sampleReceiveDate; + /** + * 登记状态,register-登记中、submitted-已提交 + */ + @TableField("REG_STS") + private String registrationStatus; + /** + * 数据校验状态,success-数据校验成功、fail-数据校验失败 + */ + @TableField("DAT_CHK_STS") + private String dataCheckStatus; + /** + * 检验状态,unchecked-未检验;checked-已检验 + */ + @TableField("ASY_STS") + private String assayStatus; + /** + * 数据回报状态,unreturned-未回报;returned-已回报 + */ + @TableField("DAT_STS") + private String dataStatus; + /** + * 报告IDs + */ + @TableField("DOC_MAIN_ID") + private String documentMainId; + /** + * 报告发送方式,【字典】【jy_sample_entrust_send_way】自取、邮寄、电话、传真、E-mail + */ + @TableField("DOC_SND_WY") + private String documentSendWay; + /** + * 报告发送人 + */ + @TableField("DOC_PUBR") + private String documentPublisher; + /** + * 报告发送日期 + */ + @TableField("DOC_PUBR_DT") + private LocalDateTime documentPublisherDate; + /** + * 报告接收人 + */ + @TableField("DOC_RCVR") + private String documentReceiver; + /** + * 报告接收日期 + */ + @TableField("DOC_RCV_DT") + private LocalDateTime documentReceiveDate; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 扩展信息 + */ + @TableField("EXT_INF") + private String externalInfomation; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubParentSampleDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubParentSampleDO.java new file mode 100644 index 0000000..8ffb5ab --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubParentSampleDO.java @@ -0,0 +1,121 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 分样业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_sb_prn_smp") +@KeySequence("t_bsn_sb_prn_smp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSubParentSampleDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品ID + */ + @TableField("SMP_ID") + private Long sampleId; + /** + * 样品主样ID + */ + @TableField("BSN_BSE_SMP_ID") + private Long businessBaseSampleId; + /** + * 分样配置ID + */ + @TableField("CFG_SB_SMP_PRN_ID") + private Long configSubSampleParentId; + /** + * 分样类型ID,字典表:【T_DIC_BSN】化学样、试金样、仪器样 + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 样品编号 + */ + @TableField("SMP_CD") + private String sampleCode; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 子样样品编号 + */ + @TableField("SB_SMP_CD") + private String subSampleCode; + /** + * 子样归库码 + */ + @TableField("SB_SMP_RTN_CD") + private String subSampleReturnCode; + /** + * 上报人 + */ + @TableField("RPTR") + private String reporter; + /** + * 上报时间 + */ + @TableField("RPT_TM") + private LocalDateTime reportTime; + /** + * 审核流程code + */ + @TableField("AUD_FLW_CD") + private String auditFlowCode; + /** + * 超差标注 + */ + @TableField("ASMT_STS") + private Integer assessmentStatus; + /** + * 样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废 + */ + @TableField("SMP_STS") + private String sampleStatus; + /** + * 是否启用,1-启用,0-不启用 + */ + @TableField("IS_ENBD") + private Integer isEnabled; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubSampleDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubSampleDO.java new file mode 100644 index 0000000..07e2cf8 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubSampleDO.java @@ -0,0 +1,200 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 子样业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_sb_smp") +@KeySequence("t_bsn_sb_smp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSubSampleDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品主样ID + */ + @TableField("BSN_BSE_SMP_ID") + private Long businessBaseSampleId; + /** + * 样品分样ID + */ + @TableField("BSN_SB_PRN_SMP_ID") + private Long businessSubParentSampleId; + /** + * 子样配置ID + */ + @TableField("CFG_SB_SMP_ID") + private Long configSubSampleId; + /** + * 子样类型ID,字典表:【T_DIC_BSN】化学分析样、试金分析样、仪器分析样 + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 库位信息ID + */ + @TableField("CFG_WRH_LOC_INF_ID") + private Long configWarehouseLocationInfomationId; + /** + * 样品ID + */ + @TableField("SMP_ID") + private Long sampleId; + /** + * 组ID,如果是委托创建的,则组ID和样品分样ID一致 + */ + @TableField("GRP_ID") + private String groupId; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 样品编号 + */ + @TableField("SMP_CD") + private String sampleCode; + /** + * 分析编号 + */ + @TableField("SMP_ASY_CD") + private String sampleAssayCode; + /** + * 归库编号 + */ + @TableField("SMP_RTN_CD") + private String sampleReturnCode; + /** + * 样品流程ID + */ + @TableField("SMP_FLW_ID") + private Long sampleFlowId; + /** + * 样品流程KEY + */ + @TableField("SMP_FLW_KY") + private String sampleFlowKey; + /** + * 下一步样品流程名称 + */ + @TableField("NXT_SMP_FLW") + private String nextSampleFlow; + /** + * 是否已生成归库码 + */ + @TableField("IS_GEN_RTN_CD") + private Integer isGenerateReturnCode; + /** + * 任务指派给分析人 + */ + @TableField("ASY_OPTR") + private String assayOperator; + /** + * 是否已指派 + */ + @TableField("IS_TSKD") + private Integer isTasked; + /** + * 指派时间 + */ + @TableField("TSK_TM") + private LocalDateTime taskTime; + /** + * 是否已上报 + */ + @TableField("IS_RPOD") + private Integer isReported; + /** + * 上报人 + */ + @TableField("RPTR") + private String reporter; + /** + * 上报时间 + */ + @TableField("RPT_TM") + private LocalDateTime reportTime; + /** + * 归库时间 + */ + @TableField("RTN_TM") + private LocalDateTime returnTime; + /** + * 归库状态,【字典】【jy_sample_return_status】待归库、已归库、已调拨、已下架、待销毁、已销毁 + */ + @TableField("RTN_STS") + private Integer returnStatus; + /** + * 打印次数 + */ + @TableField("RTN_CD_PRNT_CNT") + private Integer returnCodePrintCount; + /** + * 末次打印时间 + */ + @TableField("PRNT_LST_TM") + private LocalDateTime printLastTime; + /** + * 样品流程节点时间 + */ + @TableField("SMP_FLW_TM") + private LocalDateTime sampleFlowTime; + /** + * 样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废 + */ + @TableField("SMP_STS") + private String sampleStatus; + /** + * 是否启用,1-启用,0-不启用 + */ + @TableField("IS_ENBD") + private Integer isEnabled; + /** + * 分析元素备注 + */ + @TableField("ANL_RMK") + private String analysisRemark; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessBaseSampleMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessBaseSampleMapper.java new file mode 100644 index 0000000..4d14019 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessBaseSampleMapper.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessBaseSamplePageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 主样业务 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BusinessBaseSampleMapper extends BaseMapperX { + + default PageResult selectPage(BusinessBaseSamplePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(BusinessBaseSampleDO::getSampleName, reqVO.getSampleName()) + .eqIfPresent(BusinessBaseSampleDO::getSampleCode, reqVO.getSampleCode()) + .eqIfPresent(BusinessBaseSampleDO::getConfigBaseSampleId, reqVO.getConfigBaseSampleId()) + .eqIfPresent(BusinessBaseSampleDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId()) + .betweenIfPresent(BusinessBaseSampleDO::getSampleTime, reqVO.getSampleTime()) + .eqIfPresent(BusinessBaseSampleDO::getPrintCount, reqVO.getPrintCount()) + .betweenIfPresent(BusinessBaseSampleDO::getPrintLastTime, reqVO.getPrintLastTime()) + .eqIfPresent(BusinessBaseSampleDO::getSampleFlowId, reqVO.getSampleFlowId()) + .eqIfPresent(BusinessBaseSampleDO::getSampleFlowKey, reqVO.getSampleFlowKey()) + .betweenIfPresent(BusinessBaseSampleDO::getSampleFlowTime, reqVO.getSampleFlowTime()) + .eqIfPresent(BusinessBaseSampleDO::getSampleStatus, reqVO.getSampleStatus()) + .eqIfPresent(BusinessBaseSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .eqIfPresent(BusinessBaseSampleDO::getOperator, reqVO.getOperator()) + .betweenIfPresent(BusinessBaseSampleDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BusinessBaseSampleDO::getUpdateCount, reqVO.getUpdateCount()) + .eqIfPresent(BusinessBaseSampleDO::getRemark, reqVO.getRemark()) + .orderByDesc(BusinessBaseSampleDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessHandoverRecordSubMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessHandoverRecordSubMapper.java new file mode 100644 index 0000000..bfb56e6 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessHandoverRecordSubMapper.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessHandoverRecordSubPageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessHandoverRecordSubDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 子样交接记录业务 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BusinessHandoverRecordSubMapper extends BaseMapperX { + + default PageResult selectPage(BusinessHandoverRecordSubPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(BusinessHandoverRecordSubDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId()) + .eqIfPresent(BusinessHandoverRecordSubDO::getSampleFlowId, reqVO.getSampleFlowId()) + .eqIfPresent(BusinessHandoverRecordSubDO::getSampleFlowKey, reqVO.getSampleFlowKey()) + .eqIfPresent(BusinessHandoverRecordSubDO::getSampleCode, reqVO.getSampleCode()) + .eqIfPresent(BusinessHandoverRecordSubDO::getSampleWeight, reqVO.getSampleWeight()) + .betweenIfPresent(BusinessHandoverRecordSubDO::getOperationTime, reqVO.getOperationTime()) + .eqIfPresent(BusinessHandoverRecordSubDO::getOperator, reqVO.getOperator()) + .eqIfPresent(BusinessHandoverRecordSubDO::getOperatorId, reqVO.getOperatorId()) + .eqIfPresent(BusinessHandoverRecordSubDO::getSendSampleOperator, reqVO.getSendSampleOperator()) + .eqIfPresent(BusinessHandoverRecordSubDO::getReceiveSampleOperator, reqVO.getReceiveSampleOperator()) + .eqIfPresent(BusinessHandoverRecordSubDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(BusinessHandoverRecordSubDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BusinessHandoverRecordSubDO::getRemark, reqVO.getRemark()) + .orderByDesc(BusinessHandoverRecordSubDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleAssayResultMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleAssayResultMapper.java new file mode 100644 index 0000000..1023a08 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleAssayResultMapper.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleAssayResultPageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleAssayResultDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 委检登记来样品位 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BusinessSampleAssayResultMapper extends BaseMapperX { + + default PageResult selectPage(BusinessSampleAssayResultPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(BusinessSampleAssayResultDO::getBusinessSampleEntrustDetailId, reqVO.getBusinessSampleEntrustDetailId()) + .eqIfPresent(BusinessSampleAssayResultDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId()) + .eqIfPresent(BusinessSampleAssayResultDO::getData, reqVO.getData()) + .eqIfPresent(BusinessSampleAssayResultDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(BusinessSampleAssayResultDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BusinessSampleAssayResultDO::getUpdateCount, reqVO.getUpdateCount()) + .eqIfPresent(BusinessSampleAssayResultDO::getRemark, reqVO.getRemark()) + .orderByDesc(BusinessSampleAssayResultDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.java new file mode 100644 index 0000000..3bc78ee --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 委检登记样品明细 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BusinessSampleEntrustDetailMapper extends BaseMapperX { + + default PageResult selectPage(BusinessSampleEntrustDetailPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, reqVO.getBusinessSampleEntrustRegistrationId()) + .eqIfPresent(BusinessSampleEntrustDetailDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId()) + .eqIfPresent(BusinessSampleEntrustDetailDO::getBaseSampleId, reqVO.getBaseSampleId()) + .eqIfPresent(BusinessSampleEntrustDetailDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId()) + .likeIfPresent(BusinessSampleEntrustDetailDO::getSampleName, reqVO.getSampleName()) + .eqIfPresent(BusinessSampleEntrustDetailDO::getSampleCode, reqVO.getSampleCode()) + .likeIfPresent(BusinessSampleEntrustDetailDO::getEntrustSampleName, reqVO.getEntrustSampleName()) + .eqIfPresent(BusinessSampleEntrustDetailDO::getEntrustSampleCode, reqVO.getEntrustSampleCode()) + .eqIfPresent(BusinessSampleEntrustDetailDO::getSort, reqVO.getSort()) + .eqIfPresent(BusinessSampleEntrustDetailDO::getAssayProject, reqVO.getAssayProject()) + .eqIfPresent(BusinessSampleEntrustDetailDO::getForecastResult, reqVO.getForecastResult()) + .eqIfPresent(BusinessSampleEntrustDetailDO::getIsWeighing, reqVO.getIsWeighing()) + .eqIfPresent(BusinessSampleEntrustDetailDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(BusinessSampleEntrustDetailDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BusinessSampleEntrustDetailDO::getUpdateCount, reqVO.getUpdateCount()) + .eqIfPresent(BusinessSampleEntrustDetailDO::getRemark, reqVO.getRemark()) + .orderByDesc(BusinessSampleEntrustDetailDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustProjectMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustProjectMapper.java new file mode 100644 index 0000000..45c4c38 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustProjectMapper.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustProjectPageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustProjectDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 委检样品检测项目业务 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BusinessSampleEntrustProjectMapper extends BaseMapperX { + + default PageResult selectPage(BusinessSampleEntrustProjectPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(BusinessSampleEntrustProjectDO::getBusinessSampleEntrustDetailId, reqVO.getBusinessSampleEntrustDetailId()) + .eqIfPresent(BusinessSampleEntrustProjectDO::getMaterialAssayStandardDetailId, reqVO.getMaterialAssayStandardDetailId()) + .eqIfPresent(BusinessSampleEntrustProjectDO::getDictionaryProjectId, reqVO.getDictionaryProjectId()) + .eqIfPresent(BusinessSampleEntrustProjectDO::getIsEnabled, reqVO.getIsEnabled()) + .eqIfPresent(BusinessSampleEntrustProjectDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(BusinessSampleEntrustProjectDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BusinessSampleEntrustProjectDO::getUpdateCount, reqVO.getUpdateCount()) + .eqIfPresent(BusinessSampleEntrustProjectDO::getRemark, reqVO.getRemark()) + .orderByDesc(BusinessSampleEntrustProjectDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustRegistrationMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustRegistrationMapper.java new file mode 100644 index 0000000..566167d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustRegistrationMapper.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustRegistrationPageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 委检登记业务 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BusinessSampleEntrustRegistrationMapper extends BaseMapperX { + + default PageResult selectPage(BusinessSampleEntrustRegistrationPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getEntrustId, reqVO.getEntrustId()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getEntrustNumber, reqVO.getEntrustNumber()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getEntrustUnit, reqVO.getEntrustUnit()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getConfigEntrustSourceId, reqVO.getConfigEntrustSourceId()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSampleQuantity, reqVO.getSampleQuantity()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getTaskQuantity, reqVO.getTaskQuantity()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getTaskFinishedQuantity, reqVO.getTaskFinishedQuantity()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getRemaineSampleRequirement, reqVO.getRemaineSampleRequirement()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSampleStatus, reqVO.getSampleStatus()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getTel, reqVO.getTel()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getFax, reqVO.getFax()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getAddress, reqVO.getAddress()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getPostal, reqVO.getPostal()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getEmail, reqVO.getEmail()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getEntrustCategory, reqVO.getEntrustCategory()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSampleCategory, reqVO.getSampleCategory()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSampleOrigin, reqVO.getSampleOrigin()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSecrecyRequire, reqVO.getSecrecyRequire()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getAssayMethod, reqVO.getAssayMethod()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSampleSender, reqVO.getSampleSender()) + .betweenIfPresent(BusinessSampleEntrustRegistrationDO::getSampleSendDate, reqVO.getSampleSendDate()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSampleReceiver, reqVO.getSampleReceiver()) + .betweenIfPresent(BusinessSampleEntrustRegistrationDO::getSampleReceiveDate, reqVO.getSampleReceiveDate()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getRegistrationStatus, reqVO.getRegistrationStatus()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getDataCheckStatus, reqVO.getDataCheckStatus()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getAssayStatus, reqVO.getAssayStatus()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getDataStatus, reqVO.getDataStatus()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getDocumentMainId, reqVO.getDocumentMainId()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getDocumentSendWay, reqVO.getDocumentSendWay()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getDocumentPublisher, reqVO.getDocumentPublisher()) + .betweenIfPresent(BusinessSampleEntrustRegistrationDO::getDocumentPublisherDate, reqVO.getDocumentPublisherDate()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getDocumentReceiver, reqVO.getDocumentReceiver()) + .betweenIfPresent(BusinessSampleEntrustRegistrationDO::getDocumentReceiveDate, reqVO.getDocumentReceiveDate()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(BusinessSampleEntrustRegistrationDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getUpdateCount, reqVO.getUpdateCount()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getRemark, reqVO.getRemark()) + .orderByDesc(BusinessSampleEntrustRegistrationDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubParentSampleMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubParentSampleMapper.java new file mode 100644 index 0000000..4335a8b --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubParentSampleMapper.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSubParentSamplePageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 分样业务 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BusinessSubParentSampleMapper extends BaseMapperX { + + default PageResult selectPage(BusinessSubParentSamplePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(BusinessSubParentSampleDO::getSampleId, reqVO.getSampleId()) + .eqIfPresent(BusinessSubParentSampleDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId()) + .eqIfPresent(BusinessSubParentSampleDO::getConfigSubSampleParentId, reqVO.getConfigSubSampleParentId()) + .eqIfPresent(BusinessSubParentSampleDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId()) + .eqIfPresent(BusinessSubParentSampleDO::getSampleCode, reqVO.getSampleCode()) + .likeIfPresent(BusinessSubParentSampleDO::getSampleName, reqVO.getSampleName()) + .eqIfPresent(BusinessSubParentSampleDO::getSubSampleCode, reqVO.getSubSampleCode()) + .eqIfPresent(BusinessSubParentSampleDO::getSubSampleReturnCode, reqVO.getSubSampleReturnCode()) + .eqIfPresent(BusinessSubParentSampleDO::getReporter, reqVO.getReporter()) + .betweenIfPresent(BusinessSubParentSampleDO::getReportTime, reqVO.getReportTime()) + .eqIfPresent(BusinessSubParentSampleDO::getAuditFlowCode, reqVO.getAuditFlowCode()) + .eqIfPresent(BusinessSubParentSampleDO::getAssessmentStatus, reqVO.getAssessmentStatus()) + .eqIfPresent(BusinessSubParentSampleDO::getSampleStatus, reqVO.getSampleStatus()) + .eqIfPresent(BusinessSubParentSampleDO::getIsEnabled, reqVO.getIsEnabled()) + .eqIfPresent(BusinessSubParentSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(BusinessSubParentSampleDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BusinessSubParentSampleDO::getUpdateCount, reqVO.getUpdateCount()) + .eqIfPresent(BusinessSubParentSampleDO::getRemark, reqVO.getRemark()) + .orderByDesc(BusinessSubParentSampleDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleMapper.java new file mode 100644 index 0000000..dd37bb3 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleMapper.java @@ -0,0 +1,58 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSubSamplePageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 子样业务 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BusinessSubSampleMapper extends BaseMapperX { + + default PageResult selectPage(BusinessSubSamplePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(BusinessSubSampleDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId()) + .eqIfPresent(BusinessSubSampleDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId()) + .eqIfPresent(BusinessSubSampleDO::getConfigSubSampleId, reqVO.getConfigSubSampleId()) + .eqIfPresent(BusinessSubSampleDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId()) + .eqIfPresent(BusinessSubSampleDO::getConfigWarehouseLocationInfomationId, reqVO.getConfigWarehouseLocationInfomationId()) + .eqIfPresent(BusinessSubSampleDO::getSampleId, reqVO.getSampleId()) + .eqIfPresent(BusinessSubSampleDO::getGroupId, reqVO.getGroupId()) + .likeIfPresent(BusinessSubSampleDO::getSampleName, reqVO.getSampleName()) + .eqIfPresent(BusinessSubSampleDO::getSampleCode, reqVO.getSampleCode()) + .eqIfPresent(BusinessSubSampleDO::getSampleAssayCode, reqVO.getSampleAssayCode()) + .eqIfPresent(BusinessSubSampleDO::getSampleReturnCode, reqVO.getSampleReturnCode()) + .eqIfPresent(BusinessSubSampleDO::getSampleFlowId, reqVO.getSampleFlowId()) + .eqIfPresent(BusinessSubSampleDO::getSampleFlowKey, reqVO.getSampleFlowKey()) + .eqIfPresent(BusinessSubSampleDO::getNextSampleFlow, reqVO.getNextSampleFlow()) + .eqIfPresent(BusinessSubSampleDO::getIsGenerateReturnCode, reqVO.getIsGenerateReturnCode()) + .eqIfPresent(BusinessSubSampleDO::getAssayOperator, reqVO.getAssayOperator()) + .eqIfPresent(BusinessSubSampleDO::getIsTasked, reqVO.getIsTasked()) + .betweenIfPresent(BusinessSubSampleDO::getTaskTime, reqVO.getTaskTime()) + .eqIfPresent(BusinessSubSampleDO::getIsReported, reqVO.getIsReported()) + .eqIfPresent(BusinessSubSampleDO::getReporter, reqVO.getReporter()) + .betweenIfPresent(BusinessSubSampleDO::getReportTime, reqVO.getReportTime()) + .betweenIfPresent(BusinessSubSampleDO::getReturnTime, reqVO.getReturnTime()) + .eqIfPresent(BusinessSubSampleDO::getReturnStatus, reqVO.getReturnStatus()) + .eqIfPresent(BusinessSubSampleDO::getReturnCodePrintCount, reqVO.getReturnCodePrintCount()) + .betweenIfPresent(BusinessSubSampleDO::getPrintLastTime, reqVO.getPrintLastTime()) + .betweenIfPresent(BusinessSubSampleDO::getSampleFlowTime, reqVO.getSampleFlowTime()) + .eqIfPresent(BusinessSubSampleDO::getSampleStatus, reqVO.getSampleStatus()) + .eqIfPresent(BusinessSubSampleDO::getIsEnabled, reqVO.getIsEnabled()) + .eqIfPresent(BusinessSubSampleDO::getAnalysisRemark, reqVO.getAnalysisRemark()) + .eqIfPresent(BusinessSubSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(BusinessSubSampleDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BusinessSubSampleDO::getUpdateCount, reqVO.getUpdateCount()) + .eqIfPresent(BusinessSubSampleDO::getRemark, reqVO.getRemark()) + .orderByDesc(BusinessSubSampleDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustDetail.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustDetail.java new file mode 100644 index 0000000..cf66a9b --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustDetail.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.param; + +import java.util.List; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * SampleEntrustDetail + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月9日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月9日 + */ +@Data +@Accessors(chain = true) +public class SampleEntrustDetail { + + /** ID **/ + private Long id; + + /** 委托登记id **/ + private Long businessSampleEntrustRegistrationId; + + /** 样品大类id **/ + private Long baseSampleId; + + /** 主样业务ID **/ + private Long businessBaseSampleId; + + /** 样品类型ID 字典表:【T_DIC_BSN】结算样、委检样、生产样等 **/ + private Long dictionaryBusinessId; + + /** 样品名称 **/ + private String sampleName; + + /** 样品编号 **/ + private String sampleCode; + + /** 委托样品名称 **/ + private String entrustSampleName; + + /** 委托样品编号 **/ + private String entrustSampleCode; + + /** 排序号 **/ + private Integer sort; + + /** 检测项目 **/ + private String assayProject; + + /** 预报结果 **/ + private String forecastResult; + + /** 是否称重 **/ + private Integer isWeighing; + + /** 备注 **/ + private String remark; + + /** 检测项目 **/ + private List sampleEntrustDetailProjectList; + + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustDetailProject.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustDetailProject.java new file mode 100644 index 0000000..9783149 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustDetailProject.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.param; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * SampleEntrustDetailProject + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月9日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月9日 + */ +@Data +@Accessors(chain = true) +public class SampleEntrustDetailProject { + + /** ID **/ + private Long id; + + /** 样品检验委托明细ID **/ + private Long businessSampleEntrustDetailId; + + /** 物料检测标准检测项目ID **/ + private Long materialAssayStandardDetailId; + + /** 检测项目ID **/ + private Long dictionaryProjectId; + + /** 是否启用 **/ + private Integer isEnabled; +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustParam.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustParam.java new file mode 100644 index 0000000..60ec290 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustParam.java @@ -0,0 +1,61 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.param; + +import java.time.LocalDateTime; +import java.util.List; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * SampleEntrustParam + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月9日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月9日 + */ +@Data +@Accessors(chain = true) +public class SampleEntrustParam { + + /** 委托登记id **/ + private Long id; + + /** 委托id **/ + private Long entrustId; + + /** 委托单号 **/ + private String entrustNumber; + + /** 委托单位 **/ + private String entrustUnit; + + /** 委托来源 **/ + private Long configEntrustSourceId; + + /** 样品数量 **/ + private Integer sampleQuantity; + + /** 余样要求 **/ + private String remaineSampleRequirement; + + /** 送样人 **/ + private String sampleSender; + + /** 送样日期 **/ + private LocalDateTime sampleSendDate; + + /** 备注 **/ + private String remark; + + /** 扩展信息 **/ + private String extInfo; + + private List sampleEntrustDetailList; + + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleFlowParam.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleFlowParam.java new file mode 100644 index 0000000..5aa5b23 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleFlowParam.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.param; + +import java.time.LocalDateTime; +import java.util.Date; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * SampleFlowParam + * 样品流转参数 + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月6日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月6日 + */ +@Data +@Accessors(chain = true) +public class SampleFlowParam { + + /** 样品来源 1:主,2:子 **/ + private Integer sampleSourceType; + + /** 样品当前流程节点 **/ + private String sampleProcessNo; + + /** 样品id列表 **/ + private List sampleIdList; + + /** 指定时间 **/ + private LocalDateTime specifyDateTime; + + /** 送样人 **/ + private String sendSampleOper; + + /** 收样人 **/ + private String receiveSampleOper; +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustCheckCmp.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustCheckCmp.java new file mode 100644 index 0000000..4bde6e9 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustCheckCmp.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.entrust; + +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleEntrustContext; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigEntrustSourceDO; + +/** + * SampleEntrustCheckCmp + * 样品委托检查 + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月9日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月9日 + */ +@LiteflowComponent(id = "sampleEntrustCheckCmp", name = "样品委托检查") +public class SampleEntrustCheckCmp extends NodeComponent { + + @Override + public void process() throws Exception { + //获取样品委托上下文 + SampleEntrustContext sampleEntrustContext = this.getContextBean(SampleEntrustContext.class); + //获取样品委托单 + BusinessSampleEntrustRegistrationDO sampleEntrustRegistration = sampleEntrustContext.getSampleEntrustRegistration(); + if (sampleEntrustRegistration.getConfigEntrustSourceId() == null) { + throw new ServiceException(500, "委托来源id不允许为空"); + } + ConfigEntrustSourceDO configEntrustSource = sampleEntrustContext.getConfigEntrustSourceById(sampleEntrustRegistration.getConfigEntrustSourceId()); + if (configEntrustSource == null) { + throw new ServiceException(500, "委托来源id不正确"); + } + sampleEntrustRegistration.setDataCheckStatus("success"); + + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustContextInitCmp.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustContextInitCmp.java new file mode 100644 index 0000000..42890ad --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustContextInitCmp.java @@ -0,0 +1,127 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.entrust; + +import java.util.ArrayList; +import java.util.List; + +import com.baomidou.mybatisplus.core.toolkit.IdWorker; +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +import cn.hutool.core.bean.BeanUtil; +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustProjectDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleEntrustDetail; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleEntrustDetailProject; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleEntrustParam; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleEntrustContext; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigEntrustSourceDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardMethodDO; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigEntrustSourceMapper; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.MaterialAssayStandardDetailMapper; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.MaterialAssayStandardMapper; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.MaterialAssayStandardMethodMapper; +import jakarta.annotation.Resource; + +/** + * SampleEntrustContextInitCmp + * 样品委托上下文初始化 + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月9日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月9日 + */ +@LiteflowComponent(id = "sampleEntrustContextInitCmp", name = "样品委托上下文初始化") +public class SampleEntrustContextInitCmp extends NodeComponent { + + @Resource + private ConfigEntrustSourceMapper configEntrustSourceMapper; + + @Resource + private MaterialAssayStandardMapper materialAssayStandardMapper; + + @Resource + private MaterialAssayStandardDetailMapper materialAssayStandardDetailMapper; + + @Resource + private MaterialAssayStandardMethodMapper materialAssayStandardMethodMapper; + + @Override + public void process() throws Exception { + //租户id + Long tenantId = TenantContextHolder.getRequiredTenantId(); + + //当前登录用户 + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); + + //当前登录用户昵称 + String nickName = SecurityFrameworkUtils.getLoginUserNickname(); + + //获取样品委托参数 + SampleEntrustParam sampleEntrustParam = this.getRequestData(); + + if (sampleEntrustParam == null) { + throw new ServiceException(500, "样品委托参数不允许为空"); + } + + //获取样品委托上下文 + SampleEntrustContext sampleEntrustContext = this.getContextBean(SampleEntrustContext.class); + sampleEntrustContext.setTenantId(tenantId); + sampleEntrustContext.setLoginUser(loginUser); + sampleEntrustContext.setLoginRealname(nickName); + + //委托来源配置 + List configEntrustSourceList = configEntrustSourceMapper.selectList(); + sampleEntrustContext.setConfigEntrustSourceList(configEntrustSourceList); + + //物料检验标准 + List materialAssayStandardList = materialAssayStandardMapper.selectList(); + sampleEntrustContext.setMaterialAssayStandardList(materialAssayStandardList); + + //物料检验标准项 + List materialAssayStandardDetailList = materialAssayStandardDetailMapper.selectList(); + sampleEntrustContext.setMaterialAssayStandardDetailList(materialAssayStandardDetailList); + + //物料检验标准方法 + List materialAssayStandardMethodList = materialAssayStandardMethodMapper.selectList(); + sampleEntrustContext.setMaterialAssayStandardMethodList(materialAssayStandardMethodList); + + //委托登记 + BusinessSampleEntrustRegistrationDO sampleEntrustRegistration = BeanUtil.copyProperties(sampleEntrustParam, BusinessSampleEntrustRegistrationDO.class); + sampleEntrustContext.setSampleEntrustRegistration(sampleEntrustRegistration); + + List detailList = sampleEntrustParam.getSampleEntrustDetailList(); + + //委托登记样品明细的检测项目明细 + List sampleEntrustProjectList = new ArrayList<>(); + for (SampleEntrustDetail sampleEntrustDetail : detailList) { + if (sampleEntrustDetail.getId() == null) { + sampleEntrustDetail.setId(IdWorker.getId()); + } + List projectList = sampleEntrustDetail.getSampleEntrustDetailProjectList(); + for (SampleEntrustDetailProject sampleEntrustDetailProject : projectList) { + if (sampleEntrustDetailProject.getBusinessSampleEntrustDetailId() == null) { + sampleEntrustDetailProject.setBusinessSampleEntrustDetailId(sampleEntrustDetail.getId()); + } + } + sampleEntrustProjectList.addAll(BeanUtil.copyToList(projectList, BusinessSampleEntrustProjectDO.class)); + } + sampleEntrustContext.setSampleEntrustProjectList(sampleEntrustProjectList); + + //委托登记样品明细 + List sampleEntrustDetailList = BeanUtil.copyToList(detailList, BusinessSampleEntrustDetailDO.class); + sampleEntrustContext.setSampleEntrustDetailList(sampleEntrustDetailList); + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustCreateDataCmp.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustCreateDataCmp.java new file mode 100644 index 0000000..d765f19 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustCreateDataCmp.java @@ -0,0 +1,112 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.entrust; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; + +import com.baomidou.mybatisplus.core.toolkit.IdWorker; +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleAssayResultDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustProjectDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleAssayResultMapper; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustDetailMapper; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustProjectMapper; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustRegistrationMapper; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleEntrustContext; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigEntrustSourceDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO; +import cn.iocoder.yudao.module.qms.core.code.SequenceUtil; +import jakarta.annotation.Resource; + +/** + * SampleEntrustCreateDataCmp + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月9日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月9日 + */ +@LiteflowComponent(id = "sampleEntrustCreateDataCmp", name = "样品委托创建委托数据" ) +public class SampleEntrustCreateDataCmp extends NodeComponent { + + @Resource + private SequenceUtil sequenceUtil; + + @Resource + private BusinessSampleEntrustRegistrationMapper businessSampleEntrustRegistrationMapper; + + @Resource + private BusinessSampleEntrustDetailMapper businessSampleEntrustDetailMapper; + + @Resource + private BusinessSampleEntrustProjectMapper businessSampleEntrustProjectMapper; + + @Resource + private BusinessSampleAssayResultMapper businessSampleAssayResultMapper; + + @Override + public void process() throws Exception { + //获取样品委托上下文 + SampleEntrustContext sampleEntrustContext = this.getContextBean(SampleEntrustContext.class); + //样品委托 + BusinessSampleEntrustRegistrationDO sampleEntrustRegistration = sampleEntrustContext.getSampleEntrustRegistration(); + + //获取委托来源配置 + ConfigEntrustSourceDO configEntrustSource = sampleEntrustContext.getConfigEntrustSourceById(sampleEntrustRegistration.getConfigEntrustSourceId()); + String codeRule = configEntrustSource.getCodeRule(); + + //赋值id + sampleEntrustRegistration.setId(IdWorker.getId()); + //设置委托单号 + sampleEntrustRegistration.setEntrustNumber(sequenceUtil.genCode(codeRule)); + + List sampleAssayResultList = new ArrayList<>(); + + + List sampleEntrustDetailList = sampleEntrustContext.getSampleEntrustDetailList(); + for (BusinessSampleEntrustDetailDO businessSampleEntrustDetail : sampleEntrustDetailList) { + businessSampleEntrustDetail.setBusinessSampleEntrustRegistrationId(sampleEntrustRegistration.getId()); + + if (StringUtils.isNotBlank(businessSampleEntrustDetail.getForecastResult())) { + BusinessSampleAssayResultDO sampleAssayResult = new BusinessSampleAssayResultDO(); + sampleAssayResult.setBusinessSampleEntrustDetailId(businessSampleEntrustDetail.getId()); + sampleAssayResult.setData(businessSampleEntrustDetail.getForecastResult()); + sampleAssayResultList.add(sampleAssayResult); + } + } + + List sampleEntrustProjectList = sampleEntrustContext.getSampleEntrustProjectList(); + for (BusinessSampleEntrustProjectDO businessSampleEntrustProject : sampleEntrustProjectList) { + MaterialAssayStandardDetailDO materialAssayStandardDetail = sampleEntrustContext.getMaterialAssayStandardDetailById(businessSampleEntrustProject.getMaterialAssayStandardDetailId()); + businessSampleEntrustProject.setDictionaryProjectId(materialAssayStandardDetail.getDictionaryProjectId()); + } + + //保存样品委托登记 + businessSampleEntrustRegistrationMapper.insert(sampleEntrustRegistration); + + //保存样品明细 + if (sampleEntrustDetailList != null && sampleEntrustDetailList.size() > 0) { + businessSampleEntrustDetailMapper.insertBatch(sampleEntrustDetailList); + } + + //保存检测项目 + if (sampleEntrustProjectList != null && sampleEntrustProjectList.size() > 0) { + businessSampleEntrustProjectMapper.insertBatch(sampleEntrustProjectList); + } + + //保存来样元素 + if (sampleAssayResultList.size() > 0) { + businessSampleAssayResultMapper.insertBatch(sampleAssayResultList); + } + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustGenSampleDataCmp.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustGenSampleDataCmp.java new file mode 100644 index 0000000..4635599 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustGenSampleDataCmp.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.entrust; + +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +/** + * SampleEntrustGenSampleDataCmp + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月9日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月9日 + */ +@LiteflowComponent(id = "sampleEntrustGenSampleDataCmp", name = "样品委托生成系统样品数据") +public class SampleEntrustGenSampleDataCmp extends NodeComponent { + + @Override + public void process() throws Exception { + // TODO Auto-generated method stub + + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustIsCreateCmp.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustIsCreateCmp.java new file mode 100644 index 0000000..f650510 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustIsCreateCmp.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.entrust; + +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeBooleanComponent; + +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleEntrustContext; + +/** + * SampleEntrustIsCreateCmp + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月10日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月10日 + */ +@LiteflowComponent(id = "sampleEntrustIsCreateCmp", name = "委托登记是否为创建") +public class SampleEntrustIsCreateCmp extends NodeBooleanComponent { + + @Override + public boolean processBoolean() throws Exception { + //获取样品委托上下文 + SampleEntrustContext sampleEntrustContext = this.getContextBean(SampleEntrustContext.class); + //样品委托 + BusinessSampleEntrustRegistrationDO sampleEntrustRegistration = sampleEntrustContext.getSampleEntrustRegistration(); + //如果委托登记id为空,则为创建 + return sampleEntrustRegistration.getId() == null; + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustUpdateDataCmp.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustUpdateDataCmp.java new file mode 100644 index 0000000..5b98b08 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustUpdateDataCmp.java @@ -0,0 +1,122 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.entrust; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +import org.apache.commons.lang3.StringUtils; + +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleAssayResultDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustProjectDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleAssayResultMapper; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustDetailMapper; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustProjectMapper; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustRegistrationMapper; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleEntrustContext; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO; +import jakarta.annotation.Resource; + +/** + * sampleEntrustUpdateDataCmp + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月9日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月9日 + */ +@LiteflowComponent(id = "sampleEntrustUpdateDataCmp", name = "样品委托更新委托数据" ) +public class SampleEntrustUpdateDataCmp extends NodeComponent { + + @Resource + private BusinessSampleEntrustRegistrationMapper businessSampleEntrustRegistrationMapper; + + @Resource + private BusinessSampleEntrustDetailMapper businessSampleEntrustDetailMapper; + + @Resource + private BusinessSampleEntrustProjectMapper businessSampleEntrustProjectMapper; + + @Resource + private BusinessSampleAssayResultMapper businessSampleAssayResultMapper; + + @Override + public void process() throws Exception { + //获取样品委托上下文 + SampleEntrustContext sampleEntrustContext = this.getContextBean(SampleEntrustContext.class); + //样品委托 + BusinessSampleEntrustRegistrationDO sampleEntrustRegistration = sampleEntrustContext.getSampleEntrustRegistration(); + + //先删除旧的 + List sampleEntrustDetailOldList = businessSampleEntrustDetailMapper.selectList(new LambdaQueryWrapperX().eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, sampleEntrustRegistration.getId())); + if (sampleEntrustDetailOldList != null && sampleEntrustDetailOldList.size() > 0) { + List sampleEntrustDetailIdList = sampleEntrustDetailOldList.stream().map(m -> m.getId()).collect(Collectors.toList()); + List sampleEntrustProjectList = businessSampleEntrustProjectMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleEntrustProjectDO::getBusinessSampleEntrustDetailId, sampleEntrustDetailIdList)); + if (sampleEntrustProjectList != null && sampleEntrustProjectList.size() > 0) { + List sampleEntrustProjectIdList = sampleEntrustProjectList.stream().map(m -> m.getId()).collect(Collectors.toList()); + //删除样品对应的检验项目 + businessSampleEntrustProjectMapper.deleteByIds(sampleEntrustProjectIdList); + } + List sampleAssayResultList = businessSampleAssayResultMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleAssayResultDO::getBusinessSampleEntrustDetailId, sampleEntrustDetailIdList)); + if (sampleAssayResultList != null && sampleAssayResultList.size() > 0) { + List sampleAssayResultIdList = sampleAssayResultList.stream().map(m -> m.getId()).collect(Collectors.toList()); + //删除来样品位 + businessSampleAssayResultMapper.deleteByIds(sampleAssayResultIdList); + } + + //删除委托登记明细 + businessSampleEntrustDetailMapper.deleteByIds(sampleEntrustDetailIdList); + } + + //保存更新新的 + List sampleAssayResultList = new ArrayList<>(); + + + List sampleEntrustDetailList = sampleEntrustContext.getSampleEntrustDetailList(); + for (BusinessSampleEntrustDetailDO businessSampleEntrustDetail : sampleEntrustDetailList) { + businessSampleEntrustDetail.setBusinessSampleEntrustRegistrationId(sampleEntrustRegistration.getId()); + + if (StringUtils.isNotBlank(businessSampleEntrustDetail.getForecastResult())) { + BusinessSampleAssayResultDO sampleAssayResult = new BusinessSampleAssayResultDO(); + sampleAssayResult.setBusinessSampleEntrustDetailId(businessSampleEntrustDetail.getId()); + sampleAssayResult.setData(businessSampleEntrustDetail.getForecastResult()); + sampleAssayResultList.add(sampleAssayResult); + } + } + + List sampleEntrustProjectList = sampleEntrustContext.getSampleEntrustProjectList(); + for (BusinessSampleEntrustProjectDO businessSampleEntrustProject : sampleEntrustProjectList) { + MaterialAssayStandardDetailDO materialAssayStandardDetail = sampleEntrustContext.getMaterialAssayStandardDetailById(businessSampleEntrustProject.getMaterialAssayStandardDetailId()); + businessSampleEntrustProject.setDictionaryProjectId(materialAssayStandardDetail.getDictionaryProjectId()); + } + + //保存样品委托登记 + businessSampleEntrustRegistrationMapper.updateById(sampleEntrustRegistration); + + //保存样品明细 + if (sampleEntrustDetailList != null && sampleEntrustDetailList.size() > 0) { + businessSampleEntrustDetailMapper.insertBatch(sampleEntrustDetailList); + } + + //保存检测项目 + if (sampleEntrustProjectList != null && sampleEntrustProjectList.size() > 0) { + businessSampleEntrustProjectMapper.insertBatch(sampleEntrustProjectList); + } + + //保存来样元素 + if (sampleAssayResultList.size() > 0) { + businessSampleAssayResultMapper.insertBatch(sampleAssayResultList); + } + + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleDataSaveOrUpdateCmp.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleDataSaveOrUpdateCmp.java new file mode 100644 index 0000000..c25e733 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleDataSaveOrUpdateCmp.java @@ -0,0 +1,58 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.flow; + +import java.util.List; + +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessHandoverRecordSubDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessHandoverRecordSubMapper; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleFlowContext; +import jakarta.annotation.Resource; + +/** + * SampleDataSaveOrUpdateCmp + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月8日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月8日 + */ +@LiteflowComponent(id = "sampleDataSaveOrUpdateCmp", name = "样品相关数据保存或更新") +public class SampleDataSaveOrUpdateCmp extends NodeComponent { + + @Resource + private BusinessSubParentSampleMapper businessSubParentSampleMapper; + + @Resource + private BusinessSubSampleMapper businessSubSampleMapper; + + @Resource + private BusinessHandoverRecordSubMapper businessHandoverRecordSubMapper; + + @Override + public void process() throws Exception { + SampleFlowContext sampleFlowContext = this.getContextBean(SampleFlowContext.class); + List busSubPsampleList = sampleFlowContext.getBusSubPsampleList(); + if (busSubPsampleList != null && busSubPsampleList.size() > 0) { + businessSubParentSampleMapper.updateBatch(busSubPsampleList); + } + List busSubCsampleList = sampleFlowContext.getBusSubCsampleList(); + if (busSubCsampleList != null && busSubCsampleList.size() > 0) { + businessSubSampleMapper.updateBatch(busSubCsampleList); + } + List busHandoverRecordSubList = sampleFlowContext.getBusHandoverRecordSubList(); + if (busHandoverRecordSubList != null && busHandoverRecordSubList.size() > 0) { + businessHandoverRecordSubMapper.insertBatch(busHandoverRecordSubList); + } + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleFlowContextInitCmp.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleFlowContextInitCmp.java new file mode 100644 index 0000000..0ae34f8 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleFlowContextInitCmp.java @@ -0,0 +1,75 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.flow; + +import org.apache.commons.lang3.StringUtils; + +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleFlowParam; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleFlowContext; + +/** + * SampleFlowContextInitCmp + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月6日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月6日 + */ +@LiteflowComponent(id = "sampleFlowContextInitCmp", name = "样品流转上下文初始化") +public class SampleFlowContextInitCmp extends NodeComponent { + + @Override + public void process() throws Exception { + //租户id + Long tenantId = TenantContextHolder.getRequiredTenantId(); + + //当前登录用户 + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); + + //当前登录用户昵称 + String nickName = SecurityFrameworkUtils.getLoginUserNickname(); + + //样品流转请求参数 + SampleFlowParam sampleFlowParam = this.getRequestData(); + + if (StringUtils.isBlank(sampleFlowParam.getSampleProcessNo())) { + new ServiceException(500, "样品流程节点sampleProcessNo不允许为空"); + } + + if (sampleFlowParam.getSampleIdList() == null || sampleFlowParam.getSampleIdList().size() <= 0) { + new ServiceException(500, "样品Id列表不允许为空"); + } + + SampleFlowContext sampleFlowContext = this.getContextBean(SampleFlowContext.class); + sampleFlowContext.setTenantId(tenantId); + sampleFlowContext.setLoginUser(loginUser); + sampleFlowContext.setLoginRealname(nickName); + if (sampleFlowParam.getSpecifyDateTime() != null) { + sampleFlowContext.setCurrentDateTime(sampleFlowParam.getSpecifyDateTime()); + } + sampleFlowContext.setSampleSourceType(sampleFlowParam.getSampleSourceType()); + sampleFlowContext.setSampleProcessNo(sampleFlowParam.getSampleProcessNo()); + sampleFlowContext.setSampleIdList(sampleFlowParam.getSampleIdList()); + sampleFlowContext.setSendSampleOper(sampleFlowParam.getSendSampleOper()); + sampleFlowContext.setReceiveSampleOper(sampleFlowParam.getReceiveSampleOper()); + } + + @Override + public boolean isAccess() { + SampleFlowParam sampleFlowParam = this.getRequestData(); + if (sampleFlowParam == null) { + return false; + } + return super.isAccess(); + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleHandoverRecordSubCmp.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleHandoverRecordSubCmp.java new file mode 100644 index 0000000..2577411 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleHandoverRecordSubCmp.java @@ -0,0 +1,76 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.flow; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; + +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessHandoverRecordSubDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleFlowContext; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessHandoverRecordSubService; +import jakarta.annotation.Resource; + +/** + * SampleHandRecordSubCmp + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月6日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月6日 + */ +@LiteflowComponent(id = "sampleHandoverRecordSubCmp", name = "子样交接记录") +public class SampleHandoverRecordSubCmp extends NodeComponent { + + @Resource + private BusinessHandoverRecordSubService businessHandoverRecordSubService; + + @Override + public void process() throws Exception { + SampleFlowContext sampleFlowContext = this.getContextBean(SampleFlowContext.class); + LoginUser loginUser = sampleFlowContext.getLoginUser(); + String loginRealname = sampleFlowContext.getLoginRealname(); + LocalDateTime currentDateTime = sampleFlowContext.getCurrentDateTime(); + String sendSampleOper = sampleFlowContext.getSendSampleOper(); + String receiveSampleOper = sampleFlowContext.getReceiveSampleOper(); + List busSubCsampleList = sampleFlowContext.getBusSubCsampleList(); + + List busHandoverRecordSubList = new ArrayList<>(); + + BusinessHandoverRecordSubDO busHandoverRecordSub = null; + for (BusinessSubSampleDO businessSubSample : busSubCsampleList) { + busHandoverRecordSub = new BusinessHandoverRecordSubDO(); + busHandoverRecordSub.setBusinessSubSampleId(businessSubSample.getId()); + busHandoverRecordSub.setSampleCode(businessSubSample.getSampleCode()); + if (businessSubSample.getIsGenerateReturnCode().intValue() == 1) { + busHandoverRecordSub.setSampleCode(businessSubSample.getSampleReturnCode()); + } + busHandoverRecordSub.setSampleFlowKey(businessSubSample.getSampleFlowKey()); + + if (StringUtils.isNotBlank(receiveSampleOper)) { + busHandoverRecordSub.setReceiveSampleOperator(receiveSampleOper); + } + if (StringUtils.isNotBlank(sendSampleOper)) { + busHandoverRecordSub.setSendSampleOperator(sendSampleOper); + } + + busHandoverRecordSub.setOperatorId(loginUser.getId()); + busHandoverRecordSub.setOperator(loginRealname); + busHandoverRecordSub.setOperationTime(currentDateTime); + + busHandoverRecordSubList.add(busHandoverRecordSub); + } + + sampleFlowContext.setBusHandoverRecordSubList(busHandoverRecordSubList); + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubCheckCmp.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubCheckCmp.java new file mode 100644 index 0000000..9ffb5b9 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubCheckCmp.java @@ -0,0 +1,48 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.flow; + +import java.util.List; +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleFlowContext; +import jakarta.annotation.Resource; + +/** + * SampleSubCheckCmp + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月6日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月6日 + */ +@LiteflowComponent(id = "sampleSubCheckCmp", name = "子样检查") +public class SampleSubCheckCmp extends NodeComponent { + + @Resource + private BusinessSubSampleMapper businessSubSampleMapper; + + @Override + public void process() throws Exception { + SampleFlowContext sampleFlowContext = this.getContextBean(SampleFlowContext.class); + String sampleProcessNo = sampleFlowContext.getSampleProcessNo(); + List sampleIdList = sampleFlowContext.getSampleIdList(); + if (sampleIdList == null || sampleIdList.size() <= 0) { + throw new ServiceException(500, "样品ID列表不允许为空"); + } + List businessSubSampleDOList = businessSubSampleMapper.selectByIds(sampleIdList); + + boolean isSampleFlowKeyFail = businessSubSampleDOList.stream().anyMatch(p -> !p.getSampleFlowKey().equals(sampleProcessNo)); + if (isSampleFlowKeyFail) { + throw new ServiceException(500, "样品列表与当前流程不符"); + } + sampleFlowContext.setBusSubCsampleList(businessSubSampleDOList); + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubProcessUpdateCmp.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubProcessUpdateCmp.java new file mode 100644 index 0000000..55c4358 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubProcessUpdateCmp.java @@ -0,0 +1,67 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.flow; + +import java.time.LocalDateTime; +import java.util.List; + +import com.alibaba.fastjson2.JSON; +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleFlowContext; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleFlowDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSampleFlowService; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSubSampleService; +import cn.iocoder.yudao.module.qms.core.sampleflow.SampleFlowDefinition; +import cn.iocoder.yudao.module.qms.core.sampleflow.SampleFlowNode; +import jakarta.annotation.Resource; + +/** + * SampleSubProcessUpdateCmp + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月8日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月8日 + */ +@LiteflowComponent(id = "sampleSubProcessUpdateCmp", name = "子样流程节点更新") +public class SampleSubProcessUpdateCmp extends NodeComponent { + + @Resource + private ConfigSubSampleService configSubSampleService; + + @Resource + private ConfigSampleFlowService configSampleFlowService; + + @Override + public void process() throws Exception { + SampleFlowContext sampleFlowContext = this.getContextBean(SampleFlowContext.class); + String sampleProcessNo = sampleFlowContext.getSampleProcessNo(); +// LoginUser loginUser = sampleFlowContext.getLoginUser(); +// String loginRealname = sampleFlowContext.getLoginRealname(); + LocalDateTime currentDateTime = sampleFlowContext.getCurrentDateTime(); + List busSubCsampleList = sampleFlowContext.getBusSubCsampleList(); + for (BusinessSubSampleDO businessSubSample : busSubCsampleList) { + Long configSubSampleId = businessSubSample.getConfigSubSampleId(); + ConfigSubSampleDO configSubSample = configSubSampleService.getConfigSubSample(configSubSampleId); + String sampleFlowKey = configSubSample.getFlowKey(); + ConfigSampleFlowDO configSampleFlow = configSampleFlowService.getConfigSampleFlowByKey(sampleFlowKey); + String configSampleFlowContent = configSampleFlow.getContent(); + //样品流程定义 + SampleFlowDefinition sampleFlowDefinition = JSON.parseObject(configSampleFlowContent, SampleFlowDefinition.class); + List flowNodeList = sampleFlowDefinition.getFlowNodeList(); + SampleFlowNode flowNode = flowNodeList.stream().filter(f -> f.getNodeKey().equals(sampleProcessNo)).findFirst().orElse(null); + List nextFlowNodeList = flowNode.getNextFlowNodeList(); + SampleFlowNode nextFlowNode = nextFlowNodeList.stream().filter(f -> f.getIsDefault()).findFirst().orElse(null); + businessSubSample.setSampleFlowKey(nextFlowNode.getNodeKey()); + businessSubSample.setSampleFlowTime(currentDateTime); + } + + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/slot/SampleEntrustContext.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/slot/SampleEntrustContext.java new file mode 100644 index 0000000..847a11e --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/slot/SampleEntrustContext.java @@ -0,0 +1,91 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.slot; + +import java.time.LocalDateTime; +import java.util.List; + +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleAssayResultDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustProjectDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigEntrustSourceDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardMethodDO; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * SampleEntrustContext + * 样品委托上下文 + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月6日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月6日 + */ +@Data +@Accessors(chain = true) +public class SampleEntrustContext { + + /** 租户id **/ + private Long tenantId; + + /** 当前时间 **/ + private LocalDateTime currentDateTime = LocalDateTime.now(); + + /** 当前登录用户 **/ + private LoginUser loginUser; + + /** 当前登录人 **/ + private String loginRealname; + + /** 委托来源配置列表 **/ + private List configEntrustSourceList; + + /** + * 根据id获取委托来源配置 + * @param id 委托来源配置id + * @return + */ + public ConfigEntrustSourceDO getConfigEntrustSourceById(Long id) { + ConfigEntrustSourceDO configEntrustSource = null; + if (this.configEntrustSourceList != null && this.configEntrustSourceList.size() > 0) { + configEntrustSource = this.configEntrustSourceList.stream().filter(f -> id.equals(f.getId())).findFirst().orElse(null); + } + return configEntrustSource; + } + + /** 物料检测标准列表 **/ + private List materialAssayStandardList; + + /** 物料检测标准检测项目列表 **/ + private List materialAssayStandardDetailList; + + public MaterialAssayStandardDetailDO getMaterialAssayStandardDetailById(Long id) { + MaterialAssayStandardDetailDO materialAssayStandardDetail = null; + if (this.materialAssayStandardDetailList != null && this.materialAssayStandardDetailList.size() > 0) { + materialAssayStandardDetail = this.materialAssayStandardDetailList.stream().filter(f -> id.equals(f.getId())).findFirst().orElse(null); + } + return materialAssayStandardDetail; + } + + /** 物料检测标准与方法列表 **/ + private List materialAssayStandardMethodList; + + /** 委托登记单 **/ + private BusinessSampleEntrustRegistrationDO sampleEntrustRegistration; + + /** 委托登记样品明细 **/ + private List sampleEntrustDetailList; + + /** 委托登记样品检测项目明细 **/ + private List sampleEntrustProjectList; + + /** 样品委托来样品位 **/ + private List sampleAssayResultList; +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/slot/SampleFlowContext.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/slot/SampleFlowContext.java new file mode 100644 index 0000000..f967da5 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/slot/SampleFlowContext.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.slot; + +import java.time.LocalDateTime; +import java.util.List; + +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessHandoverRecordSubDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * SampleFlowContext + * 样品流转上下文 + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月6日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月6日 + */ +@Data +@Accessors(chain = true) +public class SampleFlowContext { + + /** 租户id **/ + private Long tenantId; + + /** 样品来源 1:主,2:子 **/ + private Integer sampleSourceType; + + /** 样品当前流程节点 **/ + private String sampleProcessNo; + + /** 样品id列表 **/ + private List sampleIdList; + + /** 主样信息 **/ + private List busBaseSampleList; + + /** 分样主样信息 **/ + private List busSubPsampleList; + + /** 分样子样信息 **/ + private List busSubCsampleList; + + /** 交接记录信息 **/ + private List busHandoverRecordSubList; + + /** 当前时间 **/ + private LocalDateTime currentDateTime = LocalDateTime.now(); + + /** 当前登录用户 **/ + private LoginUser loginUser; + + /** 当前登录人 **/ + private String loginRealname; + + /** 送样人 **/ + private String sendSampleOper; + + /** 收样人 **/ + private String receiveSampleOper; +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessBaseSampleService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessBaseSampleService.java new file mode 100644 index 0000000..e19bef2 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessBaseSampleService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 主样业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessBaseSampleService { + + /** + * 创建主样业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessBaseSampleRespVO createBusinessBaseSample(@Valid BusinessBaseSampleSaveReqVO createReqVO); + + /** + * 更新主样业务 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessBaseSample(@Valid BusinessBaseSampleSaveReqVO updateReqVO); + + /** + * 删除主样业务 + * + * @param id 编号 + */ + void deleteBusinessBaseSample(Long id); + + /** + * 批量删除主样业务 + * + * @param ids 编号 + */ + void deleteBusinessBaseSampleListByIds(List ids); + + /** + * 获得主样业务 + * + * @param id 编号 + * @return 主样业务 + */ + BusinessBaseSampleDO getBusinessBaseSample(Long id); + + /** + * 获得主样业务分页 + * + * @param pageReqVO 分页查询 + * @return 主样业务分页 + */ + PageResult getBusinessBaseSamplePage(BusinessBaseSamplePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessBaseSampleServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessBaseSampleServiceImpl.java new file mode 100644 index 0000000..2d9cbda --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessBaseSampleServiceImpl.java @@ -0,0 +1,91 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessBaseSampleMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.*; + +/** + * 主样业务 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class BusinessBaseSampleServiceImpl implements BusinessBaseSampleService { + + @Resource + private BusinessBaseSampleMapper businessBaseSampleMapper; + + @Override + public BusinessBaseSampleRespVO createBusinessBaseSample(BusinessBaseSampleSaveReqVO createReqVO) { + // 插入 + BusinessBaseSampleDO businessBaseSample = BeanUtils.toBean(createReqVO, BusinessBaseSampleDO.class); + businessBaseSampleMapper.insert(businessBaseSample); + // 返回 + return BeanUtils.toBean(businessBaseSample, BusinessBaseSampleRespVO.class); + } + + @Override + public void updateBusinessBaseSample(BusinessBaseSampleSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessBaseSampleExists(updateReqVO.getId()); + // 更新 + BusinessBaseSampleDO updateObj = BeanUtils.toBean(updateReqVO, BusinessBaseSampleDO.class); + businessBaseSampleMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessBaseSample(Long id) { + // 校验存在 + validateBusinessBaseSampleExists(id); + // 删除 + businessBaseSampleMapper.deleteById(id); + } + + @Override + public void deleteBusinessBaseSampleListByIds(List ids) { + // 校验存在 + validateBusinessBaseSampleExists(ids); + // 删除 + businessBaseSampleMapper.deleteByIds(ids); + } + + private void validateBusinessBaseSampleExists(List ids) { + List list = businessBaseSampleMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_BASE_SAMPLE_NOT_EXISTS); + } + } + + private void validateBusinessBaseSampleExists(Long id) { + if (businessBaseSampleMapper.selectById(id) == null) { + throw exception(BUSINESS_BASE_SAMPLE_NOT_EXISTS); + } + } + + @Override + public BusinessBaseSampleDO getBusinessBaseSample(Long id) { + return businessBaseSampleMapper.selectById(id); + } + + @Override + public PageResult getBusinessBaseSamplePage(BusinessBaseSamplePageReqVO pageReqVO) { + return businessBaseSampleMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessHandoverRecordSubService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessHandoverRecordSubService.java new file mode 100644 index 0000000..0a66dc1 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessHandoverRecordSubService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessHandoverRecordSubDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 子样交接记录业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessHandoverRecordSubService { + + /** + * 创建子样交接记录业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessHandoverRecordSubRespVO createBusinessHandoverRecordSub(@Valid BusinessHandoverRecordSubSaveReqVO createReqVO); + + /** + * 更新子样交接记录业务 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessHandoverRecordSub(@Valid BusinessHandoverRecordSubSaveReqVO updateReqVO); + + /** + * 删除子样交接记录业务 + * + * @param id 编号 + */ + void deleteBusinessHandoverRecordSub(Long id); + + /** + * 批量删除子样交接记录业务 + * + * @param ids 编号 + */ + void deleteBusinessHandoverRecordSubListByIds(List ids); + + /** + * 获得子样交接记录业务 + * + * @param id 编号 + * @return 子样交接记录业务 + */ + BusinessHandoverRecordSubDO getBusinessHandoverRecordSub(Long id); + + /** + * 获得子样交接记录业务分页 + * + * @param pageReqVO 分页查询 + * @return 子样交接记录业务分页 + */ + PageResult getBusinessHandoverRecordSubPage(BusinessHandoverRecordSubPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessHandoverRecordSubServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessHandoverRecordSubServiceImpl.java new file mode 100644 index 0000000..b2a12af --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessHandoverRecordSubServiceImpl.java @@ -0,0 +1,91 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessHandoverRecordSubDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessHandoverRecordSubMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.*; + +/** + * 子样交接记录业务 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class BusinessHandoverRecordSubServiceImpl implements BusinessHandoverRecordSubService { + + @Resource + private BusinessHandoverRecordSubMapper businessHandoverRecordSubMapper; + + @Override + public BusinessHandoverRecordSubRespVO createBusinessHandoverRecordSub(BusinessHandoverRecordSubSaveReqVO createReqVO) { + // 插入 + BusinessHandoverRecordSubDO businessHandoverRecordSub = BeanUtils.toBean(createReqVO, BusinessHandoverRecordSubDO.class); + businessHandoverRecordSubMapper.insert(businessHandoverRecordSub); + // 返回 + return BeanUtils.toBean(businessHandoverRecordSub, BusinessHandoverRecordSubRespVO.class); + } + + @Override + public void updateBusinessHandoverRecordSub(BusinessHandoverRecordSubSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessHandoverRecordSubExists(updateReqVO.getId()); + // 更新 + BusinessHandoverRecordSubDO updateObj = BeanUtils.toBean(updateReqVO, BusinessHandoverRecordSubDO.class); + businessHandoverRecordSubMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessHandoverRecordSub(Long id) { + // 校验存在 + validateBusinessHandoverRecordSubExists(id); + // 删除 + businessHandoverRecordSubMapper.deleteById(id); + } + + @Override + public void deleteBusinessHandoverRecordSubListByIds(List ids) { + // 校验存在 + validateBusinessHandoverRecordSubExists(ids); + // 删除 + businessHandoverRecordSubMapper.deleteByIds(ids); + } + + private void validateBusinessHandoverRecordSubExists(List ids) { + List list = businessHandoverRecordSubMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_HANDOVER_RECORD_SUB_NOT_EXISTS); + } + } + + private void validateBusinessHandoverRecordSubExists(Long id) { + if (businessHandoverRecordSubMapper.selectById(id) == null) { + throw exception(BUSINESS_HANDOVER_RECORD_SUB_NOT_EXISTS); + } + } + + @Override + public BusinessHandoverRecordSubDO getBusinessHandoverRecordSub(Long id) { + return businessHandoverRecordSubMapper.selectById(id); + } + + @Override + public PageResult getBusinessHandoverRecordSubPage(BusinessHandoverRecordSubPageReqVO pageReqVO) { + return businessHandoverRecordSubMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleAssayResultService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleAssayResultService.java new file mode 100644 index 0000000..a1729ac --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleAssayResultService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleAssayResultDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 委检登记来样品位 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessSampleAssayResultService { + + /** + * 创建委检登记来样品位 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessSampleAssayResultRespVO createBusinessSampleAssayResult(@Valid BusinessSampleAssayResultSaveReqVO createReqVO); + + /** + * 更新委检登记来样品位 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessSampleAssayResult(@Valid BusinessSampleAssayResultSaveReqVO updateReqVO); + + /** + * 删除委检登记来样品位 + * + * @param id 编号 + */ + void deleteBusinessSampleAssayResult(Long id); + + /** + * 批量删除委检登记来样品位 + * + * @param ids 编号 + */ + void deleteBusinessSampleAssayResultListByIds(List ids); + + /** + * 获得委检登记来样品位 + * + * @param id 编号 + * @return 委检登记来样品位 + */ + BusinessSampleAssayResultDO getBusinessSampleAssayResult(Long id); + + /** + * 获得委检登记来样品位分页 + * + * @param pageReqVO 分页查询 + * @return 委检登记来样品位分页 + */ + PageResult getBusinessSampleAssayResultPage(BusinessSampleAssayResultPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleAssayResultServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleAssayResultServiceImpl.java new file mode 100644 index 0000000..4f4cd23 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleAssayResultServiceImpl.java @@ -0,0 +1,91 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleAssayResultDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleAssayResultMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.*; + +/** + * 委检登记来样品位 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class BusinessSampleAssayResultServiceImpl implements BusinessSampleAssayResultService { + + @Resource + private BusinessSampleAssayResultMapper businessSampleAssayResultMapper; + + @Override + public BusinessSampleAssayResultRespVO createBusinessSampleAssayResult(BusinessSampleAssayResultSaveReqVO createReqVO) { + // 插入 + BusinessSampleAssayResultDO businessSampleAssayResult = BeanUtils.toBean(createReqVO, BusinessSampleAssayResultDO.class); + businessSampleAssayResultMapper.insert(businessSampleAssayResult); + // 返回 + return BeanUtils.toBean(businessSampleAssayResult, BusinessSampleAssayResultRespVO.class); + } + + @Override + public void updateBusinessSampleAssayResult(BusinessSampleAssayResultSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessSampleAssayResultExists(updateReqVO.getId()); + // 更新 + BusinessSampleAssayResultDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSampleAssayResultDO.class); + businessSampleAssayResultMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessSampleAssayResult(Long id) { + // 校验存在 + validateBusinessSampleAssayResultExists(id); + // 删除 + businessSampleAssayResultMapper.deleteById(id); + } + + @Override + public void deleteBusinessSampleAssayResultListByIds(List ids) { + // 校验存在 + validateBusinessSampleAssayResultExists(ids); + // 删除 + businessSampleAssayResultMapper.deleteByIds(ids); + } + + private void validateBusinessSampleAssayResultExists(List ids) { + List list = businessSampleAssayResultMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_SAMPLE_ASSAY_RESULT_NOT_EXISTS); + } + } + + private void validateBusinessSampleAssayResultExists(Long id) { + if (businessSampleAssayResultMapper.selectById(id) == null) { + throw exception(BUSINESS_SAMPLE_ASSAY_RESULT_NOT_EXISTS); + } + } + + @Override + public BusinessSampleAssayResultDO getBusinessSampleAssayResult(Long id) { + return businessSampleAssayResultMapper.selectById(id); + } + + @Override + public PageResult getBusinessSampleAssayResultPage(BusinessSampleAssayResultPageReqVO pageReqVO) { + return businessSampleAssayResultMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustDetailService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustDetailService.java new file mode 100644 index 0000000..30eb403 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustDetailService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustDetailPageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustDetailRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustDetailSaveReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 委检登记样品明细 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessSampleEntrustDetailService { + + /** + * 创建委检登记样品明细 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessSampleEntrustDetailRespVO createBusinessSampleEntrustDetail(@Valid BusinessSampleEntrustDetailSaveReqVO createReqVO); + + /** + * 更新委检登记样品明细 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessSampleEntrustDetail(@Valid BusinessSampleEntrustDetailSaveReqVO updateReqVO); + + /** + * 删除委检登记样品明细 + * + * @param id 编号 + */ + void deleteBusinessSampleEntrustDetail(Long id); + + /** + * 批量删除委检登记样品明细 + * + * @param ids 编号 + */ + void deleteBusinessSampleEntrustDetailListByIds(List ids); + + /** + * 获得委检登记样品明细 + * + * @param id 编号 + * @return 委检登记样品明细 + */ + BusinessSampleEntrustDetailDO getBusinessSampleEntrustDetail(Long id); + + /** + * 获得委检登记样品明细分页 + * + * @param pageReqVO 分页查询 + * @return 委检登记样品明细分页 + */ + PageResult getBusinessSampleEntrustDetailPage(BusinessSampleEntrustDetailPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustDetailServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustDetailServiceImpl.java new file mode 100644 index 0000000..657f73f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustDetailServiceImpl.java @@ -0,0 +1,91 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustDetailMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.*; + +/** + * 委检登记样品明细 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class BusinessSampleEntrustDetailServiceImpl implements BusinessSampleEntrustDetailService { + + @Resource + private BusinessSampleEntrustDetailMapper businessSampleEntrustDetailMapper; + + @Override + public BusinessSampleEntrustDetailRespVO createBusinessSampleEntrustDetail(BusinessSampleEntrustDetailSaveReqVO createReqVO) { + // 插入 + BusinessSampleEntrustDetailDO businessSampleEntrustDetail = BeanUtils.toBean(createReqVO, BusinessSampleEntrustDetailDO.class); + businessSampleEntrustDetailMapper.insert(businessSampleEntrustDetail); + // 返回 + return BeanUtils.toBean(businessSampleEntrustDetail, BusinessSampleEntrustDetailRespVO.class); + } + + @Override + public void updateBusinessSampleEntrustDetail(BusinessSampleEntrustDetailSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessSampleEntrustDetailExists(updateReqVO.getId()); + // 更新 + BusinessSampleEntrustDetailDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSampleEntrustDetailDO.class); + businessSampleEntrustDetailMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessSampleEntrustDetail(Long id) { + // 校验存在 + validateBusinessSampleEntrustDetailExists(id); + // 删除 + businessSampleEntrustDetailMapper.deleteById(id); + } + + @Override + public void deleteBusinessSampleEntrustDetailListByIds(List ids) { + // 校验存在 + validateBusinessSampleEntrustDetailExists(ids); + // 删除 + businessSampleEntrustDetailMapper.deleteByIds(ids); + } + + private void validateBusinessSampleEntrustDetailExists(List ids) { + List list = businessSampleEntrustDetailMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_SAMPLE_ENTRUST_DETAIL_NOT_EXISTS); + } + } + + private void validateBusinessSampleEntrustDetailExists(Long id) { + if (businessSampleEntrustDetailMapper.selectById(id) == null) { + throw exception(BUSINESS_SAMPLE_ENTRUST_DETAIL_NOT_EXISTS); + } + } + + @Override + public BusinessSampleEntrustDetailDO getBusinessSampleEntrustDetail(Long id) { + return businessSampleEntrustDetailMapper.selectById(id); + } + + @Override + public PageResult getBusinessSampleEntrustDetailPage(BusinessSampleEntrustDetailPageReqVO pageReqVO) { + return businessSampleEntrustDetailMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustProjectService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustProjectService.java new file mode 100644 index 0000000..03a61e2 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustProjectService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustProjectDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 委检样品检测项目业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessSampleEntrustProjectService { + + /** + * 创建委检样品检测项目业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessSampleEntrustProjectRespVO createBusinessSampleEntrustProject(@Valid BusinessSampleEntrustProjectSaveReqVO createReqVO); + + /** + * 更新委检样品检测项目业务 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessSampleEntrustProject(@Valid BusinessSampleEntrustProjectSaveReqVO updateReqVO); + + /** + * 删除委检样品检测项目业务 + * + * @param id 编号 + */ + void deleteBusinessSampleEntrustProject(Long id); + + /** + * 批量删除委检样品检测项目业务 + * + * @param ids 编号 + */ + void deleteBusinessSampleEntrustProjectListByIds(List ids); + + /** + * 获得委检样品检测项目业务 + * + * @param id 编号 + * @return 委检样品检测项目业务 + */ + BusinessSampleEntrustProjectDO getBusinessSampleEntrustProject(Long id); + + /** + * 获得委检样品检测项目业务分页 + * + * @param pageReqVO 分页查询 + * @return 委检样品检测项目业务分页 + */ + PageResult getBusinessSampleEntrustProjectPage(BusinessSampleEntrustProjectPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustProjectServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustProjectServiceImpl.java new file mode 100644 index 0000000..54b0737 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustProjectServiceImpl.java @@ -0,0 +1,91 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustProjectDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustProjectMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.*; + +/** + * 委检样品检测项目业务 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class BusinessSampleEntrustProjectServiceImpl implements BusinessSampleEntrustProjectService { + + @Resource + private BusinessSampleEntrustProjectMapper businessSampleEntrustProjectMapper; + + @Override + public BusinessSampleEntrustProjectRespVO createBusinessSampleEntrustProject(BusinessSampleEntrustProjectSaveReqVO createReqVO) { + // 插入 + BusinessSampleEntrustProjectDO businessSampleEntrustProject = BeanUtils.toBean(createReqVO, BusinessSampleEntrustProjectDO.class); + businessSampleEntrustProjectMapper.insert(businessSampleEntrustProject); + // 返回 + return BeanUtils.toBean(businessSampleEntrustProject, BusinessSampleEntrustProjectRespVO.class); + } + + @Override + public void updateBusinessSampleEntrustProject(BusinessSampleEntrustProjectSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessSampleEntrustProjectExists(updateReqVO.getId()); + // 更新 + BusinessSampleEntrustProjectDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSampleEntrustProjectDO.class); + businessSampleEntrustProjectMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessSampleEntrustProject(Long id) { + // 校验存在 + validateBusinessSampleEntrustProjectExists(id); + // 删除 + businessSampleEntrustProjectMapper.deleteById(id); + } + + @Override + public void deleteBusinessSampleEntrustProjectListByIds(List ids) { + // 校验存在 + validateBusinessSampleEntrustProjectExists(ids); + // 删除 + businessSampleEntrustProjectMapper.deleteByIds(ids); + } + + private void validateBusinessSampleEntrustProjectExists(List ids) { + List list = businessSampleEntrustProjectMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_SAMPLE_ENTRUST_PROJECT_NOT_EXISTS); + } + } + + private void validateBusinessSampleEntrustProjectExists(Long id) { + if (businessSampleEntrustProjectMapper.selectById(id) == null) { + throw exception(BUSINESS_SAMPLE_ENTRUST_PROJECT_NOT_EXISTS); + } + } + + @Override + public BusinessSampleEntrustProjectDO getBusinessSampleEntrustProject(Long id) { + return businessSampleEntrustProjectMapper.selectById(id); + } + + @Override + public PageResult getBusinessSampleEntrustProjectPage(BusinessSampleEntrustProjectPageReqVO pageReqVO) { + return businessSampleEntrustProjectMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustRegistrationService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustRegistrationService.java new file mode 100644 index 0000000..1aeb9e0 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustRegistrationService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 委检登记业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessSampleEntrustRegistrationService { + + /** + * 创建委检登记业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessSampleEntrustRegistrationRespVO createBusinessSampleEntrustRegistration(@Valid BusinessSampleEntrustRegistrationSaveReqVO createReqVO); + + /** + * 更新委检登记业务 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessSampleEntrustRegistration(@Valid BusinessSampleEntrustRegistrationSaveReqVO updateReqVO); + + /** + * 删除委检登记业务 + * + * @param id 编号 + */ + void deleteBusinessSampleEntrustRegistration(Long id); + + /** + * 批量删除委检登记业务 + * + * @param ids 编号 + */ + void deleteBusinessSampleEntrustRegistrationListByIds(List ids); + + /** + * 获得委检登记业务 + * + * @param id 编号 + * @return 委检登记业务 + */ + BusinessSampleEntrustRegistrationDO getBusinessSampleEntrustRegistration(Long id); + + /** + * 获得委检登记业务分页 + * + * @param pageReqVO 分页查询 + * @return 委检登记业务分页 + */ + PageResult getBusinessSampleEntrustRegistrationPage(BusinessSampleEntrustRegistrationPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustRegistrationServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustRegistrationServiceImpl.java new file mode 100644 index 0000000..68cac6d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustRegistrationServiceImpl.java @@ -0,0 +1,91 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustRegistrationMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.*; + +/** + * 委检登记业务 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class BusinessSampleEntrustRegistrationServiceImpl implements BusinessSampleEntrustRegistrationService { + + @Resource + private BusinessSampleEntrustRegistrationMapper businessSampleEntrustRegistrationMapper; + + @Override + public BusinessSampleEntrustRegistrationRespVO createBusinessSampleEntrustRegistration(BusinessSampleEntrustRegistrationSaveReqVO createReqVO) { + // 插入 + BusinessSampleEntrustRegistrationDO businessSampleEntrustRegistration = BeanUtils.toBean(createReqVO, BusinessSampleEntrustRegistrationDO.class); + businessSampleEntrustRegistrationMapper.insert(businessSampleEntrustRegistration); + // 返回 + return BeanUtils.toBean(businessSampleEntrustRegistration, BusinessSampleEntrustRegistrationRespVO.class); + } + + @Override + public void updateBusinessSampleEntrustRegistration(BusinessSampleEntrustRegistrationSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessSampleEntrustRegistrationExists(updateReqVO.getId()); + // 更新 + BusinessSampleEntrustRegistrationDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSampleEntrustRegistrationDO.class); + businessSampleEntrustRegistrationMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessSampleEntrustRegistration(Long id) { + // 校验存在 + validateBusinessSampleEntrustRegistrationExists(id); + // 删除 + businessSampleEntrustRegistrationMapper.deleteById(id); + } + + @Override + public void deleteBusinessSampleEntrustRegistrationListByIds(List ids) { + // 校验存在 + validateBusinessSampleEntrustRegistrationExists(ids); + // 删除 + businessSampleEntrustRegistrationMapper.deleteByIds(ids); + } + + private void validateBusinessSampleEntrustRegistrationExists(List ids) { + List list = businessSampleEntrustRegistrationMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_SAMPLE_ENTRUST_REGISTRATION_NOT_EXISTS); + } + } + + private void validateBusinessSampleEntrustRegistrationExists(Long id) { + if (businessSampleEntrustRegistrationMapper.selectById(id) == null) { + throw exception(BUSINESS_SAMPLE_ENTRUST_REGISTRATION_NOT_EXISTS); + } + } + + @Override + public BusinessSampleEntrustRegistrationDO getBusinessSampleEntrustRegistration(Long id) { + return businessSampleEntrustRegistrationMapper.selectById(id); + } + + @Override + public PageResult getBusinessSampleEntrustRegistrationPage(BusinessSampleEntrustRegistrationPageReqVO pageReqVO) { + return businessSampleEntrustRegistrationMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubParentSampleService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubParentSampleService.java new file mode 100644 index 0000000..2d04cfe --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubParentSampleService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 分样业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessSubParentSampleService { + + /** + * 创建分样业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessSubParentSampleRespVO createBusinessSubParentSample(@Valid BusinessSubParentSampleSaveReqVO createReqVO); + + /** + * 更新分样业务 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessSubParentSample(@Valid BusinessSubParentSampleSaveReqVO updateReqVO); + + /** + * 删除分样业务 + * + * @param id 编号 + */ + void deleteBusinessSubParentSample(Long id); + + /** + * 批量删除分样业务 + * + * @param ids 编号 + */ + void deleteBusinessSubParentSampleListByIds(List ids); + + /** + * 获得分样业务 + * + * @param id 编号 + * @return 分样业务 + */ + BusinessSubParentSampleDO getBusinessSubParentSample(Long id); + + /** + * 获得分样业务分页 + * + * @param pageReqVO 分页查询 + * @return 分样业务分页 + */ + PageResult getBusinessSubParentSamplePage(BusinessSubParentSamplePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubParentSampleServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubParentSampleServiceImpl.java new file mode 100644 index 0000000..194b770 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubParentSampleServiceImpl.java @@ -0,0 +1,91 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.*; + +/** + * 分样业务 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class BusinessSubParentSampleServiceImpl implements BusinessSubParentSampleService { + + @Resource + private BusinessSubParentSampleMapper businessSubParentSampleMapper; + + @Override + public BusinessSubParentSampleRespVO createBusinessSubParentSample(BusinessSubParentSampleSaveReqVO createReqVO) { + // 插入 + BusinessSubParentSampleDO businessSubParentSample = BeanUtils.toBean(createReqVO, BusinessSubParentSampleDO.class); + businessSubParentSampleMapper.insert(businessSubParentSample); + // 返回 + return BeanUtils.toBean(businessSubParentSample, BusinessSubParentSampleRespVO.class); + } + + @Override + public void updateBusinessSubParentSample(BusinessSubParentSampleSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessSubParentSampleExists(updateReqVO.getId()); + // 更新 + BusinessSubParentSampleDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSubParentSampleDO.class); + businessSubParentSampleMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessSubParentSample(Long id) { + // 校验存在 + validateBusinessSubParentSampleExists(id); + // 删除 + businessSubParentSampleMapper.deleteById(id); + } + + @Override + public void deleteBusinessSubParentSampleListByIds(List ids) { + // 校验存在 + validateBusinessSubParentSampleExists(ids); + // 删除 + businessSubParentSampleMapper.deleteByIds(ids); + } + + private void validateBusinessSubParentSampleExists(List ids) { + List list = businessSubParentSampleMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_SUB_PARENT_SAMPLE_NOT_EXISTS); + } + } + + private void validateBusinessSubParentSampleExists(Long id) { + if (businessSubParentSampleMapper.selectById(id) == null) { + throw exception(BUSINESS_SUB_PARENT_SAMPLE_NOT_EXISTS); + } + } + + @Override + public BusinessSubParentSampleDO getBusinessSubParentSample(Long id) { + return businessSubParentSampleMapper.selectById(id); + } + + @Override + public PageResult getBusinessSubParentSamplePage(BusinessSubParentSamplePageReqVO pageReqVO) { + return businessSubParentSampleMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleService.java new file mode 100644 index 0000000..0ec2fe3 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSubSamplePageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSubSampleRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSubSampleSaveReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 子样业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessSubSampleService { + + /** + * 创建子样业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessSubSampleRespVO createinessSubSample(@Valid BusinessSubSampleSaveReqVO createReqVO); + + /** + * 更新子样业务 + * + * @param updateReqVO 更新信息 + */ + void updateinessSubSample(@Valid BusinessSubSampleSaveReqVO updateReqVO); + + /** + * 删除子样业务 + * + * @param id 编号 + */ + void deleteinessSubSample(Long id); + + /** + * 批量删除子样业务 + * + * @param ids 编号 + */ + void deleteinessSubSampleListByIds(List ids); + + /** + * 获得子样业务 + * + * @param id 编号 + * @return 子样业务 + */ + BusinessSubSampleDO getinessSubSample(Long id); + + /** + * 获得子样业务分页 + * + * @param pageReqVO 分页查询 + * @return 子样业务分页 + */ + PageResult getinessSubSamplePage(BusinessSubSamplePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleServiceImpl.java new file mode 100644 index 0000000..5aafe2d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleServiceImpl.java @@ -0,0 +1,93 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSubSamplePageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSubSampleRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSubSampleSaveReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.*; + +/** + * 子样业务 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class BusinessSubSampleServiceImpl implements BusinessSubSampleService { + + @Resource + private BusinessSubSampleMapper businessSubSampleMapper; + + @Override + public BusinessSubSampleRespVO createinessSubSample(BusinessSubSampleSaveReqVO createReqVO) { + // 插入 + BusinessSubSampleDO inessSubSample = BeanUtils.toBean(createReqVO, BusinessSubSampleDO.class); + businessSubSampleMapper.insert(inessSubSample); + // 返回 + return BeanUtils.toBean(inessSubSample, BusinessSubSampleRespVO.class); + } + + @Override + public void updateinessSubSample(BusinessSubSampleSaveReqVO updateReqVO) { + // 校验存在 + validateinessSubSampleExists(updateReqVO.getId()); + // 更新 + BusinessSubSampleDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSubSampleDO.class); + businessSubSampleMapper.updateById(updateObj); + } + + @Override + public void deleteinessSubSample(Long id) { + // 校验存在 + validateinessSubSampleExists(id); + // 删除 + businessSubSampleMapper.deleteById(id); + } + + @Override + public void deleteinessSubSampleListByIds(List ids) { + // 校验存在 + validateinessSubSampleExists(ids); + // 删除 + businessSubSampleMapper.deleteByIds(ids); + } + + private void validateinessSubSampleExists(List ids) { + List list = businessSubSampleMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_SUB_SAMPLE_NOT_EXISTS); + } + } + + private void validateinessSubSampleExists(Long id) { + if (businessSubSampleMapper.selectById(id) == null) { + throw exception(BUSINESS_SUB_SAMPLE_NOT_EXISTS); + } + } + + @Override + public BusinessSubSampleDO getinessSubSample(Long id) { + return businessSubSampleMapper.selectById(id); + } + + @Override + public PageResult getinessSubSamplePage(BusinessSubSamplePageReqVO pageReqVO) { + return businessSubSampleMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleEntrustService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleEntrustService.java new file mode 100644 index 0000000..b97fbee --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleEntrustService.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import java.util.List; + +import com.yomahub.liteflow.flow.LiteflowResponse; + +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustRegistrationExtendRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustRegistrationSubmitReqVO; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleEntrustParam; +import jakarta.validation.Valid; + +/** + * SampleEntrustService + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月9日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月9日 + */ +public interface SampleEntrustService { + + LiteflowResponse create(@Valid SampleEntrustParam sampleEntrustParam); + + LiteflowResponse update(@Valid SampleEntrustParam sampleEntrustParam); + + BusinessSampleEntrustRegistrationExtendRespVO detail(Long id); + + void delete(Long id); + + void deleteList(List ids); + + void submit(@Valid BusinessSampleEntrustRegistrationSubmitReqVO req); +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleEntrustServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleEntrustServiceImpl.java new file mode 100644 index 0000000..e9e837f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleEntrustServiceImpl.java @@ -0,0 +1,187 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.yomahub.liteflow.core.FlowExecutor; +import com.yomahub.liteflow.flow.LiteflowResponse; + +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.MPJLambdaWrapperX; +import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustDetailExtendRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustProjectExtendRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustRegistrationExtendRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustRegistrationSubmitReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleAssayResultDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustProjectDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleAssayResultMapper; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustDetailMapper; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustProjectMapper; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustRegistrationMapper; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleEntrustParam; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleEntrustContext; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryProjectDO; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; + +/** + * SampleEntrustServiceImpl + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月10日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月10日 + */ +@Service +public class SampleEntrustServiceImpl implements SampleEntrustService { + + @Resource + private FlowExecutor flowExecutor; + + @Resource + private BusinessSampleEntrustRegistrationMapper businessSampleEntrustRegistrationMapper; + + @Resource + private BusinessSampleEntrustDetailMapper businessSampleEntrustDetailMapper; + + @Resource + private BusinessSampleEntrustProjectMapper businessSampleEntrustProjectMapper; + + @Resource + private BusinessSampleAssayResultMapper businessSampleAssayResultMapper; + + @Override + @Transactional(rollbackFor = Exception.class) + public LiteflowResponse create(@Valid SampleEntrustParam sampleEntrustParam) { + Long tenantId = TenantContextHolder.getRequiredTenantId(); + return flowExecutor.execute2Resp("sampleEntrustChain" + tenantId, sampleEntrustParam, SampleEntrustContext.class); + } + + @Override + public BusinessSampleEntrustRegistrationExtendRespVO detail(Long id) { + BusinessSampleEntrustRegistrationDO businessSampleEntrustRegistrationDO = businessSampleEntrustRegistrationMapper.selectById(id); + BusinessSampleEntrustRegistrationExtendRespVO businessSampleEntrustRegistrationExtendRespVO = BeanUtils.toBean(businessSampleEntrustRegistrationDO, BusinessSampleEntrustRegistrationExtendRespVO.class); + + List sampleEntrustDetailExtendRespVOList = new ArrayList<>(); + List sampleEntrustDetailList = businessSampleEntrustDetailMapper.selectList(new LambdaQueryWrapperX().eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, id)); + BusinessSampleEntrustDetailExtendRespVO businessSampleEntrustDetailExtendRespVO = null; + for (BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO : sampleEntrustDetailList) { + businessSampleEntrustDetailExtendRespVO = BeanUtils.toBean(businessSampleEntrustDetailDO, BusinessSampleEntrustDetailExtendRespVO.class); + + List businessSampleEntrustProjectExtendRespVOList = businessSampleEntrustProjectMapper.selectJoinList(BusinessSampleEntrustProjectExtendRespVO.class, new MPJLambdaWrapperX() + .selectAll(BusinessSampleEntrustProjectDO.class) + .selectAs(DictionaryProjectDO::getCode, BusinessSampleEntrustProjectExtendRespVO::getProjectCode) + .selectAs(DictionaryProjectDO::getName, BusinessSampleEntrustProjectExtendRespVO::getProjectName) + .selectAs(DictionaryProjectDO::getSimpleName, BusinessSampleEntrustProjectExtendRespVO::getProjectSimpleName) + .selectAs(DictionaryProjectDO::getShowName, BusinessSampleEntrustProjectExtendRespVO::getProjectShowName) + .leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessSampleEntrustProjectDO::getDictionaryProjectId) + .eq(BusinessSampleEntrustProjectDO::getBusinessSampleEntrustDetailId, businessSampleEntrustDetailDO.getId())); + +// List sampleEntrustProjectList = businessSampleEntrustProjectMapper.selectList(new LambdaQueryWrapperX().eq(BusinessSampleEntrustProjectDO::getBusinessSampleEntrustDetailId, businessSampleEntrustDetailDO.getId())); +// List businessSampleEntrustProjectExtendRespVOList = BeanUtils.toBean(sampleEntrustProjectList, BusinessSampleEntrustProjectExtendRespVO.class); + + businessSampleEntrustDetailExtendRespVO.setSampleEntrustDetailProjectList(businessSampleEntrustProjectExtendRespVOList); + + sampleEntrustDetailExtendRespVOList.add(businessSampleEntrustDetailExtendRespVO); + } + businessSampleEntrustRegistrationExtendRespVO.setSampleEntrustDetailList(sampleEntrustDetailExtendRespVOList); + + return businessSampleEntrustRegistrationExtendRespVO; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public LiteflowResponse update(@Valid SampleEntrustParam sampleEntrustParam) { + Long tenantId = TenantContextHolder.getRequiredTenantId(); + return flowExecutor.execute2Resp("sampleEntrustChain" + tenantId, sampleEntrustParam, SampleEntrustContext.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Long id) { + if (id == null) { + throw new ServiceException(500, "委托登记id不允许为空"); + } + if (businessSampleEntrustRegistrationMapper.selectById(id) == null) { + throw new ServiceException(500, "委托登记业务不存在"); + } + + List sampleEntrustDetailList = businessSampleEntrustDetailMapper.selectList(new LambdaQueryWrapperX().eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, id)); + if (sampleEntrustDetailList != null && sampleEntrustDetailList.size() > 0) { + List sampleEntrustDetailIdList = sampleEntrustDetailList.stream().map(m -> m.getId()).collect(Collectors.toList()); + List sampleEntrustProjectList = businessSampleEntrustProjectMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleEntrustProjectDO::getBusinessSampleEntrustDetailId, sampleEntrustDetailIdList)); + if (sampleEntrustProjectList != null && sampleEntrustProjectList.size() > 0) { + List sampleEntrustProjectIdList = sampleEntrustProjectList.stream().map(m -> m.getId()).collect(Collectors.toList()); + //删除样品对应的检验项目 + businessSampleEntrustProjectMapper.deleteByIds(sampleEntrustProjectIdList); + } + List sampleAssayResultList = businessSampleAssayResultMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleAssayResultDO::getBusinessSampleEntrustDetailId, sampleEntrustDetailIdList)); + if (sampleAssayResultList != null && sampleAssayResultList.size() > 0) { + List sampleAssayResultIdList = sampleAssayResultList.stream().map(m -> m.getId()).collect(Collectors.toList()); + //删除来样品位 + businessSampleAssayResultMapper.deleteByIds(sampleAssayResultIdList); + } + + //删除委托登记明细 + businessSampleEntrustDetailMapper.deleteByIds(sampleEntrustDetailIdList); + } + //删除委托登记 + businessSampleEntrustRegistrationMapper.deleteById(id); + + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteList(List ids) { + if (ids == null || ids.size() <= 0) { + throw new ServiceException(500, "委托登记id列表不允许为空"); + } + List sampleEntrustRegistrationList = businessSampleEntrustRegistrationMapper.selectByIds(ids); + if (sampleEntrustRegistrationList == null || sampleEntrustRegistrationList.size() != ids.size()) { + throw new ServiceException(500, "委托登记业务不存在"); + } + + List sampleEntrustDetailList = businessSampleEntrustDetailMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, ids)); + if (sampleEntrustDetailList != null && sampleEntrustDetailList.size() > 0) { + List sampleEntrustDetailIdList = sampleEntrustDetailList.stream().map(m -> m.getId()).collect(Collectors.toList()); + List sampleEntrustProjectList = businessSampleEntrustProjectMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleEntrustProjectDO::getBusinessSampleEntrustDetailId, sampleEntrustDetailIdList)); + if (sampleEntrustProjectList != null && sampleEntrustProjectList.size() > 0) { + List sampleEntrustProjectIdList = sampleEntrustProjectList.stream().map(m -> m.getId()).collect(Collectors.toList()); + //删除样品对应的检验项目 + businessSampleEntrustProjectMapper.deleteByIds(sampleEntrustProjectIdList); + } + List sampleAssayResultList = businessSampleAssayResultMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleAssayResultDO::getBusinessSampleEntrustDetailId, sampleEntrustDetailIdList)); + if (sampleAssayResultList != null && sampleAssayResultList.size() > 0) { + List sampleAssayResultIdList = sampleAssayResultList.stream().map(m -> m.getId()).collect(Collectors.toList()); + //删除来样品位 + businessSampleAssayResultMapper.deleteByIds(sampleAssayResultIdList); + } + + //删除委托登记明细 + businessSampleEntrustDetailMapper.deleteByIds(sampleEntrustDetailIdList); + } + //删除委托登记 + businessSampleEntrustRegistrationMapper.deleteByIds(ids); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void submit(@Valid BusinessSampleEntrustRegistrationSubmitReqVO req) { + // TODO Auto-generated method stub + + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleFlowService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleFlowService.java new file mode 100644 index 0000000..b5d7e5b --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleFlowService.java @@ -0,0 +1,17 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +/** + * SampleFlowService + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月9日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月9日 + */ +public interface SampleFlowService { + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleFlowServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleFlowServiceImpl.java new file mode 100644 index 0000000..288a834 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleFlowServiceImpl.java @@ -0,0 +1,20 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import org.springframework.stereotype.Service; + +/** + * SampleFlowServiceImpl + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月9日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月9日 + */ +@Service +public class SampleFlowServiceImpl implements SampleFlowService { + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/BaseSampleController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/BaseSampleController.java new file mode 100644 index 0000000..89eef54 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/BaseSampleController.java @@ -0,0 +1,116 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSamplePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSampleRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSampleSaveReqVO; +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.BaseSampleDO; +import cn.iocoder.yudao.module.qms.business.config.service.BaseSampleService; + +@Tag(name = "管理后台 - 样品大类管理") +@RestController +@RequestMapping("/qms/base-sample") +@Validated +public class BaseSampleController implements BusinessControllerMarker { + + + @Resource + private BaseSampleService baseSampleService; + + @PostMapping("/create") + @Operation(summary = "创建样品大类管理") + @PreAuthorize("@ss.hasPermission('qms:base-sample:create')") + public CommonResult createBaseSample(@Valid @RequestBody BaseSampleSaveReqVO createReqVO) { + return success(baseSampleService.createBaseSample(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新样品大类管理") + @PreAuthorize("@ss.hasPermission('qms:base-sample:update')") + public CommonResult updateBaseSample(@Valid @RequestBody BaseSampleSaveReqVO updateReqVO) { + baseSampleService.updateBaseSample(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除样品大类管理") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:base-sample:delete')") + public CommonResult deleteBaseSample(@RequestParam("id") Long id) { + baseSampleService.deleteBaseSample(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除样品大类管理") + @PreAuthorize("@ss.hasPermission('qms:base-sample:delete')") + public CommonResult deleteBaseSampleList(@RequestBody BatchDeleteReqVO req) { + baseSampleService.deleteBaseSampleListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得样品大类管理") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:base-sample:query')") + public CommonResult getBaseSample(@RequestParam("id") Long id) { + BaseSampleDO baseSample = baseSampleService.getBaseSample(id); + return success(BeanUtils.toBean(baseSample, BaseSampleRespVO.class)); + } + + @GetMapping("/getBaseSampleListWithAssayStandardCount") + @Operation(summary = "获得样品大类选项-含检测标准数") + public CommonResult> getBaseSampleListWithAssayStandardCount() { + List pageResult = baseSampleService.getBaseSampleListWithAssayStandardCount(); + return success(BeanUtils.toBean(pageResult, BaseSampleRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得样品大类管理分页") + @PreAuthorize("@ss.hasPermission('qms:base-sample:query')") + public CommonResult> getBaseSamplePage(@Valid BaseSamplePageReqVO pageReqVO) { + PageResult pageResult = baseSampleService.getBaseSamplePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BaseSampleRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出样品大类管理 Excel") + @PreAuthorize("@ss.hasPermission('qms:base-sample:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBaseSampleExcel(@Valid BaseSamplePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = baseSampleService.getBaseSamplePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "样品大类管理.xls", "数据", BaseSampleRespVO.class, + BeanUtils.toBean(list, BaseSampleRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodController.java new file mode 100644 index 0000000..0115c93 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigAssayMethodService; + +@Tag(name = "管理后台 - 检测方法配置") +@RestController +@RequestMapping("/qms/config-assay-method") +@Validated +public class ConfigAssayMethodController implements BusinessControllerMarker { + + + @Resource + private ConfigAssayMethodService configAssayMethodService; + + @PostMapping("/create") + @Operation(summary = "创建检测方法配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method:create')") + public CommonResult createConfigAssayMethod(@Valid @RequestBody ConfigAssayMethodSaveReqVO createReqVO) { + return success(configAssayMethodService.createConfigAssayMethod(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检测方法配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method:update')") + public CommonResult updateConfigAssayMethod(@Valid @RequestBody ConfigAssayMethodSaveReqVO updateReqVO) { + configAssayMethodService.updateConfigAssayMethod(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测方法配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-assay-method:delete')") + public CommonResult deleteConfigAssayMethod(@RequestParam("id") Long id) { + configAssayMethodService.deleteConfigAssayMethod(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测方法配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method:delete')") + public CommonResult deleteConfigAssayMethodList(@RequestBody BatchDeleteReqVO req) { + configAssayMethodService.deleteConfigAssayMethodListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测方法配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method:query')") + public CommonResult getConfigAssayMethod(@RequestParam("id") Long id) { + ConfigAssayMethodDO configAssayMethod = configAssayMethodService.getConfigAssayMethod(id); + return success(BeanUtils.toBean(configAssayMethod, ConfigAssayMethodRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检测方法配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method:query')") + public CommonResult> getConfigAssayMethodPage(@Valid ConfigAssayMethodPageReqVO pageReqVO) { + PageResult pageResult = configAssayMethodService.getConfigAssayMethodPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigAssayMethodRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测方法配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigAssayMethodExcel(@Valid ConfigAssayMethodPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configAssayMethodService.getConfigAssayMethodPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测方法配置.xls", "数据", ConfigAssayMethodRespVO.class, + BeanUtils.toBean(list, ConfigAssayMethodRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodProjectController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodProjectController.java new file mode 100644 index 0000000..b99ad4f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodProjectController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigAssayMethodProjectService; + +@Tag(name = "管理后台 - 检测方法分析项目配置") +@RestController +@RequestMapping("/qms/config-assay-method-project") +@Validated +public class ConfigAssayMethodProjectController implements BusinessControllerMarker { + + + @Resource + private ConfigAssayMethodProjectService configAssayMethodProjectService; + + @PostMapping("/create") + @Operation(summary = "创建检测方法分析项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project:create')") + public CommonResult createConfigAssayMethodProject(@Valid @RequestBody ConfigAssayMethodProjectSaveReqVO createReqVO) { + return success(configAssayMethodProjectService.createConfigAssayMethodProject(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检测方法分析项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project:update')") + public CommonResult updateConfigAssayMethodProject(@Valid @RequestBody ConfigAssayMethodProjectSaveReqVO updateReqVO) { + configAssayMethodProjectService.updateConfigAssayMethodProject(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测方法分析项目配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project:delete')") + public CommonResult deleteConfigAssayMethodProject(@RequestParam("id") Long id) { + configAssayMethodProjectService.deleteConfigAssayMethodProject(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测方法分析项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project:delete')") + public CommonResult deleteConfigAssayMethodProjectList(@RequestBody BatchDeleteReqVO req) { + configAssayMethodProjectService.deleteConfigAssayMethodProjectListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测方法分析项目配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project:query')") + public CommonResult getConfigAssayMethodProject(@RequestParam("id") Long id) { + ConfigAssayMethodProjectDO configAssayMethodProject = configAssayMethodProjectService.getConfigAssayMethodProject(id); + return success(BeanUtils.toBean(configAssayMethodProject, ConfigAssayMethodProjectRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检测方法分析项目配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project:query')") + public CommonResult> getConfigAssayMethodProjectPage(@Valid ConfigAssayMethodProjectPageReqVO pageReqVO) { + PageResult pageResult = configAssayMethodProjectService.getConfigAssayMethodProjectPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigAssayMethodProjectRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测方法分析项目配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigAssayMethodProjectExcel(@Valid ConfigAssayMethodProjectPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configAssayMethodProjectService.getConfigAssayMethodProjectPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测方法分析项目配置.xls", "数据", ConfigAssayMethodProjectRespVO.class, + BeanUtils.toBean(list, ConfigAssayMethodProjectRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodProjectParameterController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodProjectParameterController.java new file mode 100644 index 0000000..e2410d2 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodProjectParameterController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigAssayMethodProjectParameterService; + +@Tag(name = "管理后台 - 检测方法分析项目参数配置") +@RestController +@RequestMapping("/qms/config-assay-method-project-parameter") +@Validated +public class ConfigAssayMethodProjectParameterController implements BusinessControllerMarker { + + + @Resource + private ConfigAssayMethodProjectParameterService configAssayMethodProjectParameterService; + + @PostMapping("/create") + @Operation(summary = "创建检测方法分析项目参数配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project-parameter:create')") + public CommonResult createConfigAssayMethodProjectParameter(@Valid @RequestBody ConfigAssayMethodProjectParameterSaveReqVO createReqVO) { + return success(configAssayMethodProjectParameterService.createConfigAssayMethodProjectParameter(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检测方法分析项目参数配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project-parameter:update')") + public CommonResult updateConfigAssayMethodProjectParameter(@Valid @RequestBody ConfigAssayMethodProjectParameterSaveReqVO updateReqVO) { + configAssayMethodProjectParameterService.updateConfigAssayMethodProjectParameter(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测方法分析项目参数配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project-parameter:delete')") + public CommonResult deleteConfigAssayMethodProjectParameter(@RequestParam("id") Long id) { + configAssayMethodProjectParameterService.deleteConfigAssayMethodProjectParameter(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测方法分析项目参数配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project-parameter:delete')") + public CommonResult deleteConfigAssayMethodProjectParameterList(@RequestBody BatchDeleteReqVO req) { + configAssayMethodProjectParameterService.deleteConfigAssayMethodProjectParameterListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测方法分析项目参数配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project-parameter:query')") + public CommonResult getConfigAssayMethodProjectParameter(@RequestParam("id") Long id) { + ConfigAssayMethodProjectParameterDO configAssayMethodProjectParameter = configAssayMethodProjectParameterService.getConfigAssayMethodProjectParameter(id); + return success(BeanUtils.toBean(configAssayMethodProjectParameter, ConfigAssayMethodProjectParameterRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检测方法分析项目参数配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project-parameter:query')") + public CommonResult> getConfigAssayMethodProjectParameterPage(@Valid ConfigAssayMethodProjectParameterPageReqVO pageReqVO) { + PageResult pageResult = configAssayMethodProjectParameterService.getConfigAssayMethodProjectParameterPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigAssayMethodProjectParameterRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测方法分析项目参数配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project-parameter:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigAssayMethodProjectParameterExcel(@Valid ConfigAssayMethodProjectParameterPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configAssayMethodProjectParameterService.getConfigAssayMethodProjectParameterPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测方法分析项目参数配置.xls", "数据", ConfigAssayMethodProjectParameterRespVO.class, + BeanUtils.toBean(list, ConfigAssayMethodProjectParameterRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigBaseSampleController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigBaseSampleController.java new file mode 100644 index 0000000..2a9d21d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigBaseSampleController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigBaseSampleDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigBaseSampleService; + +@Tag(name = "管理后台 - 主样配置") +@RestController +@RequestMapping("/qms/config-base-sample") +@Validated +public class ConfigBaseSampleController implements BusinessControllerMarker { + + + @Resource + private ConfigBaseSampleService configBaseSampleService; + + @PostMapping("/create") + @Operation(summary = "创建主样配置") + @PreAuthorize("@ss.hasPermission('qms:config-base-sample:create')") + public CommonResult createConfigBaseSample(@Valid @RequestBody ConfigBaseSampleSaveReqVO createReqVO) { + return success(configBaseSampleService.createConfigBaseSample(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新主样配置") + @PreAuthorize("@ss.hasPermission('qms:config-base-sample:update')") + public CommonResult updateConfigBaseSample(@Valid @RequestBody ConfigBaseSampleSaveReqVO updateReqVO) { + configBaseSampleService.updateConfigBaseSample(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除主样配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-base-sample:delete')") + public CommonResult deleteConfigBaseSample(@RequestParam("id") Long id) { + configBaseSampleService.deleteConfigBaseSample(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除主样配置") + @PreAuthorize("@ss.hasPermission('qms:config-base-sample:delete')") + public CommonResult deleteConfigBaseSampleList(@RequestBody BatchDeleteReqVO req) { + configBaseSampleService.deleteConfigBaseSampleListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得主样配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-base-sample:query')") + public CommonResult getConfigBaseSample(@RequestParam("id") Long id) { + ConfigBaseSampleDO configBaseSample = configBaseSampleService.getConfigBaseSample(id); + return success(BeanUtils.toBean(configBaseSample, ConfigBaseSampleRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得主样配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-base-sample:query')") + public CommonResult> getConfigBaseSamplePage(@Valid ConfigBaseSamplePageReqVO pageReqVO) { + PageResult pageResult = configBaseSampleService.getConfigBaseSamplePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigBaseSampleRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出主样配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-base-sample:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigBaseSampleExcel(@Valid ConfigBaseSamplePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configBaseSampleService.getConfigBaseSamplePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "主样配置.xls", "数据", ConfigBaseSampleRespVO.class, + BeanUtils.toBean(list, ConfigBaseSampleRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigDocumentTypeController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigDocumentTypeController.java new file mode 100644 index 0000000..dc8eee8 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigDocumentTypeController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigDocumentTypeDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigDocumentTypeService; + +@Tag(name = "管理后台 - 报告类型配置") +@RestController +@RequestMapping("/qms/config-document-type") +@Validated +public class ConfigDocumentTypeController implements BusinessControllerMarker { + + + @Resource + private ConfigDocumentTypeService configDocumentTypeService; + + @PostMapping("/create") + @Operation(summary = "创建报告类型配置") + @PreAuthorize("@ss.hasPermission('qms:config-document-type:create')") + public CommonResult createConfigDocumentType(@Valid @RequestBody ConfigDocumentTypeSaveReqVO createReqVO) { + return success(configDocumentTypeService.createConfigDocumentType(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新报告类型配置") + @PreAuthorize("@ss.hasPermission('qms:config-document-type:update')") + public CommonResult updateConfigDocumentType(@Valid @RequestBody ConfigDocumentTypeSaveReqVO updateReqVO) { + configDocumentTypeService.updateConfigDocumentType(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除报告类型配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-document-type:delete')") + public CommonResult deleteConfigDocumentType(@RequestParam("id") Long id) { + configDocumentTypeService.deleteConfigDocumentType(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除报告类型配置") + @PreAuthorize("@ss.hasPermission('qms:config-document-type:delete')") + public CommonResult deleteConfigDocumentTypeList(@RequestBody BatchDeleteReqVO req) { + configDocumentTypeService.deleteConfigDocumentTypeListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得报告类型配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-document-type:query')") + public CommonResult getConfigDocumentType(@RequestParam("id") Long id) { + ConfigDocumentTypeDO configDocumentType = configDocumentTypeService.getConfigDocumentType(id); + return success(BeanUtils.toBean(configDocumentType, ConfigDocumentTypeRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得报告类型配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-document-type:query')") + public CommonResult> getConfigDocumentTypePage(@Valid ConfigDocumentTypePageReqVO pageReqVO) { + PageResult pageResult = configDocumentTypeService.getConfigDocumentTypePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigDocumentTypeRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出报告类型配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-document-type:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigDocumentTypeExcel(@Valid ConfigDocumentTypePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configDocumentTypeService.getConfigDocumentTypePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "报告类型配置.xls", "数据", ConfigDocumentTypeRespVO.class, + BeanUtils.toBean(list, ConfigDocumentTypeRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigEntrustSourceController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigEntrustSourceController.java new file mode 100644 index 0000000..e79efbc --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigEntrustSourceController.java @@ -0,0 +1,117 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigEntrustSourceDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigEntrustSourceService; + +@Tag(name = "管理后台 - 检验委托来源配置") +@RestController +@RequestMapping("/qms/config-entrust-source") +@Validated +public class ConfigEntrustSourceController implements BusinessControllerMarker { + + + @Resource + private ConfigEntrustSourceService configEntrustSourceService; + + @PostMapping("/create") + @Operation(summary = "创建检验委托来源配置") + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:create')") + public CommonResult createConfigEntrustSource(@Valid @RequestBody ConfigEntrustSourceSaveReqVO createReqVO) { + return success(configEntrustSourceService.createConfigEntrustSource(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检验委托来源配置") + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:update')") + public CommonResult updateConfigEntrustSource(@Valid @RequestBody ConfigEntrustSourceSaveReqVO updateReqVO) { + configEntrustSourceService.updateConfigEntrustSource(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检验委托来源配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:delete')") + public CommonResult deleteConfigEntrustSource(@RequestParam("id") Long id) { + configEntrustSourceService.deleteConfigEntrustSource(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检验委托来源配置") + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:delete')") + public CommonResult deleteConfigEntrustSourceList(@RequestBody BatchDeleteReqVO req) { + configEntrustSourceService.deleteConfigEntrustSourceListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检验委托来源配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:query')") + public CommonResult getConfigEntrustSource(@RequestParam("id") Long id) { + ConfigEntrustSourceDO configEntrustSource = configEntrustSourceService.getConfigEntrustSource(id); + return success(BeanUtils.toBean(configEntrustSource, ConfigEntrustSourceRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检验委托来源配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:query')") + public CommonResult> getConfigEntrustSourcePage(@Valid ConfigEntrustSourcePageReqVO pageReqVO) { + PageResult pageResult = configEntrustSourceService.getConfigEntrustSourcePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigEntrustSourceRespVO.class)); + } + + @GetMapping("/list") + @Operation(summary = "获得检验委托来源配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:query')") + public CommonResult> getConfigEntrustSourceList(@Valid ConfigEntrustSourceReqVO reqVO) { + List listResult = configEntrustSourceService.getConfigEntrustSourceList(reqVO); + return success(BeanUtils.toBean(listResult, ConfigEntrustSourceRespVO.class)); + } + + + @GetMapping("/export-excel") + @Operation(summary = "导出检验委托来源配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigEntrustSourceExcel(@Valid ConfigEntrustSourcePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configEntrustSourceService.getConfigEntrustSourcePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检验委托来源配置.xls", "数据", ConfigEntrustSourceRespVO.class, + BeanUtils.toBean(list, ConfigEntrustSourceRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigProjectController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigProjectController.java new file mode 100644 index 0000000..c6bfc40 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigProjectController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigProjectDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigProjectService; + +@Tag(name = "管理后台 - 检测项目配置") +@RestController +@RequestMapping("/qms/config-project") +@Validated +public class ConfigProjectController implements BusinessControllerMarker { + + + @Resource + private ConfigProjectService configProjectService; + + @PostMapping("/create") + @Operation(summary = "创建检测项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-project:create')") + public CommonResult createConfigProject(@Valid @RequestBody ConfigProjectSaveReqVO createReqVO) { + return success(configProjectService.createConfigProject(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检测项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-project:update')") + public CommonResult updateConfigProject(@Valid @RequestBody ConfigProjectSaveReqVO updateReqVO) { + configProjectService.updateConfigProject(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测项目配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-project:delete')") + public CommonResult deleteConfigProject(@RequestParam("id") Long id) { + configProjectService.deleteConfigProject(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-project:delete')") + public CommonResult deleteConfigProjectList(@RequestBody BatchDeleteReqVO req) { + configProjectService.deleteConfigProjectListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测项目配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-project:query')") + public CommonResult getConfigProject(@RequestParam("id") Long id) { + ConfigProjectDO configProject = configProjectService.getConfigProject(id); + return success(BeanUtils.toBean(configProject, ConfigProjectRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检测项目配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-project:query')") + public CommonResult> getConfigProjectPage(@Valid ConfigProjectPageReqVO pageReqVO) { + PageResult pageResult = configProjectService.getConfigProjectPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigProjectRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测项目配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-project:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigProjectExcel(@Valid ConfigProjectPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configProjectService.getConfigProjectPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测项目配置.xls", "数据", ConfigProjectRespVO.class, + BeanUtils.toBean(list, ConfigProjectRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportFieldController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportFieldController.java new file mode 100644 index 0000000..04cdc47 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportFieldController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportFieldDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigReportFieldService; + +@Tag(name = "管理后台 - 报表字段配置") +@RestController +@RequestMapping("/qms/config-report-field") +@Validated +public class ConfigReportFieldController implements BusinessControllerMarker { + + + @Resource + private ConfigReportFieldService configReportFieldService; + + @PostMapping("/create") + @Operation(summary = "创建报表字段配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-field:create')") + public CommonResult createConfigReportField(@Valid @RequestBody ConfigReportFieldSaveReqVO createReqVO) { + return success(configReportFieldService.createConfigReportField(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新报表字段配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-field:update')") + public CommonResult updateConfigReportField(@Valid @RequestBody ConfigReportFieldSaveReqVO updateReqVO) { + configReportFieldService.updateConfigReportField(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除报表字段配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-report-field:delete')") + public CommonResult deleteConfigReportField(@RequestParam("id") Long id) { + configReportFieldService.deleteConfigReportField(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除报表字段配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-field:delete')") + public CommonResult deleteConfigReportFieldList(@RequestBody BatchDeleteReqVO req) { + configReportFieldService.deleteConfigReportFieldListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得报表字段配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-report-field:query')") + public CommonResult getConfigReportField(@RequestParam("id") Long id) { + ConfigReportFieldDO configReportField = configReportFieldService.getConfigReportField(id); + return success(BeanUtils.toBean(configReportField, ConfigReportFieldRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得报表字段配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-report-field:query')") + public CommonResult> getConfigReportFieldPage(@Valid ConfigReportFieldPageReqVO pageReqVO) { + PageResult pageResult = configReportFieldService.getConfigReportFieldPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigReportFieldRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出报表字段配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-report-field:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigReportFieldExcel(@Valid ConfigReportFieldPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configReportFieldService.getConfigReportFieldPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "报表字段配置.xls", "数据", ConfigReportFieldRespVO.class, + BeanUtils.toBean(list, ConfigReportFieldRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportTemplateController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportTemplateController.java new file mode 100644 index 0000000..25ce24c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportTemplateController.java @@ -0,0 +1,629 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigReportTemplatePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigReportTemplateRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigReportTemplateSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.GenReportBody; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.util.UriUtils; + +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.toolkit.StringPool; + +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.text.StringEscapeUtils; +import org.springframework.core.io.ByteArrayResource; +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.io.support.ResourceRegion; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import lombok.extern.slf4j.Slf4j; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.security.config.SecurityProperties; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.codec.Base64; +import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpRequest; +import cn.hutool.http.HttpResponse; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportTemplateDO; +import cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants; +import cn.iocoder.yudao.module.qms.framework.gridreport.GridReport; +import cn.iocoder.yudao.module.qms.framework.gridreport.PdfHelper; +import cn.iocoder.yudao.module.qms.framework.gridreport.exception.GridReportException; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigReportTemplateService; +import gridreport.jni.BinaryObject; +import gridreport.jni.ExportImageType; +import gridreport.jni.ExportType; +import gridreport.jni.Report; + +@Tag(name = "管理后台 - 报表模版配置") +@RestController +@RequestMapping("/qms/config-report-template") +@Validated +@Slf4j +public class ConfigReportTemplateController implements BusinessControllerMarker { + + public static final String WR_PREFIX = "_WR_"; + + @Resource + private GridReport gridReport; + + @Resource + private SecurityProperties securityProperties; + + @Resource + private ConfigReportTemplateService configReportTemplateService; + + @GetMapping("/info") + @Operation(summary = "获取报表信息") + public CommonResult info() { + Map data = new HashMap<>(); + try { + String moduleInfo = Report.getModuleInfo(); + String moduleVersion = Report.getModuleVersion(); + String modulePath = Report.getModulePath(); + data.put("moduleInfo", moduleInfo); + data.put("moduleVersion", moduleVersion); + data.put("modulePath", modulePath); + } catch (Exception e) { + } + return success(data); + } + + @PostMapping("/create") + @Operation(summary = "创建报表模版配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-template:create')") + public CommonResult createConfigReportTemplate(@Valid @RequestBody ConfigReportTemplateSaveReqVO createReqVO) { + return success(configReportTemplateService.createConfigReportTemplate(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新报表模版配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-template:update')") + public CommonResult updateConfigReportTemplate(@Valid @RequestBody ConfigReportTemplateSaveReqVO updateReqVO) { + configReportTemplateService.updateConfigReportTemplate(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除报表模版配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-report-template:delete')") + public CommonResult deleteConfigReportTemplate(@RequestParam("id") Long id) { + configReportTemplateService.deleteConfigReportTemplate(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除报表模版配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-template:delete')") + public CommonResult deleteConfigReportTemplateList(@RequestParam("ids") List ids) { + configReportTemplateService.deleteConfigReportTemplateListByIds(ids); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得报表模版配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-report-template:query')") + public CommonResult getConfigReportTemplate(@RequestParam("id") Long id) { + ConfigReportTemplateDO configReportTemplate = configReportTemplateService.getConfigReportTemplate(id); + return success(BeanUtils.toBean(configReportTemplate, ConfigReportTemplateRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得报表模版配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-report-template:query')") + public CommonResult> getConfigReportTemplatePage(@Valid ConfigReportTemplatePageReqVO pageReqVO) { + PageResult pageResult = configReportTemplateService.getConfigReportTemplatePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigReportTemplateRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出报表模版配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-report-template:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigReportTemplateExcel(@Valid ConfigReportTemplatePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configReportTemplateService.getConfigReportTemplatePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "报表模版配置.xls", "数据", ConfigReportTemplateRespVO.class, + BeanUtils.toBean(list, ConfigReportTemplateRespVO.class)); + } + + /*** + * 预览报表 + * @param reportId + * @param reportKey + * @param dataUrl + * @param isCrypto + * @param type + * @return + * @throws Exception + */ + @GetMapping("/preview") + @Operation(summary = "预览报表") + public ResponseEntity preview(Long reportId, String reportKey, String dataUrl, Boolean isCrypto, String type) throws Exception { + HttpServletRequest request = ServletUtils.getRequest(); + ConfigReportTemplateDO gridppReportFile = null; + if (reportId != null) { + gridppReportFile = configReportTemplateService.getConfigReportTemplate(reportId); + } else if (StrUtil.isNotBlank(reportKey)) { + gridppReportFile = configReportTemplateService.getConfigReportTemplateByKey(reportKey); + } + if (ObjectUtil.isEmpty(gridppReportFile)) { + throw new ServiceException(ErrorCodeConstants.CONFIG_REPORT_TEMPLATE_NOT_EXISTS); + } + String reportData = StringEscapeUtils.unescapeHtml4(gridppReportFile.getContent()); + + //报表参数 + Map reportParams = new HashMap<>(); + //获取当前用户姓名 + LoginUser user = SecurityFrameworkUtils.getLoginUser(); + String realName = ""; + if (user != null) { + realName = SecurityFrameworkUtils.getLoginUserNickname(); + } + reportParams.put("operName", realName); + + if (StrUtil.isNotBlank(dataUrl)) { + log.info("url:" + dataUrl); + dataUrl = StringEscapeUtils.unescapeHtml4(dataUrl); + log.info("url:" + dataUrl); + //处理url参数 + if(dataUrl.contains("?")) { + String urlParam = dataUrl.split("\\?")[1]; + String[] urlVks = urlParam.split("&"); + for (int i = 0; i < urlVks.length; i++) { + String vk = urlVks[i]; + if (StrUtil.isNotBlank(vk)) { + String[] vkSplit = vk.split("="); + if(vkSplit.length == 2){ + reportParams.put(vkSplit[0], vkSplit[1]); + } + } + } + } + + Map headers = new HashMap<>(); + String token = SecurityFrameworkUtils.obtainAuthorization(request, + securityProperties.getTokenHeader(), securityProperties.getTokenParameter()); + headers.put(securityProperties.getTokenHeader(), token); + HttpResponse res = HttpRequest.get(dataUrl) + .addHeaders(headers) + .setConnectionTimeout(60 * 1000) + .setReadTimeout(120 * 1000) + .execute(); + if (res.getStatus() != 200) { + log.error("报表数据,网络请求错误!", res.body()); + throw new GridReportException("报表数据,网络请求错误!"); + } + String body = res.body(); + CommonResult dataR = JSON.parseObject(body, CommonResult.class); + if (dataR != null && dataR.getCode() == 200) { + if (ArrayUtil.isArray(dataR.getData()) || dataR.getData() instanceof Collection) { + reportData = JSON.toJSONString(dataR); + } else { + reportData = JSON.toJSONString(dataR.getData()); + } + } else { + log.error("获取报表数据错误!", dataR.getMsg()); + log.error("报表数据:" + reportData); + throw new GridReportException("获取报表数据错误!"); + } + } + + + BinaryObject binaryObject = gridReport.genReport(gridppReportFile.getContent(), reportData, reportParams, ExportType.valueOf("OFD".equals(type.toUpperCase()) ? "PDF" : type.toUpperCase())); + MediaType mediaType = null; + byte[] docBytes = null; + //文件扩展名 + String fileExtName = type.toLowerCase(); + switch (type.toUpperCase()) { + case "PDF": + mediaType = MediaType.APPLICATION_PDF; + docBytes = PdfHelper.modifyDocInfo(binaryObject.getDataBuf()); + break; + case "OFD": + mediaType = MediaType.APPLICATION_OCTET_STREAM; + docBytes = PdfHelper.modifyDocInfo(binaryObject.getDataBuf()); + break; + case "RTF": + fileExtName = "doc"; + mediaType = MediaType.APPLICATION_OCTET_STREAM; + docBytes = binaryObject.getDataBuf(); + break; + default: + mediaType = MediaType.APPLICATION_OCTET_STREAM; + docBytes = binaryObject.getDataBuf(); + break; + } + + return browser(new ByteArrayResource(docBytes), gridppReportFile.getName() + "." + fileExtName, mediaType); + } + + @GetMapping("/previewDocs") + @Operation(summary = "报告预览报表") + public ResponseEntity previewDocs(Long reportId, String reportKey, String dataUrl, Boolean isCrypto, String type) throws Exception { + HttpServletRequest request = ServletUtils.getRequest(); + ConfigReportTemplateDO gridppReportFile = null; + if (reportId != null) { + gridppReportFile = configReportTemplateService.getConfigReportTemplate(reportId); + } else if (StrUtil.isNotBlank(reportKey)) { + gridppReportFile = configReportTemplateService.getConfigReportTemplateByKey(reportKey); + } + if (ObjectUtil.isEmpty(gridppReportFile)) { + throw new GridReportException("未找到报表模板!"); + } + String reportData = StringEscapeUtils.unescapeHtml4(gridppReportFile.getContent()); + + //报表参数 + Map reportParams = new HashMap<>(); + //获取当前用户姓名 + LoginUser user = SecurityFrameworkUtils.getLoginUser(); + String realName = ""; + if (user != null) { + realName = SecurityFrameworkUtils.getLoginUserNickname(); + } + reportParams.put("operName", realName); + + if (StrUtil.isNotBlank(dataUrl)) { + log.info("url:" + dataUrl); + dataUrl = StringEscapeUtils.unescapeHtml4(dataUrl); + log.info("url:" + dataUrl); + + + Map headers = new HashMap<>(); + String token = SecurityFrameworkUtils.obtainAuthorization(request, + securityProperties.getTokenHeader(), securityProperties.getTokenParameter()); + headers.put(securityProperties.getTokenHeader(), token); + HttpResponse res = HttpRequest.get(dataUrl) + .addHeaders(headers) + .setConnectionTimeout(60 * 1000) + .setReadTimeout(120 * 1000) + .execute(); + if (res.getStatus() != 200) { + log.error("报表数据,网络请求错误!", res.body()); + throw new GridReportException("报表数据,网络请求错误!"); + } + String body = res.body(); + CommonResult dataR = JSON.parseObject(body, CommonResult.class); + if (dataR != null && dataR.getCode() == 200) { + if (ArrayUtil.isArray(dataR.getData()) || dataR.getData() instanceof Collection) { + reportData = JSON.toJSONString(dataR); + } else { + + Map map = BeanUtil.beanToMap(dataR.getData()); + for (Map.Entry obj : BeanUtil.beanToMap(map.get("reportParams")).entrySet()) { + reportParams.put(obj.getKey(), obj.getValue() == null ? "": obj.getValue().toString()); + } + reportData = JSON.toJSONString(dataR.getData()); + } + } else { + log.error("获取报表数据错误!", dataR.getMsg()); + log.error("报表数据:" + reportData); + throw new GridReportException("获取报表数据错误!"); + } + + } + + BinaryObject binaryObject = gridReport.genReport(gridppReportFile.getContent(), reportData, reportParams, ExportType.valueOf("OFD".equals(type.toUpperCase()) ? "PDF" : type.toUpperCase())); + MediaType mediaType = null; + byte[] docBytes = null; + //文件扩展名 + String fileExtName = type.toLowerCase(); + switch (type.toUpperCase()) { + case "PDF": + mediaType = MediaType.APPLICATION_PDF; + docBytes = PdfHelper.modifyDocInfo(binaryObject.getDataBuf()); + break; + case "OFD": + mediaType = MediaType.APPLICATION_OCTET_STREAM; + docBytes = PdfHelper.modifyDocInfo(binaryObject.getDataBuf()); + break; + case "RTF": + fileExtName = "doc"; + mediaType = MediaType.APPLICATION_OCTET_STREAM; + docBytes = binaryObject.getDataBuf(); + break; + case "IMG": + fileExtName = "png"; + mediaType = MediaType.IMAGE_PNG; + docBytes = binaryObject.getDataBuf(); + break; + default: + mediaType = MediaType.APPLICATION_OCTET_STREAM; + docBytes = binaryObject.getDataBuf(); + break; + } + + return browser(new ByteArrayResource(docBytes), gridppReportFile.getName() + "." + fileExtName, mediaType); + } + + @GetMapping("/export") + @Operation(summary = "导出报表") + public ResponseEntity export(Long reportId, String reportKey, String exportName, String dataUrl, Boolean isCrypto, String type) throws Exception { + HttpServletRequest request = ServletUtils.getRequest(); + ConfigReportTemplateDO gridppReportFile = null; + if (reportId != null) { + gridppReportFile = configReportTemplateService.getConfigReportTemplate(reportId); + } else if (StrUtil.isNotBlank(reportKey)) { + gridppReportFile = configReportTemplateService.getConfigReportTemplateByKey(reportKey); + } + if (ObjectUtil.isEmpty(gridppReportFile)) { + throw new GridReportException("未找到报表模板!"); + } + String reportData = StringEscapeUtils.unescapeHtml4(gridppReportFile.getContent()); + + //报表参数 + Map reportParams = new HashMap<>(); + //获取当前用户姓名 + LoginUser user = SecurityFrameworkUtils.getLoginUser(); + String realName = ""; + if (user != null) { + realName = SecurityFrameworkUtils.getLoginUserNickname(); + } + reportParams.put("operName", realName); + + if (StrUtil.isNotBlank(dataUrl)) { + dataUrl = StringEscapeUtils.unescapeHtml4(dataUrl); + //处理url参数 + if (dataUrl.contains("?")) { + String urlParam = dataUrl.split("\\?")[1]; + String[] urlVks = urlParam.split("&"); + for (int i = 0; i < urlVks.length; i++) { + String vk = urlVks[i]; + if (StrUtil.isNotBlank(vk)) { + String[] vkSplit = vk.split("="); + if(vkSplit.length == 2){ + reportParams.put(vkSplit[0], vkSplit[1]); + } + } + } + } + Map headers = new HashMap<>(); + String token = SecurityFrameworkUtils.obtainAuthorization(request, + securityProperties.getTokenHeader(), securityProperties.getTokenParameter()); + headers.put(securityProperties.getTokenHeader(), token); + HttpResponse res = HttpRequest.get(dataUrl) + .addHeaders(headers) + .setConnectionTimeout(60 * 1000) + .setReadTimeout(120 * 1000) + .execute(); + if (res.getStatus() != 200) { + log.error("报表数据,网络请求错误!", res.body()); + throw new GridReportException("报表数据,网络请求错误!"); + } + String body = res.body(); + CommonResult dataR = JSON.parseObject(body, CommonResult.class); + if (dataR != null && dataR.getCode() == 200) { + if (ArrayUtil.isArray(dataR.getData()) || dataR.getData() instanceof Collection) { + reportData = JSON.toJSONString(dataR); + } else { + reportData = JSON.toJSONString(dataR.getData()); + } + } else { + log.error("获取报表数据错误!", dataR.getMsg()); + throw new GridReportException("获取报表数据错误!"); + } + } + + BinaryObject binaryObject = gridReport.genReport(gridppReportFile.getContent(), reportData, reportParams, ExportType.valueOf("OFD".equals(type.toUpperCase()) ? "PDF" : type.toUpperCase())); + byte[] docBytes = null; + //文件扩展名 + String fileExtName = type.toLowerCase(); + switch (type.toUpperCase()) { + case "PDF": + docBytes = PdfHelper.modifyDocInfo(binaryObject.getDataBuf()); + break; + case "OFD": + docBytes = PdfHelper.modifyDocInfo(binaryObject.getDataBuf()); + break; + case "RTF": + fileExtName = "doc"; + docBytes = binaryObject.getDataBuf(); + break; + case "IMG": + fileExtName = "png"; + docBytes = binaryObject.getDataBuf(); + break; + default: + docBytes = binaryObject.getDataBuf(); + break; + } + String fileName = gridppReportFile.getName(); + if (StrUtil.isNotBlank(exportName)) { + fileName = exportName; + } + return download(new ByteArrayResource(docBytes), fileName + "." + fileExtName); + } + + /** + * 生成Base64图片 + * @return + */ + @PostMapping("/gen-report-png-image-base64") + @Operation(summary = "生成Base64图片") + public CommonResult genReportPngImageBase64(@RequestBody GenReportBody body) { + ConfigReportTemplateDO gridppReportFile = null; + if (body.getReportId() != null) { + gridppReportFile = configReportTemplateService.getConfigReportTemplate(body.getReportId()); + } else if (StrUtil.isNotBlank(body.getReportKey())) { + gridppReportFile = configReportTemplateService.getConfigReportTemplateByKey(body.getReportKey()); + } + if (ObjectUtil.isEmpty(gridppReportFile)) { + throw new ServiceException(ErrorCodeConstants.CONFIG_REPORT_TEMPLATE_NOT_EXISTS); + } + + String imgBase64 = null; + try { + BinaryObject binaryObject = gridReport.genReport(gridppReportFile.getContent(), body.getReportDataJson(), body.getReportParams(), ExportType.IMG, ExportImageType.PNG, body.getImgDpi()); + imgBase64 = binaryObject.getAsBase64Text(); + } catch (Exception e) { + log.error("生成base64图片失败", e); + } + if (StringUtils.isBlank(imgBase64)) { + return CommonResult.error(500, "生成Base64图片失败"); + } + return success(imgBase64); + } + + /** + * 生成Base64图片 + * @return + */ + @PostMapping("/gen-report-png-image-base64-by-pdf") + @Operation(summary = "生成Base64图片") + public CommonResult genReportPngImageBase64ByPdf(@RequestBody GenReportBody body) { + ConfigReportTemplateDO gridppReportFile = null; + if (body.getReportId() != null) { + gridppReportFile = configReportTemplateService.getConfigReportTemplate(body.getReportId()); + } else if (StrUtil.isNotBlank(body.getReportKey())) { + gridppReportFile = configReportTemplateService.getConfigReportTemplateByKey(body.getReportKey()); + } + if (ObjectUtil.isEmpty(gridppReportFile)) { + throw new ServiceException(ErrorCodeConstants.CONFIG_REPORT_TEMPLATE_NOT_EXISTS); + } + + String imgBase64 = null; + try { + BinaryObject binaryObject = gridReport.genReport(gridppReportFile.getContent(), body.getReportDataJson(), body.getReportParams(), ExportType.PDF); + byte[] pngBytes = PdfHelper.pdfToPng(binaryObject.getDataBuf(), body.getImgDpi()); + //String encodeHexStr = HexUtil.encodeHexStr(pngBytes); + //System.out.println(encodeHexStr); + imgBase64 = Base64.encode(pngBytes); + } catch (Exception e) { + log.error("生成base64图片失败", e); + } + if (StringUtils.isBlank(imgBase64)) { + return CommonResult.error(500, "生成Base64图片失败"); + } + return success(imgBase64); + } + + /** + * 下载文件 + * + * @param file 文件 + * @return {ResponseEntity} + * @throws IOException io异常 + */ + protected ResponseEntity download(File file) throws IOException { + String fileName = file.getName(); + return download(file, fileName); + } + + /** + * 下载 + * + * @param file 文件 + * @param fileName 生成的文件名 + * @return {ResponseEntity} + * @throws IOException io异常 + */ + protected ResponseEntity download(File file, String fileName) throws IOException { + org.springframework.core.io.Resource resource = new FileSystemResource(file); + return download(resource, fileName); + } + + /** + * 下载 + * + * @param resource 资源 + * @param fileName 生成的文件名 + * @return {ResponseEntity} + * @throws IOException io异常 + */ + protected ResponseEntity download(org.springframework.core.io.Resource resource, String fileName) throws IOException { + HttpServletRequest request = ServletUtils.getRequest(); + String header = request.getHeader(HttpHeaders.USER_AGENT); + // 避免空指针 + header = header == null ? StringPool.EMPTY : header.toUpperCase(); + HttpStatus status= HttpStatus.OK; + // 断点续传 + long position = 0; + long count = resource.contentLength(); + String range = request.getHeader(HttpHeaders.RANGE); + if (null != range) { + status = HttpStatus.PARTIAL_CONTENT; + String[] rangeRange = range.replace("bytes=", StringPool.EMPTY).split(StringPool.DASH); + position = Long.parseLong(rangeRange[0]); + if (rangeRange.length > 1) { + long end = Long.parseLong(rangeRange[1]); + count = end - position + 1; + } + } + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_OCTET_STREAM); + String encodeFileName = UriUtils.encode(fileName, StandardCharsets.UTF_8); + // 兼容各种浏览器下载: + // https://blog.robotshell.org/2012/deal-with-http-header-encoding-for-file-download/ + String disposition = "attachment;" + + "filename=\"" + encodeFileName + "\";" + + "filename*=utf-8''" + encodeFileName; + headers.set(HttpHeaders.CONTENT_DISPOSITION, disposition); + return new ResponseEntity<>(new ResourceRegion(resource, position, count), headers, status); + } + + /** + * 浏览器打开 + * + * @param resource 资源 + * @param fileName 生成的文件名 + * @return {ResponseEntity} + * @throws IOException io异常 + */ + protected ResponseEntity browser(org.springframework.core.io.Resource resource, String fileName, MediaType mediaType) throws IOException { + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(mediaType); + headers.setContentLength(resource.contentLength()); + String encodeFileName = UriUtils.encode(fileName, StandardCharsets.UTF_8); + // 兼容各种浏览器下载: + // https://blog.robotshell.org/2012/deal-with-http-header-encoding-for-file-download/ + String disposition = "inline;" + + "filename=\"" + encodeFileName + "\";" + + "filename*=utf-8''" + encodeFileName; + headers.set(HttpHeaders.CONTENT_DISPOSITION, disposition); + return new ResponseEntity<>(resource, headers, HttpStatus.OK); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportTypeController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportTypeController.java new file mode 100644 index 0000000..7831ac3 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportTypeController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportTypeDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigReportTypeService; + +@Tag(name = "管理后台 - 报表类型配置") +@RestController +@RequestMapping("/qms/config-report-type") +@Validated +public class ConfigReportTypeController implements BusinessControllerMarker { + + + @Resource + private ConfigReportTypeService configReportTypeService; + + @PostMapping("/create") + @Operation(summary = "创建报表类型配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-type:create')") + public CommonResult createConfigReportType(@Valid @RequestBody ConfigReportTypeSaveReqVO createReqVO) { + return success(configReportTypeService.createConfigReportType(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新报表类型配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-type:update')") + public CommonResult updateConfigReportType(@Valid @RequestBody ConfigReportTypeSaveReqVO updateReqVO) { + configReportTypeService.updateConfigReportType(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除报表类型配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-report-type:delete')") + public CommonResult deleteConfigReportType(@RequestParam("id") Long id) { + configReportTypeService.deleteConfigReportType(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除报表类型配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-type:delete')") + public CommonResult deleteConfigReportTypeList(@RequestBody BatchDeleteReqVO req) { + configReportTypeService.deleteConfigReportTypeListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得报表类型配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-report-type:query')") + public CommonResult getConfigReportType(@RequestParam("id") Long id) { + ConfigReportTypeDO configReportType = configReportTypeService.getConfigReportType(id); + return success(BeanUtils.toBean(configReportType, ConfigReportTypeRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得报表类型配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-report-type:query')") + public CommonResult> getConfigReportTypePage(@Valid ConfigReportTypePageReqVO pageReqVO) { + PageResult pageResult = configReportTypeService.getConfigReportTypePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigReportTypeRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出报表类型配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-report-type:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigReportTypeExcel(@Valid ConfigReportTypePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configReportTypeService.getConfigReportTypePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "报表类型配置.xls", "数据", ConfigReportTypeRespVO.class, + BeanUtils.toBean(list, ConfigReportTypeRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleFlowController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleFlowController.java new file mode 100644 index 0000000..9d9dd3e --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleFlowController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleFlowDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSampleFlowService; + +@Tag(name = "管理后台 - 样品流程配置") +@RestController +@RequestMapping("/qms/config-sample-flow") +@Validated +public class ConfigSampleFlowController implements BusinessControllerMarker { + + + @Resource + private ConfigSampleFlowService configSampleFlowService; + + @PostMapping("/create") + @Operation(summary = "创建样品流程配置") + @PreAuthorize("@ss.hasPermission('qms:config-sample-flow:create')") + public CommonResult createConfigSampleFlow(@Valid @RequestBody ConfigSampleFlowSaveReqVO createReqVO) { + return success(configSampleFlowService.createConfigSampleFlow(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新样品流程配置") + @PreAuthorize("@ss.hasPermission('qms:config-sample-flow:update')") + public CommonResult updateConfigSampleFlow(@Valid @RequestBody ConfigSampleFlowSaveReqVO updateReqVO) { + configSampleFlowService.updateConfigSampleFlow(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除样品流程配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-sample-flow:delete')") + public CommonResult deleteConfigSampleFlow(@RequestParam("id") Long id) { + configSampleFlowService.deleteConfigSampleFlow(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除样品流程配置") + @PreAuthorize("@ss.hasPermission('qms:config-sample-flow:delete')") + public CommonResult deleteConfigSampleFlowList(@RequestBody BatchDeleteReqVO req) { + configSampleFlowService.deleteConfigSampleFlowListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得样品流程配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-sample-flow:query')") + public CommonResult getConfigSampleFlow(@RequestParam("id") Long id) { + ConfigSampleFlowDO configSampleFlow = configSampleFlowService.getConfigSampleFlow(id); + return success(BeanUtils.toBean(configSampleFlow, ConfigSampleFlowRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得样品流程配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-sample-flow:query')") + public CommonResult> getConfigSampleFlowPage(@Valid ConfigSampleFlowPageReqVO pageReqVO) { + PageResult pageResult = configSampleFlowService.getConfigSampleFlowPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigSampleFlowRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出样品流程配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-sample-flow:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigSampleFlowExcel(@Valid ConfigSampleFlowPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configSampleFlowService.getConfigSampleFlowPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "样品流程配置.xls", "数据", ConfigSampleFlowRespVO.class, + BeanUtils.toBean(list, ConfigSampleFlowRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleReportController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleReportController.java new file mode 100644 index 0000000..0bc5b14 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleReportController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleReportDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSampleReportService; + +@Tag(name = "管理后台 - 样品报表关系") +@RestController +@RequestMapping("/qms/config-sample-report") +@Validated +public class ConfigSampleReportController implements BusinessControllerMarker { + + + @Resource + private ConfigSampleReportService configSampleReportService; + + @PostMapping("/create") + @Operation(summary = "创建样品报表关系") + @PreAuthorize("@ss.hasPermission('qms:config-sample-report:create')") + public CommonResult createConfigSampleReport(@Valid @RequestBody ConfigSampleReportSaveReqVO createReqVO) { + return success(configSampleReportService.createConfigSampleReport(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新样品报表关系") + @PreAuthorize("@ss.hasPermission('qms:config-sample-report:update')") + public CommonResult updateConfigSampleReport(@Valid @RequestBody ConfigSampleReportSaveReqVO updateReqVO) { + configSampleReportService.updateConfigSampleReport(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除样品报表关系") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-sample-report:delete')") + public CommonResult deleteConfigSampleReport(@RequestParam("id") Long id) { + configSampleReportService.deleteConfigSampleReport(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除样品报表关系") + @PreAuthorize("@ss.hasPermission('qms:config-sample-report:delete')") + public CommonResult deleteConfigSampleReportList(@RequestBody BatchDeleteReqVO req) { + configSampleReportService.deleteConfigSampleReportListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得样品报表关系") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-sample-report:query')") + public CommonResult getConfigSampleReport(@RequestParam("id") Long id) { + ConfigSampleReportDO configSampleReport = configSampleReportService.getConfigSampleReport(id); + return success(BeanUtils.toBean(configSampleReport, ConfigSampleReportRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得样品报表关系分页") + @PreAuthorize("@ss.hasPermission('qms:config-sample-report:query')") + public CommonResult> getConfigSampleReportPage(@Valid ConfigSampleReportPageReqVO pageReqVO) { + PageResult pageResult = configSampleReportService.getConfigSampleReportPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigSampleReportRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出样品报表关系 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-sample-report:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigSampleReportExcel(@Valid ConfigSampleReportPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configSampleReportService.getConfigSampleReportPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "样品报表关系.xls", "数据", ConfigSampleReportRespVO.class, + BeanUtils.toBean(list, ConfigSampleReportRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSimpleFlowCodeController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSimpleFlowCodeController.java new file mode 100644 index 0000000..5258f02 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSimpleFlowCodeController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowCodeDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSimpleFlowCodeService; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "管理后台 - LiteFlow脚本配置") +@RestController +@RequestMapping("/qms/config-simple-flow-code") +@Validated +public class ConfigSimpleFlowCodeController implements BusinessControllerMarker { + + + @Resource + private ConfigSimpleFlowCodeService configSimpleFlowCodeService; + + @PostMapping("/create") + @Operation(summary = "创建LiteFlow脚本配置") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-code:create')") + public CommonResult createConfigSimpleFlowCode(@Valid @RequestBody ConfigSimpleFlowCodeSaveReqVO createReqVO) { + return success(configSimpleFlowCodeService.createConfigSimpleFlowCode(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新LiteFlow脚本配置") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-code:update')") + public CommonResult updateConfigSimpleFlowCode(@Valid @RequestBody ConfigSimpleFlowCodeSaveReqVO updateReqVO) { + configSimpleFlowCodeService.updateConfigSimpleFlowCode(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除LiteFlow脚本配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-code:delete')") + public CommonResult deleteConfigSimpleFlowCode(@RequestParam("id") Long id) { + configSimpleFlowCodeService.deleteConfigSimpleFlowCode(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除LiteFlow脚本配置") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-code:delete')") + public CommonResult deleteConfigSimpleFlowCodeList(@RequestBody BatchDeleteReqVO req) { + configSimpleFlowCodeService.deleteConfigSimpleFlowCodeListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得LiteFlow脚本配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-code:query')") + public CommonResult getConfigSimpleFlowCode(@RequestParam("id") Long id) { + ConfigSimpleFlowCodeDO configSimpleFlowCode = configSimpleFlowCodeService.getConfigSimpleFlowCode(id); + return success(BeanUtils.toBean(configSimpleFlowCode, ConfigSimpleFlowCodeRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得LiteFlow脚本配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-code:query')") + public CommonResult> getConfigSimpleFlowCodePage(@Valid ConfigSimpleFlowCodePageReqVO pageReqVO) { + PageResult pageResult = configSimpleFlowCodeService.getConfigSimpleFlowCodePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigSimpleFlowCodeRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出LiteFlow脚本配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-code:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigSimpleFlowCodeExcel(@Valid ConfigSimpleFlowCodePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configSimpleFlowCodeService.getConfigSimpleFlowCodePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "LiteFlow脚本配置.xls", "数据", ConfigSimpleFlowCodeRespVO.class, + BeanUtils.toBean(list, ConfigSimpleFlowCodeRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSimpleFlowRuleController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSimpleFlowRuleController.java new file mode 100644 index 0000000..d23d68e --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSimpleFlowRuleController.java @@ -0,0 +1,122 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; + +import com.yomahub.liteflow.flow.FlowBus; + +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRulePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowRuleDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSimpleFlowRuleService; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + + +@Tag(name = "管理后台 - LiteFlow规则配置") +@RestController +@RequestMapping("/qms/config-simple-flow-rule") +@Validated +public class ConfigSimpleFlowRuleController implements BusinessControllerMarker { + + @Resource + private ConfigSimpleFlowRuleService configSimpleFlowRuleService; + + @PostMapping("/create") + @Operation(summary = "创建LiteFlow规则配置") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-rule:create')") + public CommonResult createConfigSimpleFlowRule(@Valid @RequestBody ConfigSimpleFlowRuleSaveReqVO createReqVO) { + return success(configSimpleFlowRuleService.createConfigSimpleFlowRule(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新LiteFlow规则配置") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-rule:update')") + public CommonResult updateConfigSimpleFlowRule(@Valid @RequestBody ConfigSimpleFlowRuleSaveReqVO updateReqVO) { + configSimpleFlowRuleService.updateConfigSimpleFlowRule(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除LiteFlow规则配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-rule:delete')") + public CommonResult deleteConfigSimpleFlowRule(@RequestParam("id") Long id) { + configSimpleFlowRuleService.deleteConfigSimpleFlowRule(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除LiteFlow规则配置") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-rule:delete')") + public CommonResult deleteConfigSimpleFlowRuleList(@RequestBody BatchDeleteReqVO req) { + configSimpleFlowRuleService.deleteConfigSimpleFlowRuleListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得LiteFlow规则配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-rule:query')") + public CommonResult getConfigSimpleFlowRule(@RequestParam("id") Long id) { + ConfigSimpleFlowRuleDO configSimpleFlowRule = configSimpleFlowRuleService.getConfigSimpleFlowRule(id); + return success(BeanUtils.toBean(configSimpleFlowRule, ConfigSimpleFlowRuleRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得LiteFlow规则配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-rule:query')") + public CommonResult> getConfigSimpleFlowRulePage(@Valid ConfigSimpleFlowRulePageReqVO pageReqVO) { + PageResult pageResult = configSimpleFlowRuleService.getConfigSimpleFlowRulePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigSimpleFlowRuleRespVO.class)); + } + + @GetMapping("/getLiteFlowChainMap") + @Operation(summary = "获得LiteFlow的规则map") + public CommonResult getLiteFlowChainMap() { + return success(FlowBus.getChainMap()); + } + + @GetMapping("/getLiteFlowNodeMap") + @Operation(summary = "获得LiteFlow的节点map") + public CommonResult getLiteFlowNodeMap() { + return success(FlowBus.getNodeMap()); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出LiteFlow规则配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-rule:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigSimpleFlowRuleExcel(@Valid ConfigSimpleFlowRulePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configSimpleFlowRuleService.getConfigSimpleFlowRulePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "LiteFlow规则配置.xls", "数据", ConfigSimpleFlowRuleRespVO.class, + BeanUtils.toBean(list, ConfigSimpleFlowRuleRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigStandardSampleProjectController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigStandardSampleProjectController.java new file mode 100644 index 0000000..c4f03c4 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigStandardSampleProjectController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigStandardSampleProjectDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigStandardSampleProjectService; + +@Tag(name = "管理后台 - 标准样检测项目配置") +@RestController +@RequestMapping("/qms/config-standard-sample-project") +@Validated +public class ConfigStandardSampleProjectController implements BusinessControllerMarker { + + + @Resource + private ConfigStandardSampleProjectService configStandardSampleProjectService; + + @PostMapping("/create") + @Operation(summary = "创建标准样检测项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-project:create')") + public CommonResult createConfigStandardSampleProject(@Valid @RequestBody ConfigStandardSampleProjectSaveReqVO createReqVO) { + return success(configStandardSampleProjectService.createConfigStandardSampleProject(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新标准样检测项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-project:update')") + public CommonResult updateConfigStandardSampleProject(@Valid @RequestBody ConfigStandardSampleProjectSaveReqVO updateReqVO) { + configStandardSampleProjectService.updateConfigStandardSampleProject(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除标准样检测项目配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-project:delete')") + public CommonResult deleteConfigStandardSampleProject(@RequestParam("id") Long id) { + configStandardSampleProjectService.deleteConfigStandardSampleProject(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除标准样检测项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-project:delete')") + public CommonResult deleteConfigStandardSampleProjectList(@RequestBody BatchDeleteReqVO req) { + configStandardSampleProjectService.deleteConfigStandardSampleProjectListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得标准样检测项目配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-project:query')") + public CommonResult getConfigStandardSampleProject(@RequestParam("id") Long id) { + ConfigStandardSampleProjectDO configStandardSampleProject = configStandardSampleProjectService.getConfigStandardSampleProject(id); + return success(BeanUtils.toBean(configStandardSampleProject, ConfigStandardSampleProjectRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得标准样检测项目配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-project:query')") + public CommonResult> getConfigStandardSampleProjectPage(@Valid ConfigStandardSampleProjectPageReqVO pageReqVO) { + PageResult pageResult = configStandardSampleProjectService.getConfigStandardSampleProjectPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigStandardSampleProjectRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出标准样检测项目配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-project:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigStandardSampleProjectExcel(@Valid ConfigStandardSampleProjectPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configStandardSampleProjectService.getConfigStandardSampleProjectPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "标准样检测项目配置.xls", "数据", ConfigStandardSampleProjectRespVO.class, + BeanUtils.toBean(list, ConfigStandardSampleProjectRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigStandardSampleTypeController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigStandardSampleTypeController.java new file mode 100644 index 0000000..564f3e6 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigStandardSampleTypeController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigStandardSampleTypeDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigStandardSampleTypeService; + +@Tag(name = "管理后台 - 标准样类型配置") +@RestController +@RequestMapping("/qms/config-standard-sample-type") +@Validated +public class ConfigStandardSampleTypeController implements BusinessControllerMarker { + + + @Resource + private ConfigStandardSampleTypeService configStandardSampleTypeService; + + @PostMapping("/create") + @Operation(summary = "创建标准样类型配置") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-type:create')") + public CommonResult createConfigStandardSampleType(@Valid @RequestBody ConfigStandardSampleTypeSaveReqVO createReqVO) { + return success(configStandardSampleTypeService.createConfigStandardSampleType(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新标准样类型配置") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-type:update')") + public CommonResult updateConfigStandardSampleType(@Valid @RequestBody ConfigStandardSampleTypeSaveReqVO updateReqVO) { + configStandardSampleTypeService.updateConfigStandardSampleType(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除标准样类型配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-type:delete')") + public CommonResult deleteConfigStandardSampleType(@RequestParam("id") Long id) { + configStandardSampleTypeService.deleteConfigStandardSampleType(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除标准样类型配置") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-type:delete')") + public CommonResult deleteConfigStandardSampleTypeList(@RequestBody BatchDeleteReqVO req) { + configStandardSampleTypeService.deleteConfigStandardSampleTypeListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得标准样类型配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-type:query')") + public CommonResult getConfigStandardSampleType(@RequestParam("id") Long id) { + ConfigStandardSampleTypeDO configStandardSampleType = configStandardSampleTypeService.getConfigStandardSampleType(id); + return success(BeanUtils.toBean(configStandardSampleType, ConfigStandardSampleTypeRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得标准样类型配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-type:query')") + public CommonResult> getConfigStandardSampleTypePage(@Valid ConfigStandardSampleTypePageReqVO pageReqVO) { + PageResult pageResult = configStandardSampleTypeService.getConfigStandardSampleTypePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigStandardSampleTypeRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出标准样类型配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-type:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigStandardSampleTypeExcel(@Valid ConfigStandardSampleTypePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configStandardSampleTypeService.getConfigStandardSampleTypePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "标准样类型配置.xls", "数据", ConfigStandardSampleTypeRespVO.class, + BeanUtils.toBean(list, ConfigStandardSampleTypeRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleController.java new file mode 100644 index 0000000..5d08905 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSubSampleService; + +@Tag(name = "管理后台 - 子样配置") +@RestController +@RequestMapping("/qms/config-sub-sample") +@Validated +public class ConfigSubSampleController implements BusinessControllerMarker { + + + @Resource + private ConfigSubSampleService configSubSampleService; + + @PostMapping("/create") + @Operation(summary = "创建子样配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample:create')") + public CommonResult createConfigSubSample(@Valid @RequestBody ConfigSubSampleSaveReqVO createReqVO) { + return success(configSubSampleService.createConfigSubSample(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新子样配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample:update')") + public CommonResult updateConfigSubSample(@Valid @RequestBody ConfigSubSampleSaveReqVO updateReqVO) { + configSubSampleService.updateConfigSubSample(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除子样配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample:delete')") + public CommonResult deleteConfigSubSample(@RequestParam("id") Long id) { + configSubSampleService.deleteConfigSubSample(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除子样配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample:delete')") + public CommonResult deleteConfigSubSampleList(@RequestBody BatchDeleteReqVO req) { + configSubSampleService.deleteConfigSubSampleListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得子样配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample:query')") + public CommonResult getConfigSubSample(@RequestParam("id") Long id) { + ConfigSubSampleDO configSubSample = configSubSampleService.getConfigSubSample(id); + return success(BeanUtils.toBean(configSubSample, ConfigSubSampleRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得子样配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample:query')") + public CommonResult> getConfigSubSamplePage(@Valid ConfigSubSamplePageReqVO pageReqVO) { + PageResult pageResult = configSubSampleService.getConfigSubSamplePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigSubSampleRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出子样配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigSubSampleExcel(@Valid ConfigSubSamplePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configSubSampleService.getConfigSubSamplePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "子样配置.xls", "数据", ConfigSubSampleRespVO.class, + BeanUtils.toBean(list, ConfigSubSampleRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleMethodController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleMethodController.java new file mode 100644 index 0000000..778f5a4 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleMethodController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSubSampleMethodService; + +@Tag(name = "管理后台 - 子样与检测方法配置") +@RestController +@RequestMapping("/qms/config-sub-sample-method") +@Validated +public class ConfigSubSampleMethodController implements BusinessControllerMarker { + + + @Resource + private ConfigSubSampleMethodService configSubSampleMethodService; + + @PostMapping("/create") + @Operation(summary = "创建子样与检测方法配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:create')") + public CommonResult createConfigSubSampleMethod(@Valid @RequestBody ConfigSubSampleMethodSaveReqVO createReqVO) { + return success(configSubSampleMethodService.createConfigSubSampleMethod(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新子样与检测方法配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:update')") + public CommonResult updateConfigSubSampleMethod(@Valid @RequestBody ConfigSubSampleMethodSaveReqVO updateReqVO) { + configSubSampleMethodService.updateConfigSubSampleMethod(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除子样与检测方法配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:delete')") + public CommonResult deleteConfigSubSampleMethod(@RequestParam("id") Long id) { + configSubSampleMethodService.deleteConfigSubSampleMethod(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除子样与检测方法配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:delete')") + public CommonResult deleteConfigSubSampleMethodList(@RequestBody BatchDeleteReqVO req) { + configSubSampleMethodService.deleteConfigSubSampleMethodListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得子样与检测方法配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:query')") + public CommonResult getConfigSubSampleMethod(@RequestParam("id") Long id) { + ConfigSubSampleMethodDO configSubSampleMethod = configSubSampleMethodService.getConfigSubSampleMethod(id); + return success(BeanUtils.toBean(configSubSampleMethod, ConfigSubSampleMethodRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得子样与检测方法配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:query')") + public CommonResult> getConfigSubSampleMethodPage(@Valid ConfigSubSampleMethodPageReqVO pageReqVO) { + PageResult pageResult = configSubSampleMethodService.getConfigSubSampleMethodPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigSubSampleMethodRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出子样与检测方法配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigSubSampleMethodExcel(@Valid ConfigSubSampleMethodPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configSubSampleMethodService.getConfigSubSampleMethodPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "子样与检测方法配置.xls", "数据", ConfigSubSampleMethodRespVO.class, + BeanUtils.toBean(list, ConfigSubSampleMethodRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleParentController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleParentController.java new file mode 100644 index 0000000..2227fe9 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleParentController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleParentDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSubSampleParentService; + +@Tag(name = "管理后台 - 分样配置") +@RestController +@RequestMapping("/qms/config-sub-sample-parent") +@Validated +public class ConfigSubSampleParentController implements BusinessControllerMarker { + + + @Resource + private ConfigSubSampleParentService configSubSampleParentService; + + @PostMapping("/create") + @Operation(summary = "创建分样配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-parent:create')") + public CommonResult createConfigSubSampleParent(@Valid @RequestBody ConfigSubSampleParentSaveReqVO createReqVO) { + return success(configSubSampleParentService.createConfigSubSampleParent(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新分样配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-parent:update')") + public CommonResult updateConfigSubSampleParent(@Valid @RequestBody ConfigSubSampleParentSaveReqVO updateReqVO) { + configSubSampleParentService.updateConfigSubSampleParent(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除分样配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-parent:delete')") + public CommonResult deleteConfigSubSampleParent(@RequestParam("id") Long id) { + configSubSampleParentService.deleteConfigSubSampleParent(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除分样配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-parent:delete')") + public CommonResult deleteConfigSubSampleParentList(@RequestBody BatchDeleteReqVO req) { + configSubSampleParentService.deleteConfigSubSampleParentListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得分样配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-parent:query')") + public CommonResult getConfigSubSampleParent(@RequestParam("id") Long id) { + ConfigSubSampleParentDO configSubSampleParent = configSubSampleParentService.getConfigSubSampleParent(id); + return success(BeanUtils.toBean(configSubSampleParent, ConfigSubSampleParentRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得分样配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-parent:query')") + public CommonResult> getConfigSubSampleParentPage(@Valid ConfigSubSampleParentPageReqVO pageReqVO) { + PageResult pageResult = configSubSampleParentService.getConfigSubSampleParentPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigSubSampleParentRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出分样配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-parent:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigSubSampleParentExcel(@Valid ConfigSubSampleParentPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configSubSampleParentService.getConfigSubSampleParentPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "分样配置.xls", "数据", ConfigSubSampleParentRespVO.class, + BeanUtils.toBean(list, ConfigSubSampleParentRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigWarehouseLocationInfomationController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigWarehouseLocationInfomationController.java new file mode 100644 index 0000000..611a80c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigWarehouseLocationInfomationController.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationInfomationDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigWarehouseLocationInfomationService; + +@Tag(name = "管理后台 - 样品库位信息") +@RestController +@RequestMapping("/qms/config-warehouse-location-infomation") +@Validated +public class ConfigWarehouseLocationInfomationController implements BusinessControllerMarker { + + + @Resource + private ConfigWarehouseLocationInfomationService configWarehouseLocationInfomationService; + + @PostMapping("/create") + @Operation(summary = "创建样品库位信息") + @PreAuthorize("@ss.hasPermission('qms:config-warehouse-location-infomation:create')") + public CommonResult createConfigWarehouseLocationInfomation(@Valid @RequestBody ConfigWarehouseLocationInfomationSaveReqVO createReqVO) { + return success(configWarehouseLocationInfomationService.createConfigWarehouseLocationInfomation(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新样品库位信息") + @PreAuthorize("@ss.hasPermission('qms:config-warehouse-location-infomation:update')") + public CommonResult updateConfigWarehouseLocationInfomation(@Valid @RequestBody ConfigWarehouseLocationInfomationSaveReqVO updateReqVO) { + configWarehouseLocationInfomationService.updateConfigWarehouseLocationInfomation(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除样品库位信息") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-warehouse-location-infomation:delete')") + public CommonResult deleteConfigWarehouseLocationInfomation(@RequestParam("id") Long id) { + configWarehouseLocationInfomationService.deleteConfigWarehouseLocationInfomation(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除样品库位信息") + @PreAuthorize("@ss.hasPermission('qms:config-warehouse-location-infomation:delete')") + public CommonResult deleteConfigWarehouseLocationInfomationList(@RequestBody BatchDeleteReqVO req) { + configWarehouseLocationInfomationService.deleteConfigWarehouseLocationInfomationListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得样品库位信息") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-warehouse-location-infomation:query')") + public CommonResult getConfigWarehouseLocationInfomation(@RequestParam("id") Long id) { + ConfigWarehouseLocationInfomationDO configWarehouseLocationInfomation = configWarehouseLocationInfomationService.getConfigWarehouseLocationInfomation(id); + return success(BeanUtils.toBean(configWarehouseLocationInfomation, ConfigWarehouseLocationInfomationRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得样品库位信息分页") + @PreAuthorize("@ss.hasPermission('qms:config-warehouse-location-infomation:query')") + public CommonResult> getConfigWarehouseLocationInfomationPage(@Valid ConfigWarehouseLocationInfomationPageReqVO pageReqVO) { + PageResult pageResult = configWarehouseLocationInfomationService.getConfigWarehouseLocationInfomationPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigWarehouseLocationInfomationRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出样品库位信息 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-warehouse-location-infomation:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigWarehouseLocationInfomationExcel(@Valid ConfigWarehouseLocationInfomationPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configWarehouseLocationInfomationService.getConfigWarehouseLocationInfomationPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "样品库位信息.xls", "数据", ConfigWarehouseLocationInfomationRespVO.class, + BeanUtils.toBean(list, ConfigWarehouseLocationInfomationRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardController.java new file mode 100644 index 0000000..866ce24 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardController.java @@ -0,0 +1,146 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardExtendDO; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.MaterialAssayStandardMapper; +import cn.iocoder.yudao.module.qms.business.config.service.MaterialAssayStandardDetailService; +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDO; +import cn.iocoder.yudao.module.qms.business.config.service.MaterialAssayStandardService; + +@Tag(name = "管理后台 - 检测标准") +@RestController +@RequestMapping("/qms/material-assay-standard") +@Validated +public class MaterialAssayStandardController implements BusinessControllerMarker { + + + @Resource private MaterialAssayStandardService materialAssayStandardService; + @Resource private MaterialAssayStandardDetailService materialAssayStandardDetailService; + + @PostMapping("/createTempData") + @Operation(summary = "创建检测标准临时数据") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard:create')") + public CommonResult createTempData() { + MaterialAssayStandardSaveReqVO vo = new MaterialAssayStandardSaveReqVO(); + vo.setRemark(MaterialAssayStandardMapper.tempDataKey); + MaterialAssayStandardRespVO retVo = materialAssayStandardService.createMaterialAssayStandard(vo); + retVo.setRemark(""); + return success(retVo); + } + + + @PostMapping("/create") + @Operation(summary = "创建检测标准") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard:create')") + public CommonResult createMaterialAssayStandard(@Valid @RequestBody MaterialAssayStandardSaveReqVO createReqVO) { + return success(materialAssayStandardService.createMaterialAssayStandard(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检测标准") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard:update')") + public CommonResult updateMaterialAssayStandard(@Valid @RequestBody MaterialAssayStandardSaveReqVO updateReqVO) { + materialAssayStandardService.updateMaterialAssayStandard(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测标准") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard:delete')") + public CommonResult deleteMaterialAssayStandard(@RequestParam("id") Long id) { + materialAssayStandardService.deleteMaterialAssayStandard(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测标准") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard:delete')") + public CommonResult deleteMaterialAssayStandardList(@RequestBody BatchDeleteReqVO req) { + materialAssayStandardService.deleteMaterialAssayStandardListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测标准") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard:query')") + public CommonResult getMaterialAssayStandard(@RequestParam("id") Long id) { + MaterialAssayStandardDO materialAssayStandard = materialAssayStandardService.getMaterialAssayStandard(id); + return success(BeanUtils.toBean(materialAssayStandard, MaterialAssayStandardRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检测标准分页") + public CommonResult> getMaterialAssayStandardPage(@Valid MaterialAssayStandardPageReqVO pageReqVO) { + PageResult pageResult = materialAssayStandardService.getMaterialAssayStandardPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, MaterialAssayStandardRespVO.class)); + } + + @GetMapping("/pageWithDetail") + @Operation(summary = "获得检测标准分页(含明细列表)") + public CommonResult> pageWithDetail(@Valid MaterialAssayStandardPageReqVO pageReqVO) { + PageResult pageResult = materialAssayStandardService.getMaterialAssayStandardPageWithExtend(pageReqVO); + List standardDOList = pageResult.getList(); + if(pageResult.getTotal() == 0 || standardDOList == null || standardDOList.isEmpty()) + return success(BeanUtils.toBean(pageResult, MaterialAssayStandardRespVO.class)); + + List standardIdList = standardDOList.stream().map(MaterialAssayStandardDO::getId).toList(); + List detailListAll = materialAssayStandardDetailService.getByStandardIdList(standardIdList); + + CommonResult> result = success(BeanUtils.toBean(pageResult, MaterialAssayStandardRespVO.class)); + List list = result.getData().getList(); + for(MaterialAssayStandardRespVO standard : list) { + Long standardId = standard.getId(); + List detailList = detailListAll.stream().filter(detail -> + detail.getMaterialAssayStandardId() != null && detail.getMaterialAssayStandardId().equals(standardId)).toList(); + standard.setDetailList(detailList); + } + return result; + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测标准 Excel") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportMaterialAssayStandardExcel(@Valid MaterialAssayStandardPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = materialAssayStandardService.getMaterialAssayStandardPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测标准.xls", "数据", MaterialAssayStandardRespVO.class, + BeanUtils.toBean(list, MaterialAssayStandardRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardDetailController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardDetailController.java new file mode 100644 index 0000000..26e231f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardDetailController.java @@ -0,0 +1,140 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDO; +import cn.iocoder.yudao.module.qms.business.config.service.MaterialAssayStandardService; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO; +import cn.iocoder.yudao.module.qms.business.config.service.MaterialAssayStandardDetailService; + +@Tag(name = "管理后台 - 物料检测标准检测项目") +@RestController +@RequestMapping("/qms/material-assay-standard-detail") +@Validated +public class MaterialAssayStandardDetailController implements BusinessControllerMarker { + + + @Resource private MaterialAssayStandardDetailService materialAssayStandardDetailService; + @Resource private MaterialAssayStandardService materialAssayStandardService; + + + @GetMapping("/queryGroupByaAssayCategory") + @Operation(summary = "按检测分类分组查询") + @Parameter(name = "id", description = "按检测分类分组查询", required = true, example = "1024") + public CommonResult queryGroupByaAssayCategory(@RequestParam("baseSampleID") Long baseSampleID) { + + List standardList = materialAssayStandardService.queryByBaseSampleID(baseSampleID); + List standardIds = standardList.stream().map(MaterialAssayStandardDO::getId).toList(); + if(standardIds.isEmpty()) + return success(new JSONArray()); + MaterialAssayStandardDetailPageReqVO params = new MaterialAssayStandardDetailPageReqVO(); + params.setStandardIdList(standardIds); + List list = materialAssayStandardDetailService.selectListWithExtend(params); + JSONArray jsonArray = new JSONArray(); + List assayCategoryList = new ArrayList<>(); + assayCategoryList = list.stream().map(MaterialAssayStandardDetailRespVO::getAssayCategory).distinct().toList(); + for (String assayCategory : assayCategoryList) { + JSONObject jsonObject = new JSONObject(); + jsonObject.put("assayCategory", assayCategory); + jsonObject.put("assayCategoryName", list.stream().filter(item -> + item.getAssayCategory().equals(assayCategory)).map(MaterialAssayStandardDetailRespVO::getAssayCategoryName).findFirst().get()); + jsonObject.put("list", list.stream().filter(item -> item.getAssayCategory().equals(assayCategory)).toList()); + jsonArray.add(jsonObject); + } + return success(jsonArray); + } + + @PostMapping("/create") + @Operation(summary = "创建物料检测标准检测项目") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:create')") + public CommonResult createMaterialAssayStandardDetail(@Valid @RequestBody MaterialAssayStandardDetailSaveReqVO createReqVO) { + return success(materialAssayStandardDetailService.createMaterialAssayStandardDetail(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新物料检测标准检测项目") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:update')") + public CommonResult updateMaterialAssayStandardDetail(@Valid @RequestBody MaterialAssayStandardDetailSaveReqVO updateReqVO) { + materialAssayStandardDetailService.updateMaterialAssayStandardDetail(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除物料检测标准检测项目") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:delete')") + public CommonResult deleteMaterialAssayStandardDetail(@RequestParam("id") Long id) { + materialAssayStandardDetailService.deleteMaterialAssayStandardDetail(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除物料检测标准检测项目") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:delete')") + public CommonResult deleteMaterialAssayStandardDetailList(@RequestBody BatchDeleteReqVO req) { + materialAssayStandardDetailService.deleteMaterialAssayStandardDetailListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得物料检测标准检测项目") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:query')") + public CommonResult getMaterialAssayStandardDetail(@RequestParam("id") Long id) { + MaterialAssayStandardDetailDO materialAssayStandardDetail = materialAssayStandardDetailService.getMaterialAssayStandardDetail(id); + return success(BeanUtils.toBean(materialAssayStandardDetail, MaterialAssayStandardDetailRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得物料检测标准检测项目分页") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:query')") + public CommonResult> getMaterialAssayStandardDetailPage(@Valid MaterialAssayStandardDetailPageReqVO pageReqVO) { + PageResult pageResult = materialAssayStandardDetailService.getMaterialAssayStandardDetailPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, MaterialAssayStandardDetailRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出物料检测标准检测项目 Excel") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportMaterialAssayStandardDetailExcel(@Valid MaterialAssayStandardDetailPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = materialAssayStandardDetailService.getMaterialAssayStandardDetailPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "物料检测标准检测项目.xls", "数据", MaterialAssayStandardDetailRespVO.class, + BeanUtils.toBean(list, MaterialAssayStandardDetailRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardMethodController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardMethodController.java new file mode 100644 index 0000000..95a5bc9 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardMethodController.java @@ -0,0 +1,109 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodSaveReqVO; +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardMethodDO; +import cn.iocoder.yudao.module.qms.business.config.service.MaterialAssayStandardMethodService; + +@Tag(name = "管理后台 - 物料检测标准与方法") +@RestController +@RequestMapping("/qms/material-assay-standard-method") +@Validated +public class MaterialAssayStandardMethodController implements BusinessControllerMarker { + + + @Resource + private MaterialAssayStandardMethodService materialAssayStandardMethodService; + + @PostMapping("/create") + @Operation(summary = "创建物料检测标准与方法") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-method:create')") + public CommonResult createMaterialAssayStandardMethod(@Valid @RequestBody MaterialAssayStandardMethodSaveReqVO createReqVO) { + return success(materialAssayStandardMethodService.createMaterialAssayStandardMethod(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新物料检测标准与方法") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-method:update')") + public CommonResult updateMaterialAssayStandardMethod(@Valid @RequestBody MaterialAssayStandardMethodSaveReqVO updateReqVO) { + materialAssayStandardMethodService.updateMaterialAssayStandardMethod(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除物料检测标准与方法") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-method:delete')") + public CommonResult deleteMaterialAssayStandardMethod(@RequestParam("id") Long id) { + materialAssayStandardMethodService.deleteMaterialAssayStandardMethod(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除物料检测标准与方法") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-method:delete')") + public CommonResult deleteMaterialAssayStandardMethodList(@RequestBody BatchDeleteReqVO req) { + materialAssayStandardMethodService.deleteMaterialAssayStandardMethodListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得物料检测标准与方法") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-method:query')") + public CommonResult getMaterialAssayStandardMethod(@RequestParam("id") Long id) { + MaterialAssayStandardMethodDO materialAssayStandardMethod = materialAssayStandardMethodService.getMaterialAssayStandardMethod(id); + return success(BeanUtils.toBean(materialAssayStandardMethod, MaterialAssayStandardMethodRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得物料检测标准与方法分页") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-method:query')") + public CommonResult> getMaterialAssayStandardMethodPage(@Valid MaterialAssayStandardMethodPageReqVO pageReqVO) { + PageResult pageResult = materialAssayStandardMethodService.getMaterialAssayStandardMethodPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, MaterialAssayStandardMethodRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出物料检测标准与方法 Excel") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-method:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportMaterialAssayStandardMethodExcel(@Valid MaterialAssayStandardMethodPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = materialAssayStandardMethodService.getMaterialAssayStandardMethodPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "物料检测标准与方法.xls", "数据", MaterialAssayStandardMethodRespVO.class, + BeanUtils.toBean(list, MaterialAssayStandardMethodRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSamplePageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSamplePageReqVO.java new file mode 100644 index 0000000..803b8a3 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSamplePageReqVO.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 样品大类管理分页 Request VO") +@Data +public class BaseSamplePageReqVO extends PageParam { + + @Schema(description = "大类名称", example = "王五") + private String sampleName; + + @Schema(description = "物料ID", example = "12840") + private Long materialId; + + @Schema(description = "物料代码") + private String materialCode; + + @Schema(description = "物料名称", example = "芋艿") + private String materialName; + + @Schema(description = "样品类型_ID,字典表【T_DIC_BSN】结算样、委检样、抽查样", example = "19234") + private Long dictionaryBusinessId; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + + //===================扩展字段=================== + @Schema(description = "检测标准数量") + private String assayStandardCount; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSampleRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSampleRespVO.java new file mode 100644 index 0000000..89e1320 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSampleRespVO.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import cn.iocoder.yudao.module.qms.core.aspect.annotation.Dict; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +import static cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant.DICT_ANNOTATION_KEY_TYPE_ID; + +@Schema(description = "管理后台 - 样品大类管理 Response VO") +@Data +@ExcelIgnoreUnannotated +public class BaseSampleRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6009") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "大类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("大类名称") + private String sampleName; + + @Schema(description = "物料ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12840") + @ExcelProperty("物料ID") + private Long materialId; + + @Schema(description = "物料代码") + @ExcelProperty("物料代码") + private String materialCode; + + @Schema(description = "物料名称", example = "芋艿") + @ExcelProperty("物料名称") + private String materialName; + + @Schema(description = "样品类型_ID,字典表【T_DIC_BSN】结算样、委检样、抽查样", requiredMode = Schema.RequiredMode.REQUIRED, example = "19234") + @ExcelProperty("样品类型_ID,字典表【T_DIC_BSN】结算样、委检样、抽查样") + @Dict(dicCode = "sampleType", keyOrID = DICT_ANNOTATION_KEY_TYPE_ID) + private Long dictionaryBusinessId; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + //===================扩展字段=================== + @Schema(description = "检测标准数量") + private String assayStandardCount; +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSampleSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSampleSaveReqVO.java new file mode 100644 index 0000000..2b48a07 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSampleSaveReqVO.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 样品大类管理新增/修改 Request VO") +@Data +public class BaseSampleSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6009") + private Long id; + + @Schema(description = "大类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "大类名称不能为空") + private String sampleName; + + @Schema(description = "物料ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12840") + @NotNull(message = "物料ID不能为空") + private Long materialId; + + @Schema(description = "物料代码") + private String materialCode; + + @Schema(description = "物料名称", example = "芋艿") + private String materialName; + + @Schema(description = "样品类型_ID,字典表【T_DIC_BSN】结算样、委检样、抽查样", requiredMode = Schema.RequiredMode.REQUIRED, example = "19234") + @NotNull(message = "样品类型_ID,字典表【T_DIC_BSN】结算样、委检样、抽查样不能为空") + private Long dictionaryBusinessId; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + //===================扩展字段=================== + @Schema(description = "检测标准数量") + private String assayStandardCount; +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodPageReqVO.java new file mode 100644 index 0000000..d16bdbf --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodPageReqVO.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 检测方法配置分页 Request VO") +@Data +public class ConfigAssayMethodPageReqVO extends PageParam { + + @Schema(description = "方法库ID", example = "31274") + private Long methodConfigId; + + @Schema(description = "方法名称", example = "王五") + private String name; + + @Schema(description = "方法编号") + private String methodCode; + + @Schema(description = "描述") + private String description; + + @Schema(description = "是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "任务模版key") + private String templateKey; + + @Schema(description = "任务单编号规则") + private String codeRule; + + @Schema(description = "分配方式,【字典】【jy_assay_method_assign_way】随机分配,按顺序分配,自动分配") + private Integer assignWay; + + @Schema(description = "展示平台,【字典】【jy_assay_method_assign_platform】pad、pc、pad&pc") + private String assignPlatform; + + @Schema(description = "任务分配表单配置信息,是否添加质控样;是否过筛;是否预览打印;是否查询S值范围;是否需要流程审批;流程审批编码;退回样品审批流程编码:任务完成时的提交方式;指派单抬头key") + private String assayTaskInfomation; + + @Schema(description = "检测部门编号") + private String assayDepartmentCode; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectPageReqVO.java new file mode 100644 index 0000000..06d334d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectPageReqVO.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 检测方法分析项目配置分页 Request VO") +@Data +public class ConfigAssayMethodProjectPageReqVO extends PageParam { + + @Schema(description = "检测方法ID", example = "17382") + private Long configAssayMethodId; + + @Schema(description = "检测项目ID,字典表【T_DIC_PRJ】", example = "3728") + private Long dictionaryProjectId; + + @Schema(description = "检测单位ID", example = "18336") + private Long unitId; + + @Schema(description = "单位") + private String dictionaryProjectUnit; + + @Schema(description = "是否允许为空") + private Integer isNull; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", example = "1") + private Integer dataType; + + @Schema(description = "小数位") + private Integer decimal; + + @Schema(description = "计算公式") + private String formula; + + @Schema(description = "判定精度") + private Integer assessmentAccuracy; + + @Schema(description = "是否默认启用,1-启用,0-不启用") + private Integer isDefaultEnabled; + + @Schema(description = "排序") + private Integer sort; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterPageReqVO.java new file mode 100644 index 0000000..139df0b --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterPageReqVO.java @@ -0,0 +1,56 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 检测方法分析项目参数配置分页 Request VO") +@Data +public class ConfigAssayMethodProjectParameterPageReqVO extends PageParam { + + @Schema(description = "检测方法分析项目ID", example = "26664") + private Long configAssayMethodProjectId; + + @Schema(description = "参数ID,字典表【T_DIC_PRM】", example = "27821") + private Long dictionaryParameterId; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", example = "2") + private Integer dataType; + + @Schema(description = "小数位") + private Integer decimal; + + @Schema(description = "默认值") + private String defaultValue; + + @Schema(description = "是否允许为空") + private Integer isNull; + + @Schema(description = "计算公式") + private String formula; + + @Schema(description = "pc界面是否显示") + private Integer isShow; + + @Schema(description = "排序") + private Integer sort; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterRespVO.java new file mode 100644 index 0000000..e0f426b --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterRespVO.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 检测方法分析项目参数配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigAssayMethodProjectParameterRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28105") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "检测方法分析项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26664") + @ExcelProperty("检测方法分析项目ID") + private Long configAssayMethodProjectId; + + @Schema(description = "参数ID,字典表【T_DIC_PRM】", requiredMode = Schema.RequiredMode.REQUIRED, example = "27821") + @ExcelProperty("参数ID,字典表【T_DIC_PRM】") + private Long dictionaryParameterId; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间") + private Integer dataType; + + @Schema(description = "小数位") + @ExcelProperty("小数位") + private Integer decimal; + + @Schema(description = "默认值") + @ExcelProperty("默认值") + private String defaultValue; + + @Schema(description = "是否允许为空", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否允许为空") + private Integer isNull; + + @Schema(description = "计算公式") + @ExcelProperty("计算公式") + private String formula; + + @Schema(description = "pc界面是否显示", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("pc界面是否显示") + private Integer isShow; + + @Schema(description = "排序") + @ExcelProperty("排序") + private Integer sort; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterSaveReqVO.java new file mode 100644 index 0000000..c7b713a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterSaveReqVO.java @@ -0,0 +1,58 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 检测方法分析项目参数配置新增/修改 Request VO") +@Data +public class ConfigAssayMethodProjectParameterSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28105") + private Long id; + + @Schema(description = "检测方法分析项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26664") + @NotNull(message = "检测方法分析项目ID不能为空") + private Long configAssayMethodProjectId; + + @Schema(description = "参数ID,字典表【T_DIC_PRM】", requiredMode = Schema.RequiredMode.REQUIRED, example = "27821") + @NotNull(message = "参数ID,字典表【T_DIC_PRM】不能为空") + private Long dictionaryParameterId; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotNull(message = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间不能为空") + private Integer dataType; + + @Schema(description = "小数位") + private Integer decimal; + + @Schema(description = "默认值") + private String defaultValue; + + @Schema(description = "是否允许为空", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否允许为空不能为空") + private Integer isNull; + + @Schema(description = "计算公式") + private String formula; + + @Schema(description = "pc界面是否显示", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "pc界面是否显示不能为空") + private Integer isShow; + + @Schema(description = "排序") + private Integer sort; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "版本不能为空") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectRespVO.java new file mode 100644 index 0000000..05730b6 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectRespVO.java @@ -0,0 +1,79 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 检测方法分析项目配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigAssayMethodProjectRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23654") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "检测方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17382") + @ExcelProperty("检测方法ID") + private Long configAssayMethodId; + + @Schema(description = "检测项目ID,字典表【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "3728") + @ExcelProperty("检测项目ID,字典表【T_DIC_PRJ】") + private Long dictionaryProjectId; + + @Schema(description = "检测单位ID", example = "18336") + @ExcelProperty("检测单位ID") + private Long unitId; + + @Schema(description = "单位") + @ExcelProperty("单位") + private String dictionaryProjectUnit; + + @Schema(description = "是否允许为空", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否允许为空") + private Integer isNull; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间") + private Integer dataType; + + @Schema(description = "小数位") + @ExcelProperty("小数位") + private Integer decimal; + + @Schema(description = "计算公式") + @ExcelProperty("计算公式") + private String formula; + + @Schema(description = "判定精度") + @ExcelProperty("判定精度") + private Integer assessmentAccuracy; + + @Schema(description = "是否默认启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否默认启用,1-启用,0-不启用") + private Integer isDefaultEnabled; + + @Schema(description = "排序") + @ExcelProperty("排序") + private Integer sort; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectSaveReqVO.java new file mode 100644 index 0000000..47227e4 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectSaveReqVO.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 检测方法分析项目配置新增/修改 Request VO") +@Data +public class ConfigAssayMethodProjectSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23654") + private Long id; + + @Schema(description = "检测方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17382") + @NotNull(message = "检测方法ID不能为空") + private Long configAssayMethodId; + + @Schema(description = "检测项目ID,字典表【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "3728") + @NotNull(message = "检测项目ID,字典表【T_DIC_PRJ】不能为空") + private Long dictionaryProjectId; + + @Schema(description = "检测单位ID", example = "18336") + private Long unitId; + + @Schema(description = "单位") + private String dictionaryProjectUnit; + + @Schema(description = "是否允许为空", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否允许为空不能为空") + private Integer isNull; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间不能为空") + private Integer dataType; + + @Schema(description = "小数位") + private Integer decimal; + + @Schema(description = "计算公式") + private String formula; + + @Schema(description = "判定精度") + private Integer assessmentAccuracy; + + @Schema(description = "是否默认启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否默认启用,1-启用,0-不启用不能为空") + private Integer isDefaultEnabled; + + @Schema(description = "排序") + private Integer sort; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "版本不能为空") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodRespVO.java new file mode 100644 index 0000000..395dd64 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodRespVO.java @@ -0,0 +1,79 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 检测方法配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigAssayMethodRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31987") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "方法库ID", example = "31274") + @ExcelProperty("方法库ID") + private Long methodConfigId; + + @Schema(description = "方法名称", example = "王五") + @ExcelProperty("方法名称") + private String name; + + @Schema(description = "方法编号") + @ExcelProperty("方法编号") + private String methodCode; + + @Schema(description = "描述") + @ExcelProperty("描述") + private String description; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "任务模版key") + @ExcelProperty("任务模版key") + private String templateKey; + + @Schema(description = "任务单编号规则", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("任务单编号规则") + private String codeRule; + + @Schema(description = "分配方式,【字典】【jy_assay_method_assign_way】随机分配,按顺序分配,自动分配", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("分配方式,【字典】【jy_assay_method_assign_way】随机分配,按顺序分配,自动分配") + private Integer assignWay; + + @Schema(description = "展示平台,【字典】【jy_assay_method_assign_platform】pad、pc、pad&pc", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("展示平台,【字典】【jy_assay_method_assign_platform】pad、pc、pad&pc") + private String assignPlatform; + + @Schema(description = "任务分配表单配置信息,是否添加质控样;是否过筛;是否预览打印;是否查询S值范围;是否需要流程审批;流程审批编码;退回样品审批流程编码:任务完成时的提交方式;指派单抬头key") + @ExcelProperty("任务分配表单配置信息,是否添加质控样;是否过筛;是否预览打印;是否查询S值范围;是否需要流程审批;流程审批编码;退回样品审批流程编码:任务完成时的提交方式;指派单抬头key") + private String assayTaskInfomation; + + @Schema(description = "检测部门编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("检测部门编号") + private String assayDepartmentCode; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodSaveReqVO.java new file mode 100644 index 0000000..7f86091 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodSaveReqVO.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 检测方法配置新增/修改 Request VO") +@Data +public class ConfigAssayMethodSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31987") + private Long id; + + @Schema(description = "方法库ID", example = "31274") + private Long methodConfigId; + + @Schema(description = "方法名称", example = "王五") + private String name; + + @Schema(description = "方法编号") + private String methodCode; + + @Schema(description = "描述") + private String description; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否启用,1-启用,0-不启用不能为空") + private Integer isEnabled; + + @Schema(description = "任务模版key") + private String templateKey; + + @Schema(description = "任务单编号规则", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "任务单编号规则不能为空") + private String codeRule; + + @Schema(description = "分配方式,【字典】【jy_assay_method_assign_way】随机分配,按顺序分配,自动分配", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "分配方式,【字典】【jy_assay_method_assign_way】随机分配,按顺序分配,自动分配不能为空") + private Integer assignWay; + + @Schema(description = "展示平台,【字典】【jy_assay_method_assign_platform】pad、pc、pad&pc", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "展示平台,【字典】【jy_assay_method_assign_platform】pad、pc、pad&pc不能为空") + private String assignPlatform; + + @Schema(description = "任务分配表单配置信息,是否添加质控样;是否过筛;是否预览打印;是否查询S值范围;是否需要流程审批;流程审批编码;退回样品审批流程编码:任务完成时的提交方式;指派单抬头key") + private String assayTaskInfomation; + + @Schema(description = "检测部门编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "检测部门编号不能为空") + private String assayDepartmentCode; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "版本不能为空") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSamplePageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSamplePageReqVO.java new file mode 100644 index 0000000..f416d70 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSamplePageReqVO.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 主样配置分页 Request VO") +@Data +public class ConfigBaseSamplePageReqVO extends PageParam { + + @Schema(description = "样品ID", example = "19403") + private Long baseSampleId; + + @Schema(description = "父级ID", example = "15103") + private Long parentId; + + @Schema(description = "编码规则") + private String codeRule; + + @Schema(description = "样品流程Key") + private String flowKey; + + @Schema(description = "样品标签打印模版") + private String printTemplate; + + @Schema(description = "样品标签打印份数") + private byte[] codePrintQuantity; + + @Schema(description = "样品名称", example = "张三") + private String sampleName; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSampleRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSampleRespVO.java new file mode 100644 index 0000000..06f27d1 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSampleRespVO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 主样配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigBaseSampleRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12328") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "样品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19403") + @ExcelProperty("样品ID") + private Long baseSampleId; + + @Schema(description = "父级ID", example = "15103") + @ExcelProperty("父级ID") + private Long parentId; + + @Schema(description = "编码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("编码规则") + private String codeRule; + + @Schema(description = "样品流程Key", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品流程Key") + private String flowKey; + + @Schema(description = "样品标签打印模版", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品标签打印模版") + private String printTemplate; + + @Schema(description = "样品标签打印份数", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品标签打印份数") + private byte[] codePrintQuantity; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSampleSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSampleSaveReqVO.java new file mode 100644 index 0000000..a86dedd --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSampleSaveReqVO.java @@ -0,0 +1,53 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 主样配置新增/修改 Request VO") +@Data +public class ConfigBaseSampleSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12328") + private Long id; + + @Schema(description = "样品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19403") + @NotNull(message = "样品ID不能为空") + private Long baseSampleId; + + @Schema(description = "父级ID", example = "15103") + private Long parentId; + + @Schema(description = "编码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "编码规则不能为空") + private String codeRule; + + @Schema(description = "样品流程Key", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品流程Key不能为空") + private String flowKey; + + @Schema(description = "样品标签打印模版", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品标签打印模版不能为空") + private String printTemplate; + + @Schema(description = "样品标签打印份数", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "样品标签打印份数不能为空") + private byte[] codePrintQuantity; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "版本不能为空") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypePageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypePageReqVO.java new file mode 100644 index 0000000..071ea9f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypePageReqVO.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 报告类型配置分页 Request VO") +@Data +public class ConfigDocumentTypePageReqVO extends PageParam { + + @Schema(description = "报表类型ID", example = "21445") + private Long configReportTypeId; + + @Schema(description = "类型名称", example = "王五") + private String name; + + @Schema(description = "流程模型key") + private String flowModelKey; + + @Schema(description = "流程表单key") + private String flowFormKey; + + @Schema(description = "报告模板key") + private String reportKey; + + @Schema(description = "报告编号规则") + private String codeRule; + + @Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", example = "1") + private String type; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypeRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypeRespVO.java new file mode 100644 index 0000000..4c36dc4 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypeRespVO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 报告类型配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigDocumentTypeRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32458") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "报表类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21445") + @ExcelProperty("报表类型ID") + private Long configReportTypeId; + + @Schema(description = "类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("类型名称") + private String name; + + @Schema(description = "流程模型key", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("流程模型key") + private String flowModelKey; + + @Schema(description = "流程表单key", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("流程表单key") + private String flowFormKey; + + @Schema(description = "报告模板key", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("报告模板key") + private String reportKey; + + @Schema(description = "报告编号规则", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("报告编号规则") + private String codeRule; + + @Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告") + private String type; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypeSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypeSaveReqVO.java new file mode 100644 index 0000000..439cbf5 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypeSaveReqVO.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 报告类型配置新增/修改 Request VO") +@Data +public class ConfigDocumentTypeSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32458") + private Long id; + + @Schema(description = "报表类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21445") + @NotNull(message = "报表类型ID不能为空") + private Long configReportTypeId; + + @Schema(description = "类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "类型名称不能为空") + private String name; + + @Schema(description = "流程模型key", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "流程模型key不能为空") + private String flowModelKey; + + @Schema(description = "流程表单key", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "流程表单key不能为空") + private String flowFormKey; + + @Schema(description = "报告模板key", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "报告模板key不能为空") + private String reportKey; + + @Schema(description = "报告编号规则", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "报告编号规则不能为空") + private String codeRule; + + @Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告不能为空") + private String type; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "版本不能为空") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourcePageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourcePageReqVO.java new file mode 100644 index 0000000..2e0b417 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourcePageReqVO.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 检验委托来源配置分页 Request VO") +@Data +public class ConfigEntrustSourcePageReqVO extends PageParam { + + @Schema(description = "名称,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托", example = "王五") + private String name; + + @Schema(description = "模版Key") + private String key; + + @Schema(description = "数据集ID,T_DAT_COLT_FLD", example = "11839") + private Long dataCollectionId; + + @Schema(description = "委托单模版") + private String template; + + @Schema(description = "委托单号规则") + private String codeRule; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceReqVO.java new file mode 100644 index 0000000..7826187 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceReqVO.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +import java.time.LocalDateTime; + +import org.springframework.format.annotation.DateTimeFormat; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** + * ConfigEntrustSourceReqVO + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月11日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月11日 + */ +@Schema(description = "管理后台 - 检验委托来源配置 Request VO") +@Data +public class ConfigEntrustSourceReqVO { + + @Schema(description = "名称,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托", example = "王五") + private String name; + + @Schema(description = "模版Key") + private String key; + + @Schema(description = "数据集ID,T_DAT_COLT_FLD", example = "11839") + private Long dataCollectionId; + + @Schema(description = "委托单模版") + private String template; + + @Schema(description = "委托单号规则") + private String codeRule; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceRespVO.java new file mode 100644 index 0000000..2062815 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceRespVO.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 检验委托来源配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigEntrustSourceRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26194") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "名称,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("名称,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托") + private String name; + + @Schema(description = "模版Key", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("模版Key") + private String key; + + @Schema(description = "数据集ID,T_DAT_COLT_FLD", requiredMode = Schema.RequiredMode.REQUIRED, example = "11839") + @ExcelProperty("数据集ID,T_DAT_COLT_FLD") + private Long dataCollectionId; + + @Schema(description = "委托单模版") + @ExcelProperty("委托单模版") + private String template; + + @Schema(description = "委托单号规则") + @ExcelProperty("委托单号规则") + private String codeRule; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceSaveReqVO.java new file mode 100644 index 0000000..c6a3fbe --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceSaveReqVO.java @@ -0,0 +1,40 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 检验委托来源配置新增/修改 Request VO") +@Data +public class ConfigEntrustSourceSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26194") + private Long id; + + @Schema(description = "名称,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "名称,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托不能为空") + private String name; + + @Schema(description = "模版Key", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "模版Key不能为空") + private String key; + + @Schema(description = "数据集ID,T_DAT_COLT_FLD", requiredMode = Schema.RequiredMode.REQUIRED, example = "11839") + @NotNull(message = "数据集ID,T_DAT_COLT_FLD不能为空") + private Long dataCollectionId; + + @Schema(description = "委托单模版") + private String template; + + @Schema(description = "委托单号规则") + private String codeRule; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectPageReqVO.java new file mode 100644 index 0000000..091a23e --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectPageReqVO.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 检测项目配置分页 Request VO") +@Data +public class ConfigProjectPageReqVO extends PageParam { + + @Schema(description = "检测项目ID", example = "6630") + private Long dictionaryProjectId; + + @Schema(description = "检测方法配置ID", example = "5185") + private Long configAssayMethodId; + + @Schema(description = "上报列字段") + private String saveColumn; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectRespVO.java new file mode 100644 index 0000000..547e97a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectRespVO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 检测项目配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigProjectRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27310") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6630") + @ExcelProperty("检测项目ID") + private Long dictionaryProjectId; + + @Schema(description = "检测方法配置ID", example = "5185") + @ExcelProperty("检测方法配置ID") + private Long configAssayMethodId; + + @Schema(description = "上报列字段", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("上报列字段") + private String saveColumn; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectSaveReqVO.java new file mode 100644 index 0000000..889f530 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectSaveReqVO.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 检测项目配置新增/修改 Request VO") +@Data +public class ConfigProjectSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27310") + private Long id; + + @Schema(description = "检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6630") + @NotNull(message = "检测项目ID不能为空") + private Long dictionaryProjectId; + + @Schema(description = "检测方法配置ID", example = "5185") + private Long configAssayMethodId; + + @Schema(description = "上报列字段", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "上报列字段不能为空") + private String saveColumn; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldPageReqVO.java new file mode 100644 index 0000000..065f5d7 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldPageReqVO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 报表字段配置分页 Request VO") +@Data +public class ConfigReportFieldPageReqVO extends PageParam { + + @Schema(description = "报表类型ID", example = "28419") + private Long configReportTypeId; + + @Schema(description = "绑定字段") + private String field; + + @Schema(description = "标题名称", example = "张三") + private String fieldName; + + @Schema(description = "排序号") + private Integer no; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", example = "2") + private Integer dataType; + + @Schema(description = "小数位") + private Integer decimal; + + @Schema(description = "列宽") + private Integer fieldWidth; + + @Schema(description = "是否分组") + private Integer isGroup; + + @Schema(description = "是否可修改") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private Integer[] isUpdate; + + @Schema(description = "计算公式") + private String formula; + + @Schema(description = "表头分组") + private String titleGroup; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注,1-是,0-否") + private String remark; + + @Schema(description = "版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldRespVO.java new file mode 100644 index 0000000..c28439f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldRespVO.java @@ -0,0 +1,79 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 报表字段配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigReportFieldRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6012") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "报表类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28419") + @ExcelProperty("报表类型ID") + private Long configReportTypeId; + + @Schema(description = "绑定字段", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("绑定字段") + private String field; + + @Schema(description = "标题名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("标题名称") + private String fieldName; + + @Schema(description = "排序号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("排序号") + private Integer no; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间") + private Integer dataType; + + @Schema(description = "小数位") + @ExcelProperty("小数位") + private Integer decimal; + + @Schema(description = "列宽", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("列宽") + private Integer fieldWidth; + + @Schema(description = "是否分组", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否分组") + private Integer isGroup; + + @Schema(description = "是否可修改", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否可修改") + private Integer isUpdate; + + @Schema(description = "计算公式", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("计算公式") + private String formula; + + @Schema(description = "表头分组", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("表头分组") + private String titleGroup; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注,1-是,0-否") + @ExcelProperty("备注,1-是,0-否") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldSaveReqVO.java new file mode 100644 index 0000000..2edb2f1 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldSaveReqVO.java @@ -0,0 +1,69 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 报表字段配置新增/修改 Request VO") +@Data +public class ConfigReportFieldSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6012") + private Long id; + + @Schema(description = "报表类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28419") + @NotNull(message = "报表类型ID不能为空") + private Long configReportTypeId; + + @Schema(description = "绑定字段", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "绑定字段不能为空") + private String field; + + @Schema(description = "标题名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "标题名称不能为空") + private String fieldName; + + @Schema(description = "排序号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "排序号不能为空") + private Integer no; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotNull(message = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间不能为空") + private Integer dataType; + + @Schema(description = "小数位") + private Integer decimal; + + @Schema(description = "列宽", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "列宽不能为空") + private Integer fieldWidth; + + @Schema(description = "是否分组", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否分组不能为空") + private Integer isGroup; + + @Schema(description = "是否可修改", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否可修改不能为空") + private Integer isUpdate; + + @Schema(description = "计算公式", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "计算公式不能为空") + private String formula; + + @Schema(description = "表头分组", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "表头分组不能为空") + private String titleGroup; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注,1-是,0-否") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "版本不能为空") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplatePageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplatePageReqVO.java new file mode 100644 index 0000000..82ebf0f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplatePageReqVO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 报表模版配置分页 Request VO") +@Data +public class ConfigReportTemplatePageReqVO extends PageParam { + + @Schema(description = "模版名称", example = "赵六") + private String name; + + @Schema(description = "模版Key") + private String key; + + @Schema(description = "内容") + private String content; + + @Schema(description = "数据接口地址", example = "https://www.iocoder.cn") + private String dataUrl; + + @Schema(description = "数据") + private String data; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "15082") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplateRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplateRespVO.java new file mode 100644 index 0000000..c79751b --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplateRespVO.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 报表模版配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigReportTemplateRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2363") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "模版名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @ExcelProperty("模版名称") + private String name; + + @Schema(description = "模版Key", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("模版Key") + private String key; + + @Schema(description = "内容", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("内容") + private String content; + + @Schema(description = "数据接口地址", example = "https://www.iocoder.cn") + @ExcelProperty("数据接口地址") + private String dataUrl; + + @Schema(description = "数据") + @ExcelProperty("数据") + private String data; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "15082") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplateSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplateSaveReqVO.java new file mode 100644 index 0000000..beacbda --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplateSaveReqVO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 报表模版配置新增/修改 Request VO") +@Data +public class ConfigReportTemplateSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2363") + private Long id; + + @Schema(description = "模版名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @NotEmpty(message = "模版名称不能为空") + private String name; + + @Schema(description = "模版Key", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "模版Key不能为空") + private String key; + + @Schema(description = "内容", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "内容不能为空") + private String content; + + @Schema(description = "数据接口地址", example = "https://www.iocoder.cn") + private String dataUrl; + + @Schema(description = "数据") + private String data; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + //@NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "15082") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypePageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypePageReqVO.java new file mode 100644 index 0000000..7bc8b74 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypePageReqVO.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 报表类型配置分页 Request VO") +@Data +public class ConfigReportTypePageReqVO extends PageParam { + + @Schema(description = "报表名称", example = "李四") + private String name; + + @Schema(description = "键值") + private String key; + + @Schema(description = "报表模版") + private String template; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypeRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypeRespVO.java new file mode 100644 index 0000000..de13721 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypeRespVO.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 报表类型配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigReportTypeRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9946") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "报表名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("报表名称") + private String name; + + @Schema(description = "键值") + @ExcelProperty("键值") + private String key; + + @Schema(description = "报表模版", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("报表模版") + private String template; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypeSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypeSaveReqVO.java new file mode 100644 index 0000000..6dc256e --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypeSaveReqVO.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 报表类型配置新增/修改 Request VO") +@Data +public class ConfigReportTypeSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9946") + private Long id; + + @Schema(description = "报表名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "报表名称不能为空") + private String name; + + @Schema(description = "键值") + private String key; + + @Schema(description = "报表模版", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "报表模版不能为空") + private String template; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "版本不能为空") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowPageReqVO.java new file mode 100644 index 0000000..d162ccc --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowPageReqVO.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 样品流程配置分页 Request VO") +@Data +public class ConfigSampleFlowPageReqVO extends PageParam { + + @Schema(description = "流程名称", example = "芋艿") + private String name; + + @Schema(description = "流程Key") + private String key; + + @Schema(description = "流程配置内容JSON") + private String content; + + @Schema(description = "流程描述") + private String description; + + @Schema(description = "类型,主样、子样", example = "1") + private String type; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowRespVO.java new file mode 100644 index 0000000..9c912c8 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowRespVO.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 样品流程配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigSampleFlowRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10654") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @ExcelProperty("流程名称") + private String name; + + @Schema(description = "流程Key", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("流程Key") + private String key; + + @Schema(description = "流程配置内容JSON") + @ExcelProperty("流程配置内容JSON") + private String content; + + @Schema(description = "流程描述") + @ExcelProperty("流程描述") + private String description; + + @Schema(description = "类型,主样、子样", example = "1") + @ExcelProperty("类型,主样、子样") + private String type; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowSaveReqVO.java new file mode 100644 index 0000000..23ad302 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowSaveReqVO.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 样品流程配置新增/修改 Request VO") +@Data +public class ConfigSampleFlowSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10654") + private Long id; + + @Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @NotEmpty(message = "流程名称不能为空") + private String name; + + @Schema(description = "流程Key", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "流程Key不能为空") + private String key; + + @Schema(description = "流程配置内容JSON") + private String content; + + @Schema(description = "流程描述") + private String description; + + @Schema(description = "类型,主样、子样", example = "1") + private String type; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportPageReqVO.java new file mode 100644 index 0000000..18e877d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportPageReqVO.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 样品报表关系分页 Request VO") +@Data +public class ConfigSampleReportPageReqVO extends PageParam { + + @Schema(description = "报表类型", example = "23048") + private Long configReportTypeId; + + @Schema(description = "主样配置ID", example = "10803") + private Long configBaseSampleId; + + @Schema(description = "样品名称", example = "李四") + private String sampleName; + + @Schema(description = "数据来源") + private String dataSource; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportRespVO.java new file mode 100644 index 0000000..da50f96 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportRespVO.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 样品报表关系 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigSampleReportRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17737") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "报表类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "23048") + @ExcelProperty("报表类型") + private Long configReportTypeId; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10803") + @ExcelProperty("主样配置ID") + private Long configBaseSampleId; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "数据来源") + @ExcelProperty("数据来源") + private String dataSource; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportSaveReqVO.java new file mode 100644 index 0000000..c7ee541 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportSaveReqVO.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 样品报表关系新增/修改 Request VO") +@Data +public class ConfigSampleReportSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17737") + private Long id; + + @Schema(description = "报表类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "23048") + @NotNull(message = "报表类型不能为空") + private Long configReportTypeId; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10803") + @NotNull(message = "主样配置ID不能为空") + private Long configBaseSampleId; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @Schema(description = "数据来源") + private String dataSource; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "版本不能为空") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodePageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodePageReqVO.java new file mode 100644 index 0000000..d8b2d77 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodePageReqVO.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - LiteFlow脚本配置分页 Request VO") +@Data +public class ConfigSimpleFlowCodePageReqVO extends PageParam { + + @Schema(description = "脚本序号") + private String codeNo; + + @Schema(description = "脚本名称", example = "李四") + private String codeName; + + @Schema(description = "脚本数据") + private String codeData; + + @Schema(description = "脚本类型,【字典】【jy_simple_flow_code_type】普通脚本、选择脚本、条件脚本、数量循环、条件循环、退出循环节", example = "1") + private String codeType; + + @Schema(description = "脚本语言,【字典】【jy_simple_flow_code_language】Java,Groovy,QLExpress") + private String codeLanguage; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeReqVO.java new file mode 100644 index 0000000..ac8a73e --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeReqVO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - LiteFlow脚本配置 Request VO") +@Data +public class ConfigSimpleFlowCodeReqVO { + + @Schema(description = "脚本序号") + private String codeNo; + + @Schema(description = "脚本名称", example = "李四") + private String codeName; + + @Schema(description = "脚本数据") + private String codeData; + + @Schema(description = "脚本类型,【字典】【jy_simple_flow_code_type】普通脚本、选择脚本、条件脚本、数量循环、条件循环、退出循环节", example = "1") + private String codeType; + + @Schema(description = "脚本语言,【字典】【jy_simple_flow_code_language】Java,Groovy,QLExpress") + private String codeLanguage; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeRespVO.java new file mode 100644 index 0000000..1999f53 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeRespVO.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - LiteFlow脚本配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigSimpleFlowCodeRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17472") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "脚本序号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("脚本序号") + private String codeNo; + + @Schema(description = "脚本名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("脚本名称") + private String codeName; + + @Schema(description = "脚本数据", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("脚本数据") + private String codeData; + + @Schema(description = "脚本类型,【字典】【jy_simple_flow_code_type】普通脚本、选择脚本、条件脚本、数量循环、条件循环、退出循环节", example = "1") + @ExcelProperty("脚本类型,【字典】【jy_simple_flow_code_type】普通脚本、选择脚本、条件脚本、数量循环、条件循环、退出循环节") + private String codeType; + + @Schema(description = "脚本语言,【字典】【jy_simple_flow_code_language】Java,Groovy,QLExpress") + @ExcelProperty("脚本语言,【字典】【jy_simple_flow_code_language】Java,Groovy,QLExpress") + private String codeLanguage; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeSaveReqVO.java new file mode 100644 index 0000000..db6de1a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeSaveReqVO.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - LiteFlow脚本配置新增/修改 Request VO") +@Data +public class ConfigSimpleFlowCodeSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17472") + private Long id; + + @Schema(description = "脚本名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "脚本名称不能为空") + private String codeNo; + + @Schema(description = "脚本描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "脚本描述不能为空") + private String codeName; + + @Schema(description = "脚本类型,【字典】【jy_simple_flow_code_type】普通脚本、选择脚本、条件脚本、数量循环、条件循环、退出循环节", example = "1") + @NotEmpty(message = "脚本类型不能为空") + private String codeType; + + @Schema(description = "脚本语言,【字典】【jy_simple_flow_code_language】Java,Groovy,QLExpress") + @NotEmpty(message = "脚本语言不能为空") + private String codeLanguage; + + @Schema(description = "脚本数据", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "脚本数据不能为空") + private String codeData; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRulePageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRulePageReqVO.java new file mode 100644 index 0000000..b8b164d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRulePageReqVO.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - LiteFlow规则配置分页 Request VO") +@Data +public class ConfigSimpleFlowRulePageReqVO extends PageParam { + + @Schema(description = "名称", example = "王五") + private String name; + + @Schema(description = "描述") + private String description; + + @Schema(description = "EL表达式") + private String data; + + @Schema(description = "路由") + private String route; + + @Schema(description = "组") + private String group; + + @Schema(description = "流程图") + private String flow; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleReqVO.java new file mode 100644 index 0000000..25a4003 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleReqVO.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - LiteFlow规则配置 Request VO") +@Data +public class ConfigSimpleFlowRuleReqVO { + + @Schema(description = "名称", example = "王五") + private String name; + + @Schema(description = "描述") + private String description; + + @Schema(description = "EL表达式") + private String data; + + @Schema(description = "路由") + private String route; + + @Schema(description = "组") + private String group; + + @Schema(description = "流程图") + private String flow; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleRespVO.java new file mode 100644 index 0000000..12ea584 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleRespVO.java @@ -0,0 +1,55 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - LiteFlow规则配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigSimpleFlowRuleRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26561") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("名称") + private String name; + + @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("描述") + private String description; + + @Schema(description = "EL表达式", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("EL表达式") + private String data; + + @Schema(description = "路由") + @ExcelProperty("路由") + private String route; + + @Schema(description = "组") + @ExcelProperty("组") + private String group; + + @Schema(description = "流程图") + @ExcelProperty("流程图") + private String flow; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleSaveReqVO.java new file mode 100644 index 0000000..0d2d6be --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleSaveReqVO.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - LiteFlow规则配置新增/修改 Request VO") +@Data +public class ConfigSimpleFlowRuleSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26561") + private Long id; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "名称不能为空") + private String name; + + @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED) + private String description; + + @Schema(description = "EL表达式", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "EL表达式不能为空") + private String data; + + @Schema(description = "路由") + private String route; + + @Schema(description = "组") + private String group; + + @Schema(description = "流程图") + private String flow; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectPageReqVO.java new file mode 100644 index 0000000..1acbad3 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectPageReqVO.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 标准样检测项目配置分页 Request VO") +@Data +public class ConfigStandardSampleProjectPageReqVO extends PageParam { + + @Schema(description = "标准样类型ID", example = "31807") + private Long configStandardSampleTypeId; + + @Schema(description = "检测项目ID", example = "7405") + private Long dictionaryProjectId; + + @Schema(description = "检测项目名称", example = "张三") + private String dictionaryProjectName; + + @Schema(description = "检测单位ID,UNT表", example = "25945") + private Long unitId; + + @Schema(description = "检测项目单位") + private String dictionaryProjectUnit; + + @Schema(description = "小数精度") + private Integer accuracy; + + @Schema(description = "排序号") + private String sort; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectRespVO.java new file mode 100644 index 0000000..8fec143 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectRespVO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 标准样检测项目配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigStandardSampleProjectRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13401") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "标准样类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31807") + @ExcelProperty("标准样类型ID") + private Long configStandardSampleTypeId; + + @Schema(description = "检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7405") + @ExcelProperty("检测项目ID") + private Long dictionaryProjectId; + + @Schema(description = "检测项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("检测项目名称") + private String dictionaryProjectName; + + @Schema(description = "检测单位ID,UNT表", example = "25945") + @ExcelProperty("检测单位ID,UNT表") + private Long unitId; + + @Schema(description = "检测项目单位") + @ExcelProperty("检测项目单位") + private String dictionaryProjectUnit; + + @Schema(description = "小数精度", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("小数精度") + private Integer accuracy; + + @Schema(description = "排序号") + @ExcelProperty("排序号") + private String sort; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectSaveReqVO.java new file mode 100644 index 0000000..a2a0682 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectSaveReqVO.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 标准样检测项目配置新增/修改 Request VO") +@Data +public class ConfigStandardSampleProjectSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13401") + private Long id; + + @Schema(description = "标准样类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31807") + @NotNull(message = "标准样类型ID不能为空") + private Long configStandardSampleTypeId; + + @Schema(description = "检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7405") + @NotNull(message = "检测项目ID不能为空") + private Long dictionaryProjectId; + + @Schema(description = "检测项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "检测项目名称不能为空") + private String dictionaryProjectName; + + @Schema(description = "检测单位ID,UNT表", example = "25945") + private Long unitId; + + @Schema(description = "检测项目单位") + private String dictionaryProjectUnit; + + @Schema(description = "小数精度", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "小数精度不能为空") + private Integer accuracy; + + @Schema(description = "排序号") + private String sort; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "版本不能为空") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypePageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypePageReqVO.java new file mode 100644 index 0000000..5ed3e46 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypePageReqVO.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 标准样类型配置分页 Request VO") +@Data +public class ConfigStandardSampleTypePageReqVO extends PageParam { + + @Schema(description = "主样配置ID", example = "7034") + private Long configBaseSampleId; + + @Schema(description = "标准样类型名称", example = "赵六") + private String name; + + @Schema(description = "编码规则") + private String codeRule; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "化验部门编号") + private String assayDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypeRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypeRespVO.java new file mode 100644 index 0000000..da4542a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypeRespVO.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 标准样类型配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigStandardSampleTypeRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22010") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7034") + @ExcelProperty("主样配置ID") + private Long configBaseSampleId; + + @Schema(description = "标准样类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @ExcelProperty("标准样类型名称") + private String name; + + @Schema(description = "编码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("编码规则") + private String codeRule; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "化验部门编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("化验部门编号") + private String assayDepartmentCode; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypeSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypeSaveReqVO.java new file mode 100644 index 0000000..b955502 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypeSaveReqVO.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 标准样类型配置新增/修改 Request VO") +@Data +public class ConfigStandardSampleTypeSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22010") + private Long id; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7034") + @NotNull(message = "主样配置ID不能为空") + private Long configBaseSampleId; + + @Schema(description = "标准样类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @NotEmpty(message = "标准样类型名称不能为空") + private String name; + + @Schema(description = "编码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "编码规则不能为空") + private String codeRule; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "化验部门编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "化验部门编号不能为空") + private String assayDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "版本不能为空") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodPageReqVO.java new file mode 100644 index 0000000..34f630c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodPageReqVO.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 子样与检测方法配置分页 Request VO") +@Data +public class ConfigSubSampleMethodPageReqVO extends PageParam { + + @Schema(description = "子样配置ID", example = "29286") + private Long configSubSampleId; + + @Schema(description = "分析方法ID", example = "21169") + private Long configAssayMethodId; + + @Schema(description = "是否默认使用,1-启用,0-不启用") + private Integer isDefaultUse; + + @Schema(description = "父级ID", example = "23674") + private Long parentId; + + @Schema(description = "名称", example = "王五") + private String name; + + @Schema(description = "关键值") + private String key; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodRespVO.java new file mode 100644 index 0000000..12b2da2 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodRespVO.java @@ -0,0 +1,55 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 子样与检测方法配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigSubSampleMethodRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2670") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "子样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29286") + @ExcelProperty("子样配置ID") + private Long configSubSampleId; + + @Schema(description = "分析方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21169") + @ExcelProperty("分析方法ID") + private Long configAssayMethodId; + + @Schema(description = "是否默认使用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否默认使用,1-启用,0-不启用") + private Integer isDefaultUse; + + @Schema(description = "父级ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23674") + @ExcelProperty("父级ID") + private Long parentId; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("名称") + private String name; + + @Schema(description = "关键值", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("关键值") + private String key; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodSaveReqVO.java new file mode 100644 index 0000000..9373799 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodSaveReqVO.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 子样与检测方法配置新增/修改 Request VO") +@Data +public class ConfigSubSampleMethodSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2670") + private Long id; + + @Schema(description = "子样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29286") + @NotNull(message = "子样配置ID不能为空") + private Long configSubSampleId; + + @Schema(description = "分析方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21169") + @NotNull(message = "分析方法ID不能为空") + private Long configAssayMethodId; + + @Schema(description = "是否默认使用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否默认使用,1-启用,0-不启用不能为空") + private Integer isDefaultUse; + + @Schema(description = "父级ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23674") + @NotNull(message = "父级ID不能为空") + private Long parentId; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "名称不能为空") + private String name; + + @Schema(description = "关键值", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "关键值不能为空") + private String key; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSamplePageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSamplePageReqVO.java new file mode 100644 index 0000000..108d289 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSamplePageReqVO.java @@ -0,0 +1,56 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 子样配置分页 Request VO") +@Data +public class ConfigSubSamplePageReqVO extends PageParam { + + @Schema(description = "分样配置ID", example = "31445") + private Long configSubSampleParentId; + + @Schema(description = "样品类型ID", example = "2314") + private Long dictionarySampleTypeId; + + @Schema(description = "子样流程Key,样品流转流程key") + private String flowKey; + + @Schema(description = "简码规则") + private String simpleCodeRule; + + @Schema(description = "编码规则") + private String codeRule; + + @Schema(description = "是否打印") + private Integer isPrint; + + @Schema(description = "复检节点") + private String recheckFlowCode; + + @Schema(description = "样品名称", example = "王五") + private String sampleName; + + @Schema(description = "样品保存天数") + private Integer sampleSaveDay; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentPageReqVO.java new file mode 100644 index 0000000..a4f1637 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentPageReqVO.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 分样配置分页 Request VO") +@Data +public class ConfigSubSampleParentPageReqVO extends PageParam { + + @Schema(description = "主样配置ID", example = "7978") + private Long configBaseSampleId; + + @Schema(description = "样品类型ID", example = "7486") + private Long dictionarySampleTypeId; + + @Schema(description = "样品名称", example = "芋艿") + private String sampleName; + + @Schema(description = "是否默认启用") + private Integer isDefaultEnabled; + + @Schema(description = "审核方式,多个流程用|分隔") + private Integer auditWay; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentRespVO.java new file mode 100644 index 0000000..098e2c0 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentRespVO.java @@ -0,0 +1,55 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 分样配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigSubSampleParentRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13982") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7978") + @ExcelProperty("主样配置ID") + private Long configBaseSampleId; + + @Schema(description = "样品类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7486") + @ExcelProperty("样品类型ID") + private Long dictionarySampleTypeId; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "是否默认启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否默认启用") + private Integer isDefaultEnabled; + + @Schema(description = "审核方式,多个流程用|分隔") + @ExcelProperty("审核方式,多个流程用|分隔") + private Integer auditWay; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentSaveReqVO.java new file mode 100644 index 0000000..42ed3f4 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentSaveReqVO.java @@ -0,0 +1,45 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 分样配置新增/修改 Request VO") +@Data +public class ConfigSubSampleParentSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13982") + private Long id; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7978") + @NotNull(message = "主样配置ID不能为空") + private Long configBaseSampleId; + + @Schema(description = "样品类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7486") + @NotNull(message = "样品类型ID不能为空") + private Long dictionarySampleTypeId; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @Schema(description = "是否默认启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否默认启用不能为空") + private Integer isDefaultEnabled; + + @Schema(description = "审核方式,多个流程用|分隔") + private Integer auditWay; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "版本不能为空") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleRespVO.java new file mode 100644 index 0000000..178b111 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleRespVO.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 子样配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigSubSampleRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26637") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "分样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31445") + @ExcelProperty("分样配置ID") + private Long configSubSampleParentId; + + @Schema(description = "样品类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2314") + @ExcelProperty("样品类型ID") + private Long dictionarySampleTypeId; + + @Schema(description = "子样流程Key,样品流转流程key", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("子样流程Key,样品流转流程key") + private String flowKey; + + @Schema(description = "简码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("简码规则") + private String simpleCodeRule; + + @Schema(description = "编码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("编码规则") + private String codeRule; + + @Schema(description = "是否打印") + @ExcelProperty("是否打印") + private Integer isPrint; + + @Schema(description = "复检节点") + @ExcelProperty("复检节点") + private String recheckFlowCode; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "样品保存天数", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品保存天数") + private Integer sampleSaveDay; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleSaveReqVO.java new file mode 100644 index 0000000..fcfec0a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleSaveReqVO.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 子样配置新增/修改 Request VO") +@Data +public class ConfigSubSampleSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26637") + private Long id; + + @Schema(description = "分样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31445") + @NotNull(message = "分样配置ID不能为空") + private Long configSubSampleParentId; + + @Schema(description = "样品类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2314") + @NotNull(message = "样品类型ID不能为空") + private Long dictionarySampleTypeId; + + @Schema(description = "子样流程Key,样品流转流程key", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "子样流程Key,样品流转流程key不能为空") + private String flowKey; + + @Schema(description = "简码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "简码规则不能为空") + private String simpleCodeRule; + + @Schema(description = "编码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "编码规则不能为空") + private String codeRule; + + @Schema(description = "是否打印") + private Integer isPrint; + + @Schema(description = "复检节点") + private String recheckFlowCode; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @Schema(description = "样品保存天数", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "样品保存天数不能为空") + private Integer sampleSaveDay; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "版本不能为空") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationPageReqVO.java new file mode 100644 index 0000000..0367dd9 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationPageReqVO.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 样品库位信息分页 Request VO") +@Data +public class ConfigWarehouseLocationInfomationPageReqVO extends PageParam { + + @Schema(description = "样品库名称", example = "张三") + private String name; + + @Schema(description = "库位编号") + private String code; + + @Schema(description = "仓库编码") + private String warehouseCoding; + + @Schema(description = "样品容量") + private Integer capacity; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationRespVO.java new file mode 100644 index 0000000..62063b6 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationRespVO.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 样品库位信息 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigWarehouseLocationInfomationRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22903") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "样品库名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("样品库名称") + private String name; + + @Schema(description = "库位编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("库位编号") + private String code; + + @Schema(description = "仓库编码") + @ExcelProperty("仓库编码") + private String warehouseCoding; + + @Schema(description = "样品容量", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品容量") + private Integer capacity; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationSaveReqVO.java new file mode 100644 index 0000000..a76655d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationSaveReqVO.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 样品库位信息新增/修改 Request VO") +@Data +public class ConfigWarehouseLocationInfomationSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22903") + private Long id; + + @Schema(description = "样品库名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "样品库名称不能为空") + private String name; + + @Schema(description = "库位编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "库位编号不能为空") + private String code; + + @Schema(description = "仓库编码") + private String warehouseCoding; + + @Schema(description = "样品容量", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "样品容量不能为空") + private Integer capacity; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/GenReportBody.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/GenReportBody.java new file mode 100644 index 0000000..d4754d2 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/GenReportBody.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +public class GenReportBody implements Serializable { + + private static final long serialVersionUID = 3042726851214984721L; + + @Schema(description = "报表id") + private Long reportId; + + @Schema(description = "报表key") + private String reportKey; + + @Schema(description = "报表数据url") + private String dataUrl; + + @Schema(description = "接口是否加密") + private Boolean isCrypto; + + @Schema(description = "报表类型:XLS|TXT|HTM|RTF|PDF|CSV|IMG") + private String type; + + @Schema(description = "只有当报表类型为IMG时可用,图片类型:PNG|BMP|JPEG|TIFF") + private String imgType; + + @Schema(description = "生成图片的DPI。对应打印机的DPI(Dots Per Inch,每英寸点数)是指打印机在每英寸内能够打印的墨点数量‌。DPI值越高,打印出的图像细节越丰富、色彩过渡越自然,打印精度也越高。常用‌203/300/400/600 DPI‌‌,具体根据打印机设置,默认为203。") + private Integer imgDpi = 203; + + @Schema(description = "报表参数") + private Map reportParams; + + @Schema(description = "报表数据JSON格式") + private String reportDataJson; + + public Map getReportParams() { + if (reportParams == null) { + reportParams = new HashMap<>(); + } + return reportParams; + } + + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailPageReqVO.java new file mode 100644 index 0000000..840f8b0 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailPageReqVO.java @@ -0,0 +1,66 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import com.baomidou.mybatisplus.annotation.TableField; +import lombok.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 物料检测标准检测项目分页 Request VO") +@Data +public class MaterialAssayStandardDetailPageReqVO extends PageParam { + + @Schema(description = "物料检测标准ID", example = "30312") + private Long materialAssayStandardId; + + @Schema(description = "检测项目ID", example = "22587") + private Long dictionaryProjectId; + + @Schema(description = "检测项目编码") + private String dictionaryProjectCode; + + @Schema(description = "检测结果单位ID", example = "29303") + private Long unitId; + + @Schema(description = "检测结果单位") + private String unit; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", example = "1") + private String dataType; + + @Schema(description = "小数位") + private Integer decimalPosition; + + @Schema(description = "检测分类,【字典】【jy_assay_standard_category】化学;仪器;外检") + private String assayCategory; + + @Schema(description = "是否默认选择,委托时是否默认选择;1-是,0-否") + private Integer isDefaultPick; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + + //==================================扩展字段==================================== + @Schema(description = "检测标准id列表") + private List standardIdList; + + @Schema(description = "检测项名称") + private String dictionaryProjectName; + + @Schema(description = "数据类型") + private String dataTypeName; + + @Schema(description = "检测分类名称") + private String assayCategoryName; +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailRespVO.java new file mode 100644 index 0000000..06d4182 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailRespVO.java @@ -0,0 +1,78 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 物料检测标准检测项目 Response VO") +@Data +@ExcelIgnoreUnannotated +public class MaterialAssayStandardDetailRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2831") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "物料检测标准ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30312") + @ExcelProperty("物料检测标准ID") + private Long materialAssayStandardId; + + @Schema(description = "检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22587") + @ExcelProperty("检测项目ID") + private Long dictionaryProjectId; + + @Schema(description = "检测项目编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("检测项目编码") + private String dictionaryProjectCode; + + @Schema(description = "检测结果单位ID", example = "29303") + @ExcelProperty("检测结果单位ID") + private Long unitId; + + @Schema(description = "检测结果单位") + @ExcelProperty("检测结果单位") + private String unit; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间") + private String dataType; + + @Schema(description = "小数位") + @ExcelProperty("小数位") + private Integer decimalPosition; + + @Schema(description = "检测分类,【字典】【jy_assay_standard_category】化学;仪器;外检", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("检测分类,【字典】【jy_assay_standard_category】化学;仪器;外检") + private String assayCategory; + + @Schema(description = "是否默认选择,委托时是否默认选择;1-是,0-否", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否默认选择,委托时是否默认选择;1-是,0-否") + private Integer isDefaultPick; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + //==================================扩展字段==================================== + @Schema(description = "检测项名称") + private String dictionaryProjectName; + + @Schema(description = "检测项简称") + private String dictionaryProjectSimpleName; + + @Schema(description = "数据类型") + private String dataTypeName; + + @Schema(description = "检测分类名称") + private String assayCategoryName; +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailSaveReqVO.java new file mode 100644 index 0000000..561ed20 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailSaveReqVO.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import jakarta.validation.constraints.*; + +import java.util.List; + +@Schema(description = "管理后台 - 物料检测标准检测项目新增/修改 Request VO") +@Data +public class MaterialAssayStandardDetailSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2831") + private Long id; + + @Schema(description = "物料检测标准ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30312") + @NotNull(message = "物料检测标准ID不能为空") + private Long materialAssayStandardId; + + @Schema(description = "检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22587") + @NotNull(message = "检测项目ID不能为空") + private Long dictionaryProjectId; + + @Schema(description = "检测项目编码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "检测项目编码不能为空") + private String dictionaryProjectCode; + + @Schema(description = "检测结果单位ID", example = "29303") + private Long unitId; + + @Schema(description = "检测结果单位") + private String unit; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间不能为空") + private String dataType; + + @Schema(description = "小数位") + private Integer decimalPosition; + + @Schema(description = "检测分类,【字典】【jy_assay_standard_category】化学;仪器;外检", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "检测分类,【字典】【jy_assay_standard_category】化学;仪器;外检不能为空") + private String assayCategory; + + @Schema(description = "是否默认选择,委托时是否默认选择;1-是,0-否", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否默认选择,委托时是否默认选择;1-是,0-否不能为空") + private Integer isDefaultPick; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + //==================================扩展字段==================================== + + @Schema(description = "检测项名称") + private Long dictionaryProjectName; + + @Schema(description = "数据类型") + private String dataTypeName; + + @Schema(description = "检测分类名称") + private String assayCategoryName; +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodPageReqVO.java new file mode 100644 index 0000000..93ad818 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodPageReqVO.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 物料检测标准与方法分页 Request VO") +@Data +public class MaterialAssayStandardMethodPageReqVO extends PageParam { + + @Schema(description = "物料检测标准明细项ID", example = "27123") + private Long materialAssayStandardDetailId; + + @Schema(description = "检测方法配置ID", example = "32735") + private Long configAssayMethodId; + + @Schema(description = "是否默认,1-是,0-否") + private Integer isDefault; + + @Schema(description = "是否双杯分析,1-是,0-否") + private Integer isDualCup; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodRespVO.java new file mode 100644 index 0000000..5702f4c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodRespVO.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 物料检测标准与方法 Response VO") +@Data +@ExcelIgnoreUnannotated +public class MaterialAssayStandardMethodRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21965") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "物料检测标准明细项ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27123") + @ExcelProperty("物料检测标准明细项ID") + private Long materialAssayStandardDetailId; + + @Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32735") + @ExcelProperty("检测方法配置ID") + private Long configAssayMethodId; + + @Schema(description = "是否默认,1-是,0-否", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否默认,1-是,0-否") + private Integer isDefault; + + @Schema(description = "是否双杯分析,1-是,0-否") + @ExcelProperty("是否双杯分析,1-是,0-否") + private Integer isDualCup; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodSaveReqVO.java new file mode 100644 index 0000000..f0a75f4 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodSaveReqVO.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 物料检测标准与方法新增/修改 Request VO") +@Data +public class MaterialAssayStandardMethodSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21965") + private Long id; + + @Schema(description = "物料检测标准明细项ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27123") + @NotNull(message = "物料检测标准明细项ID不能为空") + private Long materialAssayStandardDetailId; + + @Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32735") + @NotNull(message = "检测方法配置ID不能为空") + private Long configAssayMethodId; + + @Schema(description = "是否默认,1-是,0-否", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否默认,1-是,0-否不能为空") + private Integer isDefault; + + @Schema(description = "是否双杯分析,1-是,0-否") + private Integer isDualCup; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardPageReqVO.java new file mode 100644 index 0000000..2315759 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardPageReqVO.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 物料检测标准分页 Request VO") +@Data +public class MaterialAssayStandardPageReqVO extends PageParam { + + @Schema(description = "样品大类ID", example = "1394") + private Long baseSampleId; + + @Schema(description = "物料ID", example = "32069") + private Long materialId; + + @Schema(description = "样品类型ID,字典表:【T_DIC_BSN】", example = "19879") + private Long dictionaryBusinessId; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + + + //=================样品大类属性==================== + @Schema(description = "大类名称") + private String sampleName; + + @Schema(description = "物料代码") + private String materialCode; + + @Schema(description = "物料名称") + private String materialName; + + @Schema(description = "样品类型_NAME") + private String dictionaryBusinessName; + + @Schema(description = "检测项目数量") + private Long detailCount; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardRespVO.java new file mode 100644 index 0000000..7c16031 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardRespVO.java @@ -0,0 +1,68 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import cn.iocoder.yudao.module.qms.core.aspect.annotation.Dict; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +import static cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant.DICT_ANNOTATION_KEY_TYPE_ID; + +@Schema(description = "管理后台 - 物料检测标准 Response VO") +@Data +@ExcelIgnoreUnannotated +public class MaterialAssayStandardRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23188") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "样品大类ID", example = "1394") + @ExcelProperty("样品大类ID") + private Long baseSampleId; + + @Schema(description = "物料ID", example = "32069") + @ExcelProperty("物料ID") + private Long materialId; + + @Schema(description = "样品类型ID,字典表:【T_DIC_BSN】", example = "19879") + @ExcelProperty("样品类型ID,字典表:【T_DIC_BSN】") + @Dict(dicCode = "sampleType", keyOrID = DICT_ANNOTATION_KEY_TYPE_ID) + private Long dictionaryBusinessId; + + @Schema(description = "所属部门") + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "检测项目明细") + private List detailList; + + //=================样品大类属性==================== + @Schema(description = "大类名称") + @ExcelProperty("大类名称") + private String sampleName; + + @Schema(description = "物料代码") + @ExcelProperty("物料代码") + private String materialCode; + + @Schema(description = "物料名称") + @ExcelProperty("物料名称") + private String materialName; + + + @Schema(description = "检测项目数量") + @ExcelProperty("检测项目数量") + private Long detailCount; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardSaveReqVO.java new file mode 100644 index 0000000..2f10167 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardSaveReqVO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 物料检测标准新增/修改 Request VO") +@Data +public class MaterialAssayStandardSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23188") + private Long id; + + @Schema(description = "样品大类ID", example = "1394") + private Long baseSampleId; + + @Schema(description = "物料ID", example = "32069") + private Long materialId; + + @Schema(description = "样品类型ID,字典表:【T_DIC_BSN】", example = "19879") + private Long dictionaryBusinessId; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + //=================样品大类属性==================== + @Schema(description = "大类名称") + private String sampleName; + + @Schema(description = "物料代码") + private String materialCode; + + @Schema(description = "物料名称") + private String materialName; + + @Schema(description = "检测项目数量") + private Long detailCount; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/BaseSampleDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/BaseSampleDO.java new file mode 100644 index 0000000..06c759c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/BaseSampleDO.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 样品大类管理 DO +* +* @author 后台管理 +*/ +@TableName("t_bse_smp") +@KeySequence("t_bse_smp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BaseSampleDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 大类名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 物料ID + */ + @TableField("MTRL_ID") + private Long materialId; + /** + * 物料代码 + */ + @TableField("MTRL_CD") + private String materialCode; + /** + * 物料名称 + */ + @TableField("MTRL_NAME") + private String materialName; + /** + * 样品类型_ID,字典表【T_DIC_BSN】结算样、委检样、抽查样 + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + + + //===================扩展字段=================== + //检测标准数量 + @TableField(exist = false) + private String assayStandardCount; + + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodDO.java new file mode 100644 index 0000000..a975c39 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodDO.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 检测方法配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_asy_mthd") +@KeySequence("t_cfg_asy_mthd_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigAssayMethodDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 方法库ID + */ + @TableField("MTHD_CFG_ID") + private Long methodConfigId; + /** + * 方法名称 + */ + @TableField("NAME") + private String name; + /** + * 方法编号 + */ + @TableField("MTHD_CD") + private String methodCode; + /** + * 描述 + */ + @TableField("DSP") + private String description; + /** + * 是否启用,1-启用,0-不启用 + */ + @TableField("IS_ENBD") + private Integer isEnabled; + /** + * 任务模版key + */ + @TableField("TMPL_KY") + private String templateKey; + /** + * 任务单编号规则 + */ + @TableField("CD_RUL") + private String codeRule; + /** + * 分配方式,【字典】【jy_assay_method_assign_way】随机分配,按顺序分配,自动分配 + */ + @TableField("ASN_WY") + private Integer assignWay; + /** + * 展示平台,【字典】【jy_assay_method_assign_platform】pad、pc、pad&pc + */ + @TableField("ASN_PLTF") + private String assignPlatform; + /** + * 任务分配表单配置信息,是否添加质控样;是否过筛;是否预览打印;是否查询S值范围;是否需要流程审批;流程审批编码;退回样品审批流程编码:任务完成时的提交方式;指派单抬头key + */ + @TableField("ASY_TSK_INF") + private String assayTaskInfomation; + /** + * 检测部门编号 + */ + @TableField("ASY_DEPT_CD") + private String assayDepartmentCode; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodProjectDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodProjectDO.java new file mode 100644 index 0000000..e8b21b5 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodProjectDO.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 检测方法分析项目配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_asy_mthd_prj") +@KeySequence("t_cfg_asy_mthd_prj_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigAssayMethodProjectDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 检测方法ID + */ + @TableField("CFG_ASY_MTHD_ID") + private Long configAssayMethodId; + /** + * 检测项目ID,字典表【T_DIC_PRJ】 + */ + @TableField("DIC_PRJ_ID") + private Long dictionaryProjectId; + /** + * 检测单位ID + */ + @TableField("UNT_ID") + private Long unitId; + /** + * 单位 + */ + @TableField("DIC_PRJ_UNT") + private String dictionaryProjectUnit; + /** + * 是否允许为空 + */ + @TableField("IS_NLL") + private Integer isNull; + /** + * 数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间 + */ + @TableField("DAT_TP") + private Integer dataType; + /** + * 小数位 + */ + @TableField("DEC") + private Integer decimal; + /** + * 计算公式 + */ + @TableField("FMU") + private String formula; + /** + * 判定精度 + */ + @TableField("ASMT_ACU") + private Integer assessmentAccuracy; + /** + * 是否默认启用,1-启用,0-不启用 + */ + @TableField("IS_DFT_ENBD") + private Integer isDefaultEnabled; + /** + * 排序 + */ + @TableField("SRT") + private Integer sort; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodProjectParameterDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodProjectParameterDO.java new file mode 100644 index 0000000..60b8e8e --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodProjectParameterDO.java @@ -0,0 +1,95 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 检测方法分析项目参数配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_asy_mthd_prj_prm") +@KeySequence("t_cfg_asy_mthd_prj_prm_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigAssayMethodProjectParameterDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 检测方法分析项目ID + */ + @TableField("CFG_ASY_MTHD_PRJ_ID") + private Long configAssayMethodProjectId; + /** + * 参数ID,字典表【T_DIC_PRM】 + */ + @TableField("DIC_PRM_ID") + private Long dictionaryParameterId; + /** + * 数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间 + */ + @TableField("DAT_TP") + private Integer dataType; + /** + * 小数位 + */ + @TableField("DEC") + private Integer decimal; + /** + * 默认值 + */ + @TableField("DFT_VAL") + private String defaultValue; + /** + * 是否允许为空 + */ + @TableField("IS_NLL") + private Integer isNull; + /** + * 计算公式 + */ + @TableField("FMU") + private String formula; + /** + * pc界面是否显示 + */ + @TableField("IS_SHW") + private Integer isShow; + /** + * 排序 + */ + @TableField("SRT") + private Integer sort; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigBaseSampleDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigBaseSampleDO.java new file mode 100644 index 0000000..dbc4dbb --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigBaseSampleDO.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 主样配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_bse_smp") +@KeySequence("t_cfg_bse_smp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigBaseSampleDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品ID + */ + @TableField("BSE_SMP_ID") + private Long baseSampleId; + /** + * 父级ID + */ + @TableField("PRN_ID") + private Long parentId; + /** + * 编码规则 + */ + @TableField("CD_RUL") + private String codeRule; + /** + * 样品流程Key + */ + @TableField("FLW_KY") + private String flowKey; + /** + * 样品标签打印模版 + */ + @TableField("PRNT_TMPL") + private String printTemplate; + /** + * 样品标签打印份数 + */ + @TableField("CD_PRNT_QTY") + private byte[] codePrintQuantity; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigDocumentTypeDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigDocumentTypeDO.java new file mode 100644 index 0000000..ae93890 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigDocumentTypeDO.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 报告类型配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_doc_tp") +@KeySequence("t_cfg_doc_tp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigDocumentTypeDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 报表类型ID + */ + @TableField("CFG_RPT_TP_ID") + private Long configReportTypeId; + /** + * 类型名称 + */ + @TableField("NAME") + private String name; + /** + * 流程模型key + */ + @TableField("FLW_MDL_KY") + private String flowModelKey; + /** + * 流程表单key + */ + @TableField("FLW_FORM_KY") + private String flowFormKey; + /** + * 报告模板key + */ + @TableField("RPT_KY") + private String reportKey; + /** + * 报告编号规则 + */ + @TableField("CD_RUL") + private String codeRule; + /** + * 报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告 + */ + @TableField("TP") + private String type; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigEntrustSourceDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigEntrustSourceDO.java new file mode 100644 index 0000000..9cb0a6a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigEntrustSourceDO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 检验委托来源配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_entt_src") +@KeySequence("t_cfg_entt_src_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigEntrustSourceDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 名称,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托 + */ + @TableField("NAME") + private String name; + /** + * 模版Key + */ + @TableField("KY") + private String key; + /** + * 数据集ID,T_DAT_COLT_FLD + */ + @TableField("DAT_COLT_ID") + private Long dataCollectionId; + /** + * 委托单模版 + */ + @TableField("TMPL") + private String template; + /** + * 委托单号规则 + */ + @TableField("CD_RUL") + private String codeRule; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigProjectDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigProjectDO.java new file mode 100644 index 0000000..b5d555a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigProjectDO.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 检测项目配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_prj") +@KeySequence("t_cfg_prj_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigProjectDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 检测项目ID + */ + @TableField("DIC_PRJ_ID") + private Long dictionaryProjectId; + /** + * 检测方法配置ID + */ + @TableField("CFG_ASY_MTHD_ID") + private Long configAssayMethodId; + /** + * 上报列字段 + */ + @TableField("SVE_COLN") + private String saveColumn; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportFieldDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportFieldDO.java new file mode 100644 index 0000000..2603171 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportFieldDO.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 报表字段配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_rpt_fld") +@KeySequence("t_cfg_rpt_fld_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigReportFieldDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 报表类型ID + */ + @TableField("CFG_RPT_TP_ID") + private Long configReportTypeId; + /** + * 绑定字段 + */ + @TableField("FLD") + private String field; + /** + * 标题名称 + */ + @TableField("FLD_NAME") + private String fieldName; + /** + * 排序号 + */ + @TableField("NO") + private Integer no; + /** + * 数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间 + */ + @TableField("DAT_TP") + private Integer dataType; + /** + * 小数位 + */ + @TableField("DEC") + private Integer decimal; + /** + * 列宽 + */ + @TableField("FLD_WDTH") + private Integer fieldWidth; + /** + * 是否分组 + */ + @TableField("IS_GRP") + private Integer isGroup; + /** + * 是否可修改 + */ + @TableField("IS_UPD") + private Integer isUpdate; + /** + * 计算公式 + */ + @TableField("FMU") + private String formula; + /** + * 表头分组 + */ + @TableField("TTL_GRP") + private String titleGroup; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注,1-是,0-否 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportTemplateDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportTemplateDO.java new file mode 100644 index 0000000..af18c70 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportTemplateDO.java @@ -0,0 +1,73 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 报表模版配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_rpt_tmpl") +@KeySequence("t_cfg_rpt_tmpl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigReportTemplateDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 模版名称 + */ + @TableField("NAME") + private String name; + /** + * 模版Key + */ + @TableField("KY") + private String key; + /** + * 内容 + */ + @TableField("CNTT") + private String content; + /** + * 数据接口地址 + */ + @TableField("DAT_URL") + private String dataUrl; + /** + * 数据 + */ + @TableField("DAT") + private String data; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @Version + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportTypeDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportTypeDO.java new file mode 100644 index 0000000..1d7639a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportTypeDO.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 报表类型配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_rpt_tp") +@KeySequence("t_cfg_rpt_tp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigReportTypeDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 报表名称 + */ + @TableField("NAME") + private String name; + /** + * 键值 + */ + @TableField("KY") + private String key; + /** + * 报表模版 + */ + @TableField("TMPL") + private String template; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleFlowDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleFlowDO.java new file mode 100644 index 0000000..f147bd7 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleFlowDO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 样品流程配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_smp_flw") +@KeySequence("t_cfg_smp_flw_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigSampleFlowDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 流程名称 + */ + @TableField("NAME") + private String name; + /** + * 流程Key + */ + @TableField("KY") + private String key; + /** + * 流程配置内容JSON + */ + @TableField("CNTT") + private String content; + /** + * 流程描述 + */ + @TableField("DSP") + private String description; + /** + * 类型,主样、子样 + */ + @TableField("TP") + private String type; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleReportDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleReportDO.java new file mode 100644 index 0000000..ba00404 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleReportDO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 样品报表关系 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_smp_rpt") +@KeySequence("t_cfg_smp_rpt_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigSampleReportDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 报表类型 + */ + @TableField("CFG_RPT_TP_ID") + private Long configReportTypeId; + /** + * 主样配置ID + */ + @TableField("CFG_BSE_SMP_ID") + private Long configBaseSampleId; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 数据来源 + */ + @TableField("DAT_SRC") + private String dataSource; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSimpleFlowCodeDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSimpleFlowCodeDO.java new file mode 100644 index 0000000..fc8866e --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSimpleFlowCodeDO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* LiteFlow脚本配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_smpl_flw_cd") +@KeySequence("t_cfg_smpl_flw_cd_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigSimpleFlowCodeDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 脚本序号 + */ + @TableField("CD_NO") + private String codeNo; + /** + * 脚本名称 + */ + @TableField("CD_NAME") + private String codeName; + /** + * 脚本数据 + */ + @TableField("CD_DAT") + private String codeData; + /** + * 脚本类型,【字典】【jy_simple_flow_code_type】普通脚本、选择脚本、条件脚本、数量循环、条件循环、退出循环节 + */ + @TableField("CD_TP") + private String codeType; + /** + * 脚本语言,【字典】【jy_simple_flow_code_language】Java,Groovy,QLExpress + */ + @TableField("CD_LANG") + private String codeLanguage; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSimpleFlowRuleDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSimpleFlowRuleDO.java new file mode 100644 index 0000000..37fce0d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSimpleFlowRuleDO.java @@ -0,0 +1,75 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* LiteFlow规则配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_smpl_flw_rul") +@KeySequence("t_cfg_smpl_flw_rul_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigSimpleFlowRuleDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 名称 + */ + @TableField("NAME") + private String name; + /** + * 描述 + */ + @TableField("DSP") + private String description; + /** + * EL表达式 + */ + @TableField("DAT") + private String data; + /** + * 路由 + */ + @TableField("RUT") + private String route; + /** + * 组 + */ + @TableField("GRP_NAME") + private String groupName; + /** + * 流程图 + */ + @TableField("FLW") + private String flow; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigStandardSampleProjectDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigStandardSampleProjectDO.java new file mode 100644 index 0000000..2f04945 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigStandardSampleProjectDO.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 标准样检测项目配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_std_smp_prj") +@KeySequence("t_cfg_std_smp_prj_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigStandardSampleProjectDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 标准样类型ID + */ + @TableField("CFG_STD_SMP_TP_ID") + private Long configStandardSampleTypeId; + /** + * 检测项目ID + */ + @TableField("DIC_PRJ_ID") + private Long dictionaryProjectId; + /** + * 检测项目名称 + */ + @TableField("DIC_PRJ_NAME") + private String dictionaryProjectName; + /** + * 检测单位ID,UNT表 + */ + @TableField("UNT_ID") + private Long unitId; + /** + * 检测项目单位 + */ + @TableField("DIC_PRJ_UNT") + private String dictionaryProjectUnit; + /** + * 小数精度 + */ + @TableField("ACU") + private Integer accuracy; + /** + * 排序号 + */ + @TableField("SRT") + private String sort; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigStandardSampleTypeDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigStandardSampleTypeDO.java new file mode 100644 index 0000000..f575db5 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigStandardSampleTypeDO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 标准样类型配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_std_smp_tp") +@KeySequence("t_cfg_std_smp_tp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigStandardSampleTypeDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 主样配置ID + */ + @TableField("CFG_BSE_SMP_ID") + private Long configBaseSampleId; + /** + * 标准样类型名称 + */ + @TableField("NAME") + private String name; + /** + * 编码规则 + */ + @TableField("CD_RUL") + private String codeRule; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 化验部门编号 + */ + @TableField("ASY_DEPT_CD") + private String assayDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleDO.java new file mode 100644 index 0000000..6ae01f3 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleDO.java @@ -0,0 +1,95 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 子样配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_sb_smp") +@KeySequence("t_cfg_sb_smp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigSubSampleDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 分样配置ID + */ + @TableField("CFG_SB_SMP_PRN_ID") + private Long configSubSampleParentId; + /** + * 样品类型ID + */ + @TableField("DIC_SMP_TP_ID") + private Long dictionarySampleTypeId; + /** + * 子样流程Key,样品流转流程key + */ + @TableField("FLW_KY") + private String flowKey; + /** + * 简码规则 + */ + @TableField("SMPL_CD_RUL") + private String simpleCodeRule; + /** + * 编码规则 + */ + @TableField("CD_RUL") + private String codeRule; + /** + * 是否打印 + */ + @TableField("IS_PRNT") + private Integer isPrint; + /** + * 复检节点 + */ + @TableField("RCHK_FLW_CD") + private String recheckFlowCode; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 样品保存天数 + */ + @TableField("SMP_SVE_DY") + private Integer sampleSaveDay; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleMethodDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleMethodDO.java new file mode 100644 index 0000000..683a029 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleMethodDO.java @@ -0,0 +1,75 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 子样与检测方法配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_sb_smp_mthd") +@KeySequence("t_cfg_sb_smp_mthd_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigSubSampleMethodDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 子样配置ID + */ + @TableField("CFG_SB_SMP_ID") + private Long configSubSampleId; + /** + * 分析方法ID + */ + @TableField("CFG_ASY_MTHD_ID") + private Long configAssayMethodId; + /** + * 是否默认使用,1-启用,0-不启用 + */ + @TableField("IS_DFT_USE") + private Integer isDefaultUse; + /** + * 父级ID + */ + @TableField("PRN_ID") + private Long parentId; + /** + * 名称 + */ + @TableField("NAME") + private String name; + /** + * 关键值 + */ + @TableField("KY") + private String key; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleParentDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleParentDO.java new file mode 100644 index 0000000..071b7bb --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleParentDO.java @@ -0,0 +1,75 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 分样配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_sb_smp_prn") +@KeySequence("t_cfg_sb_smp_prn_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigSubSampleParentDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 主样配置ID + */ + @TableField("CFG_BSE_SMP_ID") + private Long configBaseSampleId; + /** + * 样品类型ID + */ + @TableField("DIC_SMP_TP_ID") + private Long dictionarySampleTypeId; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 是否默认启用 + */ + @TableField("IS_DFT_ENBD") + private Integer isDefaultEnabled; + /** + * 审核方式,多个流程用|分隔 + */ + @TableField("AUD_WY") + private Integer auditWay; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigWarehouseLocationInfomationDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigWarehouseLocationInfomationDO.java new file mode 100644 index 0000000..51978f9 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigWarehouseLocationInfomationDO.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 样品库位信息 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_wrh_loc_inf") +@KeySequence("t_cfg_wrh_loc_inf_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigWarehouseLocationInfomationDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品库名称 + */ + @TableField("NAME") + private String name; + /** + * 库位编号 + */ + @TableField("CD") + private String code; + /** + * 仓库编码 + */ + @TableField("WRH_CDG") + private String warehouseCoding; + /** + * 样品容量 + */ + @TableField("CPY") + private Integer capacity; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDO.java new file mode 100644 index 0000000..2338d7c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDO.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 物料检测标准 DO +* +* @author 后台管理 +*/ +@TableName("t_mtrl_asy_std") +@KeySequence("t_mtrl_asy_std_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class MaterialAssayStandardDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品大类ID + */ + @TableField("BSE_SMP_ID") + private Long baseSampleId; + /** + * 物料ID + */ + @TableField("MTRL_ID") + private Long materialId; + /** + * 样品类型ID,字典表:【T_DIC_BSN】 + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDetailDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDetailDO.java new file mode 100644 index 0000000..bc9214e --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDetailDO.java @@ -0,0 +1,90 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 物料检测标准检测项目 DO +* +* @author 后台管理 +*/ +@TableName("t_mtrl_asy_std_dtl") +@KeySequence("t_mtrl_asy_std_dtl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class MaterialAssayStandardDetailDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 物料检测标准ID + */ + @TableField("MTRL_ASY_STD_ID") + private Long materialAssayStandardId; + /** + * 检测项目ID + */ + @TableField("DIC_PRJ_ID") + private Long dictionaryProjectId; + /** + * 检测项目编码 + */ + @TableField("DIC_PRJ_CD") + private String dictionaryProjectCode; + /** + * 检测结果单位ID + */ + @TableField("UNT_ID") + private Long unitId; + /** + * 检测结果单位 + */ + @TableField("UNT") + private String unit; + /** + * 数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间 + */ + @TableField("DAT_TP") + private String dataType; + /** + * 小数位 + */ + @TableField("DEC_POS") + private Integer decimalPosition; + /** + * 检测分类,【字典】【jy_assay_standard_category】化学;仪器;外检 + */ + @TableField("ASY_CTGR") + private String assayCategory; + /** + * 是否默认选择,委托时是否默认选择;1-是,0-否 + */ + @TableField("IS_DFT_PCK") + private Integer isDefaultPick; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + + + + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDetailExtendDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDetailExtendDO.java new file mode 100644 index 0000000..e2c18f9 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDetailExtendDO.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import com.baomidou.mybatisplus.annotation.TableField; +import lombok.*; + +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@NoArgsConstructor +@AllArgsConstructor +public class MaterialAssayStandardDetailExtendDO extends MaterialAssayStandardDetailDO { + + //==================================扩展字段==================================== + //检测项名称 +// @TableField(value = "DIC_PRJ_NAME", select = false) + private String dictionaryProjectName; + private String dictionaryProjectSimpleName; + + //数据类型 +// @TableField(value = "DATA_TYPE_NAME", select = false) + private String dataTypeName; + + //检测分类名称 +// @TableField(value = "ASY_CTGR_NAME", select = false) + private String assayCategoryName; + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardExtendDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardExtendDO.java new file mode 100644 index 0000000..b6a3c06 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardExtendDO.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import com.baomidou.mybatisplus.annotation.TableField; +import lombok.*; + +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@NoArgsConstructor +@AllArgsConstructor +public class MaterialAssayStandardExtendDO extends MaterialAssayStandardDO{ + //=================样品大类属性==================== + /** + * 大类名称 + */ + private String sampleName; + /** + * 物料代码 + */ + private String materialCode; + /** + * 物料名称 + */ + private String materialName; + /** + * 样品类型_ID,字典表【T_DIC_BSN】结算样、委检样、抽查样 + */ + private Long dictionaryBusinessId; + /** + * 检测项目数量 + */ + private Long detailCount; +} + diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardMethodDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardMethodDO.java new file mode 100644 index 0000000..f94449b --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardMethodDO.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 物料检测标准与方法 DO +* +* @author 后台管理 +*/ +@TableName("t_mtrl_asy_std_mthd") +@KeySequence("t_mtrl_asy_std_mthd_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class MaterialAssayStandardMethodDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 物料检测标准明细项ID + */ + @TableField("MTRL_ASY_STD_DTL_ID") + private Long materialAssayStandardDetailId; + /** + * 检测方法配置ID + */ + @TableField("CFG_ASY_MTHD_ID") + private Long configAssayMethodId; + /** + * 是否默认,1-是,0-否 + */ + @TableField("IS_DFT") + private Integer isDefault; + /** + * 是否双杯分析,1-是,0-否 + */ + @TableField("IS_DUAL_CP") + private Integer isDualCup; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/BaseSampleMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/BaseSampleMapper.java new file mode 100644 index 0000000..30d4857 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/BaseSampleMapper.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSamplePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.BaseSampleDO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 样品大类管理 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BaseSampleMapper extends BaseMapperX { + + default PageResult selectPage(BaseSamplePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(BaseSampleDO::getSampleName, reqVO.getSampleName()) + .eqIfPresent(BaseSampleDO::getMaterialId, reqVO.getMaterialId()) + .eqIfPresent(BaseSampleDO::getMaterialCode, reqVO.getMaterialCode()) + .likeIfPresent(BaseSampleDO::getMaterialName, reqVO.getMaterialName()) + .eqIfPresent(BaseSampleDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId()) + .eqIfPresent(BaseSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(BaseSampleDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BaseSampleDO::getRemark, reqVO.getRemark()) + .orderByDesc(BaseSampleDO::getId)); + } + + List getBaseSampleListWithAssayStandardCount(); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodMapper.java new file mode 100644 index 0000000..022def5 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodMapper.java @@ -0,0 +1,40 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 检测方法配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigAssayMethodMapper extends BaseMapperX { + + default PageResult selectPage(ConfigAssayMethodPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigAssayMethodDO::getMethodConfigId, reqVO.getMethodConfigId()) + .likeIfPresent(ConfigAssayMethodDO::getName, reqVO.getName()) + .eqIfPresent(ConfigAssayMethodDO::getMethodCode, reqVO.getMethodCode()) + .eqIfPresent(ConfigAssayMethodDO::getDescription, reqVO.getDescription()) + .eqIfPresent(ConfigAssayMethodDO::getIsEnabled, reqVO.getIsEnabled()) + .eqIfPresent(ConfigAssayMethodDO::getTemplateKey, reqVO.getTemplateKey()) + .eqIfPresent(ConfigAssayMethodDO::getCodeRule, reqVO.getCodeRule()) + .eqIfPresent(ConfigAssayMethodDO::getAssignWay, reqVO.getAssignWay()) + .eqIfPresent(ConfigAssayMethodDO::getAssignPlatform, reqVO.getAssignPlatform()) + .eqIfPresent(ConfigAssayMethodDO::getAssayTaskInfomation, reqVO.getAssayTaskInfomation()) + .eqIfPresent(ConfigAssayMethodDO::getAssayDepartmentCode, reqVO.getAssayDepartmentCode()) + .eqIfPresent(ConfigAssayMethodDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigAssayMethodDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigAssayMethodDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigAssayMethodDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigAssayMethodDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectMapper.java new file mode 100644 index 0000000..26f9dd0 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectMapper.java @@ -0,0 +1,40 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 检测方法分析项目配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigAssayMethodProjectMapper extends BaseMapperX { + + default PageResult selectPage(ConfigAssayMethodProjectPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigAssayMethodProjectDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId()) + .eqIfPresent(ConfigAssayMethodProjectDO::getDictionaryProjectId, reqVO.getDictionaryProjectId()) + .eqIfPresent(ConfigAssayMethodProjectDO::getUnitId, reqVO.getUnitId()) + .eqIfPresent(ConfigAssayMethodProjectDO::getDictionaryProjectUnit, reqVO.getDictionaryProjectUnit()) + .eqIfPresent(ConfigAssayMethodProjectDO::getIsNull, reqVO.getIsNull()) + .eqIfPresent(ConfigAssayMethodProjectDO::getDataType, reqVO.getDataType()) + .eqIfPresent(ConfigAssayMethodProjectDO::getDecimal, reqVO.getDecimal()) + .eqIfPresent(ConfigAssayMethodProjectDO::getFormula, reqVO.getFormula()) + .eqIfPresent(ConfigAssayMethodProjectDO::getAssessmentAccuracy, reqVO.getAssessmentAccuracy()) + .eqIfPresent(ConfigAssayMethodProjectDO::getIsDefaultEnabled, reqVO.getIsDefaultEnabled()) + .eqIfPresent(ConfigAssayMethodProjectDO::getSort, reqVO.getSort()) + .eqIfPresent(ConfigAssayMethodProjectDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigAssayMethodProjectDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigAssayMethodProjectDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigAssayMethodProjectDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigAssayMethodProjectDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectParameterMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectParameterMapper.java new file mode 100644 index 0000000..f2b9a01 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectParameterMapper.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 检测方法分析项目参数配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigAssayMethodProjectParameterMapper extends BaseMapperX { + + default PageResult selectPage(ConfigAssayMethodProjectParameterPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigAssayMethodProjectParameterDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId()) + .eqIfPresent(ConfigAssayMethodProjectParameterDO::getDictionaryParameterId, reqVO.getDictionaryParameterId()) + .eqIfPresent(ConfigAssayMethodProjectParameterDO::getDataType, reqVO.getDataType()) + .eqIfPresent(ConfigAssayMethodProjectParameterDO::getDecimal, reqVO.getDecimal()) + .eqIfPresent(ConfigAssayMethodProjectParameterDO::getDefaultValue, reqVO.getDefaultValue()) + .eqIfPresent(ConfigAssayMethodProjectParameterDO::getIsNull, reqVO.getIsNull()) + .eqIfPresent(ConfigAssayMethodProjectParameterDO::getFormula, reqVO.getFormula()) + .eqIfPresent(ConfigAssayMethodProjectParameterDO::getIsShow, reqVO.getIsShow()) + .eqIfPresent(ConfigAssayMethodProjectParameterDO::getSort, reqVO.getSort()) + .eqIfPresent(ConfigAssayMethodProjectParameterDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigAssayMethodProjectParameterDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigAssayMethodProjectParameterDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigAssayMethodProjectParameterDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigAssayMethodProjectParameterDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigBaseSampleMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigBaseSampleMapper.java new file mode 100644 index 0000000..684677c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigBaseSampleMapper.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigBaseSampleDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 主样配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigBaseSampleMapper extends BaseMapperX { + + default PageResult selectPage(ConfigBaseSamplePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigBaseSampleDO::getBaseSampleId, reqVO.getBaseSampleId()) + .eqIfPresent(ConfigBaseSampleDO::getParentId, reqVO.getParentId()) + .eqIfPresent(ConfigBaseSampleDO::getCodeRule, reqVO.getCodeRule()) + .eqIfPresent(ConfigBaseSampleDO::getFlowKey, reqVO.getFlowKey()) + .eqIfPresent(ConfigBaseSampleDO::getPrintTemplate, reqVO.getPrintTemplate()) + .eqIfPresent(ConfigBaseSampleDO::getCodePrintQuantity, reqVO.getCodePrintQuantity()) + .likeIfPresent(ConfigBaseSampleDO::getSampleName, reqVO.getSampleName()) + .eqIfPresent(ConfigBaseSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigBaseSampleDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigBaseSampleDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigBaseSampleDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigBaseSampleDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigDocumentTypeMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigDocumentTypeMapper.java new file mode 100644 index 0000000..7ee9a23 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigDocumentTypeMapper.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigDocumentTypeDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 报告类型配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigDocumentTypeMapper extends BaseMapperX { + + default PageResult selectPage(ConfigDocumentTypePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigDocumentTypeDO::getConfigReportTypeId, reqVO.getConfigReportTypeId()) + .likeIfPresent(ConfigDocumentTypeDO::getName, reqVO.getName()) + .eqIfPresent(ConfigDocumentTypeDO::getFlowModelKey, reqVO.getFlowModelKey()) + .eqIfPresent(ConfigDocumentTypeDO::getFlowFormKey, reqVO.getFlowFormKey()) + .eqIfPresent(ConfigDocumentTypeDO::getReportKey, reqVO.getReportKey()) + .eqIfPresent(ConfigDocumentTypeDO::getCodeRule, reqVO.getCodeRule()) + .eqIfPresent(ConfigDocumentTypeDO::getType, reqVO.getType()) + .eqIfPresent(ConfigDocumentTypeDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigDocumentTypeDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigDocumentTypeDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigDocumentTypeDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigDocumentTypeDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.java new file mode 100644 index 0000000..f2eeba6 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigEntrustSourceDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 检验委托来源配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigEntrustSourceMapper extends BaseMapperX { + + default PageResult selectPage(ConfigEntrustSourcePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(ConfigEntrustSourceDO::getName, reqVO.getName()) + .eqIfPresent(ConfigEntrustSourceDO::getKey, reqVO.getKey()) + .eqIfPresent(ConfigEntrustSourceDO::getDataCollectionId, reqVO.getDataCollectionId()) + .eqIfPresent(ConfigEntrustSourceDO::getTemplate, reqVO.getTemplate()) + .eqIfPresent(ConfigEntrustSourceDO::getCodeRule, reqVO.getCodeRule()) + .eqIfPresent(ConfigEntrustSourceDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigEntrustSourceDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigEntrustSourceDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigEntrustSourceDO::getId)); + } + + default List selectList(ConfigEntrustSourceReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .likeIfPresent(ConfigEntrustSourceDO::getName, reqVO.getName()) + .eqIfPresent(ConfigEntrustSourceDO::getKey, reqVO.getKey()) + .eqIfPresent(ConfigEntrustSourceDO::getDataCollectionId, reqVO.getDataCollectionId()) + .eqIfPresent(ConfigEntrustSourceDO::getTemplate, reqVO.getTemplate()) + .eqIfPresent(ConfigEntrustSourceDO::getCodeRule, reqVO.getCodeRule()) + .eqIfPresent(ConfigEntrustSourceDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigEntrustSourceDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigEntrustSourceDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigEntrustSourceDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigProjectMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigProjectMapper.java new file mode 100644 index 0000000..45f2c14 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigProjectMapper.java @@ -0,0 +1,31 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigProjectDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 检测项目配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigProjectMapper extends BaseMapperX { + + default PageResult selectPage(ConfigProjectPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigProjectDO::getDictionaryProjectId, reqVO.getDictionaryProjectId()) + .eqIfPresent(ConfigProjectDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId()) + .eqIfPresent(ConfigProjectDO::getSaveColumn, reqVO.getSaveColumn()) + .eqIfPresent(ConfigProjectDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigProjectDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigProjectDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigProjectDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportFieldMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportFieldMapper.java new file mode 100644 index 0000000..e8acbc1 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportFieldMapper.java @@ -0,0 +1,40 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportFieldDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 报表字段配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigReportFieldMapper extends BaseMapperX { + + default PageResult selectPage(ConfigReportFieldPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigReportFieldDO::getConfigReportTypeId, reqVO.getConfigReportTypeId()) + .eqIfPresent(ConfigReportFieldDO::getField, reqVO.getField()) + .likeIfPresent(ConfigReportFieldDO::getFieldName, reqVO.getFieldName()) + .eqIfPresent(ConfigReportFieldDO::getNo, reqVO.getNo()) + .eqIfPresent(ConfigReportFieldDO::getDataType, reqVO.getDataType()) + .eqIfPresent(ConfigReportFieldDO::getDecimal, reqVO.getDecimal()) + .eqIfPresent(ConfigReportFieldDO::getFieldWidth, reqVO.getFieldWidth()) + .eqIfPresent(ConfigReportFieldDO::getIsGroup, reqVO.getIsGroup()) + .betweenIfPresent(ConfigReportFieldDO::getIsUpdate, reqVO.getIsUpdate()) + .eqIfPresent(ConfigReportFieldDO::getFormula, reqVO.getFormula()) + .eqIfPresent(ConfigReportFieldDO::getTitleGroup, reqVO.getTitleGroup()) + .eqIfPresent(ConfigReportFieldDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigReportFieldDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigReportFieldDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigReportFieldDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigReportFieldDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTemplateMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTemplateMapper.java new file mode 100644 index 0000000..4af69e0 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTemplateMapper.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigReportTemplatePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportTemplateDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 报表模版配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigReportTemplateMapper extends BaseMapperX { + + default PageResult selectPage(ConfigReportTemplatePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(ConfigReportTemplateDO::getName, reqVO.getName()) + .eqIfPresent(ConfigReportTemplateDO::getKey, reqVO.getKey()) + .eqIfPresent(ConfigReportTemplateDO::getContent, reqVO.getContent()) + .eqIfPresent(ConfigReportTemplateDO::getDataUrl, reqVO.getDataUrl()) + .eqIfPresent(ConfigReportTemplateDO::getData, reqVO.getData()) + .eqIfPresent(ConfigReportTemplateDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigReportTemplateDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigReportTemplateDO::getUpdateCount, reqVO.getUpdateCount()) + .eqIfPresent(ConfigReportTemplateDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigReportTemplateDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTypeMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTypeMapper.java new file mode 100644 index 0000000..a8fa269 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTypeMapper.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportTypeDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 报表类型配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigReportTypeMapper extends BaseMapperX { + + default PageResult selectPage(ConfigReportTypePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(ConfigReportTypeDO::getName, reqVO.getName()) + .eqIfPresent(ConfigReportTypeDO::getKey, reqVO.getKey()) + .eqIfPresent(ConfigReportTypeDO::getTemplate, reqVO.getTemplate()) + .eqIfPresent(ConfigReportTypeDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigReportTypeDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigReportTypeDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigReportTypeDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigReportTypeDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleFlowMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleFlowMapper.java new file mode 100644 index 0000000..c60bfae --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleFlowMapper.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleFlowDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 样品流程配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigSampleFlowMapper extends BaseMapperX { + + default PageResult selectPage(ConfigSampleFlowPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(ConfigSampleFlowDO::getName, reqVO.getName()) + .eqIfPresent(ConfigSampleFlowDO::getKey, reqVO.getKey()) + .eqIfPresent(ConfigSampleFlowDO::getContent, reqVO.getContent()) + .eqIfPresent(ConfigSampleFlowDO::getDescription, reqVO.getDescription()) + .eqIfPresent(ConfigSampleFlowDO::getType, reqVO.getType()) + .eqIfPresent(ConfigSampleFlowDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSampleFlowDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSampleFlowDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigSampleFlowDO::getId)); + } + + default ConfigSampleFlowDO selectByKey(String key) { + return selectOne(new LambdaQueryWrapperX() + .eq(ConfigSampleFlowDO::getKey, key)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleReportMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleReportMapper.java new file mode 100644 index 0000000..e741346 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleReportMapper.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleReportDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 样品报表关系 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigSampleReportMapper extends BaseMapperX { + + default PageResult selectPage(ConfigSampleReportPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigSampleReportDO::getConfigReportTypeId, reqVO.getConfigReportTypeId()) + .eqIfPresent(ConfigSampleReportDO::getConfigBaseSampleId, reqVO.getConfigBaseSampleId()) + .likeIfPresent(ConfigSampleReportDO::getSampleName, reqVO.getSampleName()) + .eqIfPresent(ConfigSampleReportDO::getDataSource, reqVO.getDataSource()) + .eqIfPresent(ConfigSampleReportDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSampleReportDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSampleReportDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigSampleReportDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigSampleReportDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowCodeMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowCodeMapper.java new file mode 100644 index 0000000..d3b326c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowCodeMapper.java @@ -0,0 +1,48 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import org.apache.ibatis.annotations.Mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowCodeDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; + +/** + * LiteFlow脚本配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigSimpleFlowCodeMapper extends BaseMapperX { + + default PageResult selectPage(ConfigSimpleFlowCodePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeNo, reqVO.getCodeNo()) + .likeIfPresent(ConfigSimpleFlowCodeDO::getCodeName, reqVO.getCodeName()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeData, reqVO.getCodeData()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeType, reqVO.getCodeType()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeLanguage, reqVO.getCodeLanguage()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSimpleFlowCodeDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigSimpleFlowCodeDO::getId)); + } + + default List selectList(ConfigSimpleFlowCodeReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeNo, reqVO.getCodeNo()) + .likeIfPresent(ConfigSimpleFlowCodeDO::getCodeName, reqVO.getCodeName()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeData, reqVO.getCodeData()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeType, reqVO.getCodeType()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeLanguage, reqVO.getCodeLanguage()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSimpleFlowCodeDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigSimpleFlowCodeDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowRuleMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowRuleMapper.java new file mode 100644 index 0000000..3b0e168 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowRuleMapper.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRulePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowRuleDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * LiteFlow规则配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigSimpleFlowRuleMapper extends BaseMapperX { + + default PageResult selectPage(ConfigSimpleFlowRulePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(ConfigSimpleFlowRuleDO::getName, reqVO.getName()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getDescription, reqVO.getDescription()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getData, reqVO.getData()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getFlow, reqVO.getFlow()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSimpleFlowRuleDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigSimpleFlowRuleDO::getId)); + } + + default List selectList(ConfigSimpleFlowRuleReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .likeIfPresent(ConfigSimpleFlowRuleDO::getName, reqVO.getName()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getDescription, reqVO.getDescription()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getData, reqVO.getData()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getFlow, reqVO.getFlow()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSimpleFlowRuleDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigSimpleFlowRuleDO::getId)); + } +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleProjectMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleProjectMapper.java new file mode 100644 index 0000000..7f1596c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleProjectMapper.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigStandardSampleProjectDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 标准样检测项目配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigStandardSampleProjectMapper extends BaseMapperX { + + default PageResult selectPage(ConfigStandardSampleProjectPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigStandardSampleProjectDO::getConfigStandardSampleTypeId, reqVO.getConfigStandardSampleTypeId()) + .eqIfPresent(ConfigStandardSampleProjectDO::getDictionaryProjectId, reqVO.getDictionaryProjectId()) + .likeIfPresent(ConfigStandardSampleProjectDO::getDictionaryProjectName, reqVO.getDictionaryProjectName()) + .eqIfPresent(ConfigStandardSampleProjectDO::getUnitId, reqVO.getUnitId()) + .eqIfPresent(ConfigStandardSampleProjectDO::getDictionaryProjectUnit, reqVO.getDictionaryProjectUnit()) + .eqIfPresent(ConfigStandardSampleProjectDO::getAccuracy, reqVO.getAccuracy()) + .eqIfPresent(ConfigStandardSampleProjectDO::getSort, reqVO.getSort()) + .eqIfPresent(ConfigStandardSampleProjectDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigStandardSampleProjectDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigStandardSampleProjectDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigStandardSampleProjectDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigStandardSampleProjectDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleTypeMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleTypeMapper.java new file mode 100644 index 0000000..4f2ec12 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleTypeMapper.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigStandardSampleTypeDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 标准样类型配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigStandardSampleTypeMapper extends BaseMapperX { + + default PageResult selectPage(ConfigStandardSampleTypePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigStandardSampleTypeDO::getConfigBaseSampleId, reqVO.getConfigBaseSampleId()) + .likeIfPresent(ConfigStandardSampleTypeDO::getName, reqVO.getName()) + .eqIfPresent(ConfigStandardSampleTypeDO::getCodeRule, reqVO.getCodeRule()) + .eqIfPresent(ConfigStandardSampleTypeDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigStandardSampleTypeDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigStandardSampleTypeDO::getAssayDepartmentCode, reqVO.getAssayDepartmentCode()) + .eqIfPresent(ConfigStandardSampleTypeDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigStandardSampleTypeDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigStandardSampleTypeDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMapper.java new file mode 100644 index 0000000..cbc0275 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMapper.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 子样配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigSubSampleMapper extends BaseMapperX { + + default PageResult selectPage(ConfigSubSamplePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigSubSampleDO::getConfigSubSampleParentId, reqVO.getConfigSubSampleParentId()) + .eqIfPresent(ConfigSubSampleDO::getDictionarySampleTypeId, reqVO.getDictionarySampleTypeId()) + .eqIfPresent(ConfigSubSampleDO::getFlowKey, reqVO.getFlowKey()) + .eqIfPresent(ConfigSubSampleDO::getSimpleCodeRule, reqVO.getSimpleCodeRule()) + .eqIfPresent(ConfigSubSampleDO::getCodeRule, reqVO.getCodeRule()) + .eqIfPresent(ConfigSubSampleDO::getIsPrint, reqVO.getIsPrint()) + .eqIfPresent(ConfigSubSampleDO::getRecheckFlowCode, reqVO.getRecheckFlowCode()) + .likeIfPresent(ConfigSubSampleDO::getSampleName, reqVO.getSampleName()) + .eqIfPresent(ConfigSubSampleDO::getSampleSaveDay, reqVO.getSampleSaveDay()) + .eqIfPresent(ConfigSubSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSubSampleDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSubSampleDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigSubSampleDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigSubSampleDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMethodMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMethodMapper.java new file mode 100644 index 0000000..f412065 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMethodMapper.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 子样与检测方法配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigSubSampleMethodMapper extends BaseMapperX { + + default PageResult selectPage(ConfigSubSampleMethodPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigSubSampleMethodDO::getConfigSubSampleId, reqVO.getConfigSubSampleId()) + .eqIfPresent(ConfigSubSampleMethodDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId()) + .eqIfPresent(ConfigSubSampleMethodDO::getIsDefaultUse, reqVO.getIsDefaultUse()) + .eqIfPresent(ConfigSubSampleMethodDO::getParentId, reqVO.getParentId()) + .likeIfPresent(ConfigSubSampleMethodDO::getName, reqVO.getName()) + .eqIfPresent(ConfigSubSampleMethodDO::getKey, reqVO.getKey()) + .eqIfPresent(ConfigSubSampleMethodDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSubSampleMethodDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSubSampleMethodDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigSubSampleMethodDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleParentMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleParentMapper.java new file mode 100644 index 0000000..789907e --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleParentMapper.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleParentDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 分样配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigSubSampleParentMapper extends BaseMapperX { + + default PageResult selectPage(ConfigSubSampleParentPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigSubSampleParentDO::getConfigBaseSampleId, reqVO.getConfigBaseSampleId()) + .eqIfPresent(ConfigSubSampleParentDO::getDictionarySampleTypeId, reqVO.getDictionarySampleTypeId()) + .likeIfPresent(ConfigSubSampleParentDO::getSampleName, reqVO.getSampleName()) + .eqIfPresent(ConfigSubSampleParentDO::getIsDefaultEnabled, reqVO.getIsDefaultEnabled()) + .eqIfPresent(ConfigSubSampleParentDO::getAuditWay, reqVO.getAuditWay()) + .eqIfPresent(ConfigSubSampleParentDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSubSampleParentDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSubSampleParentDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigSubSampleParentDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigSubSampleParentDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigWarehouseLocationInfomationMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigWarehouseLocationInfomationMapper.java new file mode 100644 index 0000000..8b740cb --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigWarehouseLocationInfomationMapper.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationInfomationDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 样品库位信息 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigWarehouseLocationInfomationMapper extends BaseMapperX { + + default PageResult selectPage(ConfigWarehouseLocationInfomationPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(ConfigWarehouseLocationInfomationDO::getName, reqVO.getName()) + .eqIfPresent(ConfigWarehouseLocationInfomationDO::getCode, reqVO.getCode()) + .eqIfPresent(ConfigWarehouseLocationInfomationDO::getWarehouseCoding, reqVO.getWarehouseCoding()) + .eqIfPresent(ConfigWarehouseLocationInfomationDO::getCapacity, reqVO.getCapacity()) + .eqIfPresent(ConfigWarehouseLocationInfomationDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigWarehouseLocationInfomationDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigWarehouseLocationInfomationDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigWarehouseLocationInfomationDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardDetailMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardDetailMapper.java new file mode 100644 index 0000000..700ecff --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardDetailMapper.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailExtendDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 物料检测标准检测项目 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface MaterialAssayStandardDetailMapper extends BaseMapperX { + + default PageResult selectPage(MaterialAssayStandardDetailPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(MaterialAssayStandardDetailDO::getMaterialAssayStandardId, reqVO.getMaterialAssayStandardId()) + .eqIfPresent(MaterialAssayStandardDetailDO::getDictionaryProjectId, reqVO.getDictionaryProjectId()) + .eqIfPresent(MaterialAssayStandardDetailDO::getDictionaryProjectCode, reqVO.getDictionaryProjectCode()) + .eqIfPresent(MaterialAssayStandardDetailDO::getUnitId, reqVO.getUnitId()) + .eqIfPresent(MaterialAssayStandardDetailDO::getUnit, reqVO.getUnit()) + .eqIfPresent(MaterialAssayStandardDetailDO::getDataType, reqVO.getDataType()) + .eqIfPresent(MaterialAssayStandardDetailDO::getDecimalPosition, reqVO.getDecimalPosition()) + .eqIfPresent(MaterialAssayStandardDetailDO::getAssayCategory, reqVO.getAssayCategory()) + .eqIfPresent(MaterialAssayStandardDetailDO::getIsDefaultPick, reqVO.getIsDefaultPick()) + .eqIfPresent(MaterialAssayStandardDetailDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(MaterialAssayStandardDetailDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(MaterialAssayStandardDetailDO::getRemark, reqVO.getRemark()) + .orderByDesc(MaterialAssayStandardDetailDO::getId)); + } + + List selectListWithExtend(@Param("param") MaterialAssayStandardDetailPageReqVO reqVO); + + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMapper.java new file mode 100644 index 0000000..10cb672 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMapper.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardExtendDO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 物料检测标准 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface MaterialAssayStandardMapper extends BaseMapperX { + + String tempDataKey = "tempDataKey"; + + default PageResult selectPage(MaterialAssayStandardPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(MaterialAssayStandardDO::getBaseSampleId, reqVO.getBaseSampleId()) + .eqIfPresent(MaterialAssayStandardDO::getMaterialId, reqVO.getMaterialId()) + .eqIfPresent(MaterialAssayStandardDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId()) + .eqIfPresent(MaterialAssayStandardDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(MaterialAssayStandardDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(MaterialAssayStandardDO::getRemark, reqVO.getRemark()) + .ne(MaterialAssayStandardDO::getRemark, tempDataKey) + .orderByDesc(MaterialAssayStandardDO::getId)); + } + + Page selectPageWithExtend(IPage page, @Param("param") MaterialAssayStandardPageReqVO param); + + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.java new file mode 100644 index 0000000..795df87 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardMethodDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 物料检测标准与方法 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface MaterialAssayStandardMethodMapper extends BaseMapperX { + + default PageResult selectPage(MaterialAssayStandardMethodPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(MaterialAssayStandardMethodDO::getMaterialAssayStandardDetailId, reqVO.getMaterialAssayStandardDetailId()) + .eqIfPresent(MaterialAssayStandardMethodDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId()) + .eqIfPresent(MaterialAssayStandardMethodDO::getIsDefault, reqVO.getIsDefault()) + .eqIfPresent(MaterialAssayStandardMethodDO::getIsDualCup, reqVO.getIsDualCup()) + .eqIfPresent(MaterialAssayStandardMethodDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(MaterialAssayStandardMethodDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(MaterialAssayStandardMethodDO::getRemark, reqVO.getRemark()) + .orderByDesc(MaterialAssayStandardMethodDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/BaseSampleService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/BaseSampleService.java new file mode 100644 index 0000000..c51135d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/BaseSampleService.java @@ -0,0 +1,66 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSamplePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSampleRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSampleSaveReqVO; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.BaseSampleDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 样品大类管理 Service 接口 + * + * @author 后台管理 + */ +public interface BaseSampleService { + + List getBaseSampleListWithAssayStandardCount(); + + /** + * 创建样品大类管理 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BaseSampleRespVO createBaseSample(@Valid BaseSampleSaveReqVO createReqVO); + + /** + * 更新样品大类管理 + * + * @param updateReqVO 更新信息 + */ + void updateBaseSample(@Valid BaseSampleSaveReqVO updateReqVO); + + /** + * 删除样品大类管理 + * + * @param id 编号 + */ + void deleteBaseSample(Long id); + + /** + * 批量删除样品大类管理 + * + * @param ids 编号 + */ + void deleteBaseSampleListByIds(List ids); + + /** + * 获得样品大类管理 + * + * @param id 编号 + * @return 样品大类管理 + */ + BaseSampleDO getBaseSample(Long id); + + /** + * 获得样品大类管理分页 + * + * @param pageReqVO 分页查询 + * @return 样品大类管理分页 + */ + PageResult getBaseSamplePage(BaseSamplePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/BaseSampleServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/BaseSampleServiceImpl.java new file mode 100644 index 0000000..c18218b --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/BaseSampleServiceImpl.java @@ -0,0 +1,95 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSamplePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSampleRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSampleSaveReqVO; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.BaseSampleDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.BaseSampleMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.BASE_SAMPLE_NOT_EXISTS; + +/** + * 样品大类管理 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class BaseSampleServiceImpl implements BaseSampleService { + + @Resource private BaseSampleMapper baseSampleMapper; + + @Override + public List getBaseSampleListWithAssayStandardCount() { + return baseSampleMapper.getBaseSampleListWithAssayStandardCount(); + } + + @Override + public BaseSampleRespVO createBaseSample(BaseSampleSaveReqVO createReqVO) { + // 插入 + BaseSampleDO baseSample = BeanUtils.toBean(createReqVO, BaseSampleDO.class); + baseSampleMapper.insert(baseSample); + // 返回 + return BeanUtils.toBean(baseSample, BaseSampleRespVO.class); + } + + @Override + public void updateBaseSample(BaseSampleSaveReqVO updateReqVO) { + // 校验存在 + validateBaseSampleExists(updateReqVO.getId()); + // 更新 + BaseSampleDO updateObj = BeanUtils.toBean(updateReqVO, BaseSampleDO.class); + baseSampleMapper.updateById(updateObj); + } + + @Override + public void deleteBaseSample(Long id) { + // 校验存在 + validateBaseSampleExists(id); + // 删除 + baseSampleMapper.deleteById(id); + } + + @Override + public void deleteBaseSampleListByIds(List ids) { + // 校验存在 + validateBaseSampleExists(ids); + // 删除 + baseSampleMapper.deleteByIds(ids); + } + + private void validateBaseSampleExists(List ids) { + List list = baseSampleMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BASE_SAMPLE_NOT_EXISTS); + } + } + + private void validateBaseSampleExists(Long id) { + if (baseSampleMapper.selectById(id) == null) { + throw exception(BASE_SAMPLE_NOT_EXISTS); + } + } + + @Override + public BaseSampleDO getBaseSample(Long id) { + return baseSampleMapper.selectById(id); + } + + @Override + public PageResult getBaseSamplePage(BaseSamplePageReqVO pageReqVO) { + return baseSampleMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectParameterService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectParameterService.java new file mode 100644 index 0000000..0b8096d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectParameterService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 检测方法分析项目参数配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigAssayMethodProjectParameterService { + + /** + * 创建检测方法分析项目参数配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigAssayMethodProjectParameterRespVO createConfigAssayMethodProjectParameter(@Valid ConfigAssayMethodProjectParameterSaveReqVO createReqVO); + + /** + * 更新检测方法分析项目参数配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigAssayMethodProjectParameter(@Valid ConfigAssayMethodProjectParameterSaveReqVO updateReqVO); + + /** + * 删除检测方法分析项目参数配置 + * + * @param id 编号 + */ + void deleteConfigAssayMethodProjectParameter(Long id); + + /** + * 批量删除检测方法分析项目参数配置 + * + * @param ids 编号 + */ + void deleteConfigAssayMethodProjectParameterListByIds(List ids); + + /** + * 获得检测方法分析项目参数配置 + * + * @param id 编号 + * @return 检测方法分析项目参数配置 + */ + ConfigAssayMethodProjectParameterDO getConfigAssayMethodProjectParameter(Long id); + + /** + * 获得检测方法分析项目参数配置分页 + * + * @param pageReqVO 分页查询 + * @return 检测方法分析项目参数配置分页 + */ + PageResult getConfigAssayMethodProjectParameterPage(ConfigAssayMethodProjectParameterPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectParameterServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectParameterServiceImpl.java new file mode 100644 index 0000000..e177749 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectParameterServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectParameterMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_ASSAY_METHOD_PROJECT_PARAMETER_NOT_EXISTS; + +/** + * 检测方法分析项目参数配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigAssayMethodProjectParameterServiceImpl implements ConfigAssayMethodProjectParameterService { + + @Resource + private ConfigAssayMethodProjectParameterMapper configAssayMethodProjectParameterMapper; + + @Override + public ConfigAssayMethodProjectParameterRespVO createConfigAssayMethodProjectParameter(ConfigAssayMethodProjectParameterSaveReqVO createReqVO) { + // 插入 + ConfigAssayMethodProjectParameterDO configAssayMethodProjectParameter = BeanUtils.toBean(createReqVO, ConfigAssayMethodProjectParameterDO.class); + configAssayMethodProjectParameterMapper.insert(configAssayMethodProjectParameter); + // 返回 + return BeanUtils.toBean(configAssayMethodProjectParameter, ConfigAssayMethodProjectParameterRespVO.class); + } + + @Override + public void updateConfigAssayMethodProjectParameter(ConfigAssayMethodProjectParameterSaveReqVO updateReqVO) { + // 校验存在 + validateConfigAssayMethodProjectParameterExists(updateReqVO.getId()); + // 更新 + ConfigAssayMethodProjectParameterDO updateObj = BeanUtils.toBean(updateReqVO, ConfigAssayMethodProjectParameterDO.class); + configAssayMethodProjectParameterMapper.updateById(updateObj); + } + + @Override + public void deleteConfigAssayMethodProjectParameter(Long id) { + // 校验存在 + validateConfigAssayMethodProjectParameterExists(id); + // 删除 + configAssayMethodProjectParameterMapper.deleteById(id); + } + + @Override + public void deleteConfigAssayMethodProjectParameterListByIds(List ids) { + // 校验存在 + validateConfigAssayMethodProjectParameterExists(ids); + // 删除 + configAssayMethodProjectParameterMapper.deleteByIds(ids); + } + + private void validateConfigAssayMethodProjectParameterExists(List ids) { + List list = configAssayMethodProjectParameterMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_ASSAY_METHOD_PROJECT_PARAMETER_NOT_EXISTS); + } + } + + private void validateConfigAssayMethodProjectParameterExists(Long id) { + if (configAssayMethodProjectParameterMapper.selectById(id) == null) { + throw exception(CONFIG_ASSAY_METHOD_PROJECT_PARAMETER_NOT_EXISTS); + } + } + + @Override + public ConfigAssayMethodProjectParameterDO getConfigAssayMethodProjectParameter(Long id) { + return configAssayMethodProjectParameterMapper.selectById(id); + } + + @Override + public PageResult getConfigAssayMethodProjectParameterPage(ConfigAssayMethodProjectParameterPageReqVO pageReqVO) { + return configAssayMethodProjectParameterMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectService.java new file mode 100644 index 0000000..faca67f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 检测方法分析项目配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigAssayMethodProjectService { + + /** + * 创建检测方法分析项目配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigAssayMethodProjectRespVO createConfigAssayMethodProject(@Valid ConfigAssayMethodProjectSaveReqVO createReqVO); + + /** + * 更新检测方法分析项目配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigAssayMethodProject(@Valid ConfigAssayMethodProjectSaveReqVO updateReqVO); + + /** + * 删除检测方法分析项目配置 + * + * @param id 编号 + */ + void deleteConfigAssayMethodProject(Long id); + + /** + * 批量删除检测方法分析项目配置 + * + * @param ids 编号 + */ + void deleteConfigAssayMethodProjectListByIds(List ids); + + /** + * 获得检测方法分析项目配置 + * + * @param id 编号 + * @return 检测方法分析项目配置 + */ + ConfigAssayMethodProjectDO getConfigAssayMethodProject(Long id); + + /** + * 获得检测方法分析项目配置分页 + * + * @param pageReqVO 分页查询 + * @return 检测方法分析项目配置分页 + */ + PageResult getConfigAssayMethodProjectPage(ConfigAssayMethodProjectPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectServiceImpl.java new file mode 100644 index 0000000..b006222 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_ASSAY_METHOD_PROJECT_NOT_EXISTS; + +/** + * 检测方法分析项目配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigAssayMethodProjectServiceImpl implements ConfigAssayMethodProjectService { + + @Resource + private ConfigAssayMethodProjectMapper configAssayMethodProjectMapper; + + @Override + public ConfigAssayMethodProjectRespVO createConfigAssayMethodProject(ConfigAssayMethodProjectSaveReqVO createReqVO) { + // 插入 + ConfigAssayMethodProjectDO configAssayMethodProject = BeanUtils.toBean(createReqVO, ConfigAssayMethodProjectDO.class); + configAssayMethodProjectMapper.insert(configAssayMethodProject); + // 返回 + return BeanUtils.toBean(configAssayMethodProject, ConfigAssayMethodProjectRespVO.class); + } + + @Override + public void updateConfigAssayMethodProject(ConfigAssayMethodProjectSaveReqVO updateReqVO) { + // 校验存在 + validateConfigAssayMethodProjectExists(updateReqVO.getId()); + // 更新 + ConfigAssayMethodProjectDO updateObj = BeanUtils.toBean(updateReqVO, ConfigAssayMethodProjectDO.class); + configAssayMethodProjectMapper.updateById(updateObj); + } + + @Override + public void deleteConfigAssayMethodProject(Long id) { + // 校验存在 + validateConfigAssayMethodProjectExists(id); + // 删除 + configAssayMethodProjectMapper.deleteById(id); + } + + @Override + public void deleteConfigAssayMethodProjectListByIds(List ids) { + // 校验存在 + validateConfigAssayMethodProjectExists(ids); + // 删除 + configAssayMethodProjectMapper.deleteByIds(ids); + } + + private void validateConfigAssayMethodProjectExists(List ids) { + List list = configAssayMethodProjectMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_ASSAY_METHOD_PROJECT_NOT_EXISTS); + } + } + + private void validateConfigAssayMethodProjectExists(Long id) { + if (configAssayMethodProjectMapper.selectById(id) == null) { + throw exception(CONFIG_ASSAY_METHOD_PROJECT_NOT_EXISTS); + } + } + + @Override + public ConfigAssayMethodProjectDO getConfigAssayMethodProject(Long id) { + return configAssayMethodProjectMapper.selectById(id); + } + + @Override + public PageResult getConfigAssayMethodProjectPage(ConfigAssayMethodProjectPageReqVO pageReqVO) { + return configAssayMethodProjectMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodService.java new file mode 100644 index 0000000..e4e6693 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 检测方法配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigAssayMethodService { + + /** + * 创建检测方法配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigAssayMethodRespVO createConfigAssayMethod(@Valid ConfigAssayMethodSaveReqVO createReqVO); + + /** + * 更新检测方法配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigAssayMethod(@Valid ConfigAssayMethodSaveReqVO updateReqVO); + + /** + * 删除检测方法配置 + * + * @param id 编号 + */ + void deleteConfigAssayMethod(Long id); + + /** + * 批量删除检测方法配置 + * + * @param ids 编号 + */ + void deleteConfigAssayMethodListByIds(List ids); + + /** + * 获得检测方法配置 + * + * @param id 编号 + * @return 检测方法配置 + */ + ConfigAssayMethodDO getConfigAssayMethod(Long id); + + /** + * 获得检测方法配置分页 + * + * @param pageReqVO 分页查询 + * @return 检测方法配置分页 + */ + PageResult getConfigAssayMethodPage(ConfigAssayMethodPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodServiceImpl.java new file mode 100644 index 0000000..70eb77f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigAssayMethodMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_ASSAY_METHOD_NOT_EXISTS; + +/** + * 检测方法配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigAssayMethodServiceImpl implements ConfigAssayMethodService { + + @Resource + private ConfigAssayMethodMapper configAssayMethodMapper; + + @Override + public ConfigAssayMethodRespVO createConfigAssayMethod(ConfigAssayMethodSaveReqVO createReqVO) { + // 插入 + ConfigAssayMethodDO configAssayMethod = BeanUtils.toBean(createReqVO, ConfigAssayMethodDO.class); + configAssayMethodMapper.insert(configAssayMethod); + // 返回 + return BeanUtils.toBean(configAssayMethod, ConfigAssayMethodRespVO.class); + } + + @Override + public void updateConfigAssayMethod(ConfigAssayMethodSaveReqVO updateReqVO) { + // 校验存在 + validateConfigAssayMethodExists(updateReqVO.getId()); + // 更新 + ConfigAssayMethodDO updateObj = BeanUtils.toBean(updateReqVO, ConfigAssayMethodDO.class); + configAssayMethodMapper.updateById(updateObj); + } + + @Override + public void deleteConfigAssayMethod(Long id) { + // 校验存在 + validateConfigAssayMethodExists(id); + // 删除 + configAssayMethodMapper.deleteById(id); + } + + @Override + public void deleteConfigAssayMethodListByIds(List ids) { + // 校验存在 + validateConfigAssayMethodExists(ids); + // 删除 + configAssayMethodMapper.deleteByIds(ids); + } + + private void validateConfigAssayMethodExists(List ids) { + List list = configAssayMethodMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_ASSAY_METHOD_NOT_EXISTS); + } + } + + private void validateConfigAssayMethodExists(Long id) { + if (configAssayMethodMapper.selectById(id) == null) { + throw exception(CONFIG_ASSAY_METHOD_NOT_EXISTS); + } + } + + @Override + public ConfigAssayMethodDO getConfigAssayMethod(Long id) { + return configAssayMethodMapper.selectById(id); + } + + @Override + public PageResult getConfigAssayMethodPage(ConfigAssayMethodPageReqVO pageReqVO) { + return configAssayMethodMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigBaseSampleService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigBaseSampleService.java new file mode 100644 index 0000000..c4e1ab7 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigBaseSampleService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigBaseSampleDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 主样配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigBaseSampleService { + + /** + * 创建主样配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigBaseSampleRespVO createConfigBaseSample(@Valid ConfigBaseSampleSaveReqVO createReqVO); + + /** + * 更新主样配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigBaseSample(@Valid ConfigBaseSampleSaveReqVO updateReqVO); + + /** + * 删除主样配置 + * + * @param id 编号 + */ + void deleteConfigBaseSample(Long id); + + /** + * 批量删除主样配置 + * + * @param ids 编号 + */ + void deleteConfigBaseSampleListByIds(List ids); + + /** + * 获得主样配置 + * + * @param id 编号 + * @return 主样配置 + */ + ConfigBaseSampleDO getConfigBaseSample(Long id); + + /** + * 获得主样配置分页 + * + * @param pageReqVO 分页查询 + * @return 主样配置分页 + */ + PageResult getConfigBaseSamplePage(ConfigBaseSamplePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigBaseSampleServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigBaseSampleServiceImpl.java new file mode 100644 index 0000000..a54de74 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigBaseSampleServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigBaseSampleDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigBaseSampleMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_BASE_SAMPLE_NOT_EXISTS; + +/** + * 主样配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigBaseSampleServiceImpl implements ConfigBaseSampleService { + + @Resource + private ConfigBaseSampleMapper configBaseSampleMapper; + + @Override + public ConfigBaseSampleRespVO createConfigBaseSample(ConfigBaseSampleSaveReqVO createReqVO) { + // 插入 + ConfigBaseSampleDO configBaseSample = BeanUtils.toBean(createReqVO, ConfigBaseSampleDO.class); + configBaseSampleMapper.insert(configBaseSample); + // 返回 + return BeanUtils.toBean(configBaseSample, ConfigBaseSampleRespVO.class); + } + + @Override + public void updateConfigBaseSample(ConfigBaseSampleSaveReqVO updateReqVO) { + // 校验存在 + validateConfigBaseSampleExists(updateReqVO.getId()); + // 更新 + ConfigBaseSampleDO updateObj = BeanUtils.toBean(updateReqVO, ConfigBaseSampleDO.class); + configBaseSampleMapper.updateById(updateObj); + } + + @Override + public void deleteConfigBaseSample(Long id) { + // 校验存在 + validateConfigBaseSampleExists(id); + // 删除 + configBaseSampleMapper.deleteById(id); + } + + @Override + public void deleteConfigBaseSampleListByIds(List ids) { + // 校验存在 + validateConfigBaseSampleExists(ids); + // 删除 + configBaseSampleMapper.deleteByIds(ids); + } + + private void validateConfigBaseSampleExists(List ids) { + List list = configBaseSampleMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_BASE_SAMPLE_NOT_EXISTS); + } + } + + private void validateConfigBaseSampleExists(Long id) { + if (configBaseSampleMapper.selectById(id) == null) { + throw exception(CONFIG_BASE_SAMPLE_NOT_EXISTS); + } + } + + @Override + public ConfigBaseSampleDO getConfigBaseSample(Long id) { + return configBaseSampleMapper.selectById(id); + } + + @Override + public PageResult getConfigBaseSamplePage(ConfigBaseSamplePageReqVO pageReqVO) { + return configBaseSampleMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigDocumentTypeService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigDocumentTypeService.java new file mode 100644 index 0000000..195b80a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigDocumentTypeService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigDocumentTypeDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 报告类型配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigDocumentTypeService { + + /** + * 创建报告类型配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigDocumentTypeRespVO createConfigDocumentType(@Valid ConfigDocumentTypeSaveReqVO createReqVO); + + /** + * 更新报告类型配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigDocumentType(@Valid ConfigDocumentTypeSaveReqVO updateReqVO); + + /** + * 删除报告类型配置 + * + * @param id 编号 + */ + void deleteConfigDocumentType(Long id); + + /** + * 批量删除报告类型配置 + * + * @param ids 编号 + */ + void deleteConfigDocumentTypeListByIds(List ids); + + /** + * 获得报告类型配置 + * + * @param id 编号 + * @return 报告类型配置 + */ + ConfigDocumentTypeDO getConfigDocumentType(Long id); + + /** + * 获得报告类型配置分页 + * + * @param pageReqVO 分页查询 + * @return 报告类型配置分页 + */ + PageResult getConfigDocumentTypePage(ConfigDocumentTypePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigDocumentTypeServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigDocumentTypeServiceImpl.java new file mode 100644 index 0000000..3dfebe7 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigDocumentTypeServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigDocumentTypeDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigDocumentTypeMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_DOCUMENT_TYPE_NOT_EXISTS; + +/** + * 报告类型配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigDocumentTypeServiceImpl implements ConfigDocumentTypeService { + + @Resource + private ConfigDocumentTypeMapper configDocumentTypeMapper; + + @Override + public ConfigDocumentTypeRespVO createConfigDocumentType(ConfigDocumentTypeSaveReqVO createReqVO) { + // 插入 + ConfigDocumentTypeDO configDocumentType = BeanUtils.toBean(createReqVO, ConfigDocumentTypeDO.class); + configDocumentTypeMapper.insert(configDocumentType); + // 返回 + return BeanUtils.toBean(configDocumentType, ConfigDocumentTypeRespVO.class); + } + + @Override + public void updateConfigDocumentType(ConfigDocumentTypeSaveReqVO updateReqVO) { + // 校验存在 + validateConfigDocumentTypeExists(updateReqVO.getId()); + // 更新 + ConfigDocumentTypeDO updateObj = BeanUtils.toBean(updateReqVO, ConfigDocumentTypeDO.class); + configDocumentTypeMapper.updateById(updateObj); + } + + @Override + public void deleteConfigDocumentType(Long id) { + // 校验存在 + validateConfigDocumentTypeExists(id); + // 删除 + configDocumentTypeMapper.deleteById(id); + } + + @Override + public void deleteConfigDocumentTypeListByIds(List ids) { + // 校验存在 + validateConfigDocumentTypeExists(ids); + // 删除 + configDocumentTypeMapper.deleteByIds(ids); + } + + private void validateConfigDocumentTypeExists(List ids) { + List list = configDocumentTypeMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_DOCUMENT_TYPE_NOT_EXISTS); + } + } + + private void validateConfigDocumentTypeExists(Long id) { + if (configDocumentTypeMapper.selectById(id) == null) { + throw exception(CONFIG_DOCUMENT_TYPE_NOT_EXISTS); + } + } + + @Override + public ConfigDocumentTypeDO getConfigDocumentType(Long id) { + return configDocumentTypeMapper.selectById(id); + } + + @Override + public PageResult getConfigDocumentTypePage(ConfigDocumentTypePageReqVO pageReqVO) { + return configDocumentTypeMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigEntrustSourceService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigEntrustSourceService.java new file mode 100644 index 0000000..e4542d8 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigEntrustSourceService.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigEntrustSourceDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 检验委托来源配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigEntrustSourceService { + + /** + * 创建检验委托来源配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigEntrustSourceRespVO createConfigEntrustSource(@Valid ConfigEntrustSourceSaveReqVO createReqVO); + + /** + * 更新检验委托来源配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigEntrustSource(@Valid ConfigEntrustSourceSaveReqVO updateReqVO); + + /** + * 删除检验委托来源配置 + * + * @param id 编号 + */ + void deleteConfigEntrustSource(Long id); + + /** + * 批量删除检验委托来源配置 + * + * @param ids 编号 + */ + void deleteConfigEntrustSourceListByIds(List ids); + + /** + * 获得检验委托来源配置 + * + * @param id 编号 + * @return 检验委托来源配置 + */ + ConfigEntrustSourceDO getConfigEntrustSource(Long id); + + /** + * 获得检验委托来源配置分页 + * + * @param pageReqVO 分页查询 + * @return 检验委托来源配置分页 + */ + PageResult getConfigEntrustSourcePage(ConfigEntrustSourcePageReqVO pageReqVO); + + /** + * 获得检验委托来源配置列表 + * + * @param pageReqVO 分页查询 + * @return 检验委托来源配置 + */ + List getConfigEntrustSourceList(@Valid ConfigEntrustSourceReqVO reqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigEntrustSourceServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigEntrustSourceServiceImpl.java new file mode 100644 index 0000000..0de4e8a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigEntrustSourceServiceImpl.java @@ -0,0 +1,96 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; + +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigEntrustSourceDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigEntrustSourceMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_ENTRUST_SOURCE_NOT_EXISTS; + +/** + * 检验委托来源配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigEntrustSourceServiceImpl implements ConfigEntrustSourceService { + + @Resource + private ConfigEntrustSourceMapper configEntrustSourceMapper; + + @Override + public ConfigEntrustSourceRespVO createConfigEntrustSource(ConfigEntrustSourceSaveReqVO createReqVO) { + // 插入 + ConfigEntrustSourceDO configEntrustSource = BeanUtils.toBean(createReqVO, ConfigEntrustSourceDO.class); + configEntrustSourceMapper.insert(configEntrustSource); + // 返回 + return BeanUtils.toBean(configEntrustSource, ConfigEntrustSourceRespVO.class); + } + + @Override + public void updateConfigEntrustSource(ConfigEntrustSourceSaveReqVO updateReqVO) { + // 校验存在 + validateConfigEntrustSourceExists(updateReqVO.getId()); + // 更新 + ConfigEntrustSourceDO updateObj = BeanUtils.toBean(updateReqVO, ConfigEntrustSourceDO.class); + configEntrustSourceMapper.updateById(updateObj); + } + + @Override + public void deleteConfigEntrustSource(Long id) { + // 校验存在 + validateConfigEntrustSourceExists(id); + // 删除 + configEntrustSourceMapper.deleteById(id); + } + + @Override + public void deleteConfigEntrustSourceListByIds(List ids) { + // 校验存在 + validateConfigEntrustSourceExists(ids); + // 删除 + configEntrustSourceMapper.deleteByIds(ids); + } + + private void validateConfigEntrustSourceExists(List ids) { + List list = configEntrustSourceMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_ENTRUST_SOURCE_NOT_EXISTS); + } + } + + private void validateConfigEntrustSourceExists(Long id) { + if (configEntrustSourceMapper.selectById(id) == null) { + throw exception(CONFIG_ENTRUST_SOURCE_NOT_EXISTS); + } + } + + @Override + public ConfigEntrustSourceDO getConfigEntrustSource(Long id) { + return configEntrustSourceMapper.selectById(id); + } + + @Override + public PageResult getConfigEntrustSourcePage(ConfigEntrustSourcePageReqVO pageReqVO) { + return configEntrustSourceMapper.selectPage(pageReqVO); + } + + @Override + public List getConfigEntrustSourceList(@Valid ConfigEntrustSourceReqVO reqVO) { + return configEntrustSourceMapper.selectList(reqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigProjectService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigProjectService.java new file mode 100644 index 0000000..52481cd --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigProjectService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigProjectDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 检测项目配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigProjectService { + + /** + * 创建检测项目配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigProjectRespVO createConfigProject(@Valid ConfigProjectSaveReqVO createReqVO); + + /** + * 更新检测项目配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigProject(@Valid ConfigProjectSaveReqVO updateReqVO); + + /** + * 删除检测项目配置 + * + * @param id 编号 + */ + void deleteConfigProject(Long id); + + /** + * 批量删除检测项目配置 + * + * @param ids 编号 + */ + void deleteConfigProjectListByIds(List ids); + + /** + * 获得检测项目配置 + * + * @param id 编号 + * @return 检测项目配置 + */ + ConfigProjectDO getConfigProject(Long id); + + /** + * 获得检测项目配置分页 + * + * @param pageReqVO 分页查询 + * @return 检测项目配置分页 + */ + PageResult getConfigProjectPage(ConfigProjectPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigProjectServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigProjectServiceImpl.java new file mode 100644 index 0000000..77bd29f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigProjectServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigProjectDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigProjectMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_PROJECT_NOT_EXISTS; + +/** + * 检测项目配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigProjectServiceImpl implements ConfigProjectService { + + @Resource + private ConfigProjectMapper configProjectMapper; + + @Override + public ConfigProjectRespVO createConfigProject(ConfigProjectSaveReqVO createReqVO) { + // 插入 + ConfigProjectDO configProject = BeanUtils.toBean(createReqVO, ConfigProjectDO.class); + configProjectMapper.insert(configProject); + // 返回 + return BeanUtils.toBean(configProject, ConfigProjectRespVO.class); + } + + @Override + public void updateConfigProject(ConfigProjectSaveReqVO updateReqVO) { + // 校验存在 + validateConfigProjectExists(updateReqVO.getId()); + // 更新 + ConfigProjectDO updateObj = BeanUtils.toBean(updateReqVO, ConfigProjectDO.class); + configProjectMapper.updateById(updateObj); + } + + @Override + public void deleteConfigProject(Long id) { + // 校验存在 + validateConfigProjectExists(id); + // 删除 + configProjectMapper.deleteById(id); + } + + @Override + public void deleteConfigProjectListByIds(List ids) { + // 校验存在 + validateConfigProjectExists(ids); + // 删除 + configProjectMapper.deleteByIds(ids); + } + + private void validateConfigProjectExists(List ids) { + List list = configProjectMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_PROJECT_NOT_EXISTS); + } + } + + private void validateConfigProjectExists(Long id) { + if (configProjectMapper.selectById(id) == null) { + throw exception(CONFIG_PROJECT_NOT_EXISTS); + } + } + + @Override + public ConfigProjectDO getConfigProject(Long id) { + return configProjectMapper.selectById(id); + } + + @Override + public PageResult getConfigProjectPage(ConfigProjectPageReqVO pageReqVO) { + return configProjectMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportFieldService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportFieldService.java new file mode 100644 index 0000000..0b743b1 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportFieldService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportFieldDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 报表字段配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigReportFieldService { + + /** + * 创建报表字段配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigReportFieldRespVO createConfigReportField(@Valid ConfigReportFieldSaveReqVO createReqVO); + + /** + * 更新报表字段配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigReportField(@Valid ConfigReportFieldSaveReqVO updateReqVO); + + /** + * 删除报表字段配置 + * + * @param id 编号 + */ + void deleteConfigReportField(Long id); + + /** + * 批量删除报表字段配置 + * + * @param ids 编号 + */ + void deleteConfigReportFieldListByIds(List ids); + + /** + * 获得报表字段配置 + * + * @param id 编号 + * @return 报表字段配置 + */ + ConfigReportFieldDO getConfigReportField(Long id); + + /** + * 获得报表字段配置分页 + * + * @param pageReqVO 分页查询 + * @return 报表字段配置分页 + */ + PageResult getConfigReportFieldPage(ConfigReportFieldPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportFieldServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportFieldServiceImpl.java new file mode 100644 index 0000000..dff9c6d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportFieldServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportFieldDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigReportFieldMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_REPORT_FIELD_NOT_EXISTS; + +/** + * 报表字段配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigReportFieldServiceImpl implements ConfigReportFieldService { + + @Resource + private ConfigReportFieldMapper configReportFieldMapper; + + @Override + public ConfigReportFieldRespVO createConfigReportField(ConfigReportFieldSaveReqVO createReqVO) { + // 插入 + ConfigReportFieldDO configReportField = BeanUtils.toBean(createReqVO, ConfigReportFieldDO.class); + configReportFieldMapper.insert(configReportField); + // 返回 + return BeanUtils.toBean(configReportField, ConfigReportFieldRespVO.class); + } + + @Override + public void updateConfigReportField(ConfigReportFieldSaveReqVO updateReqVO) { + // 校验存在 + validateConfigReportFieldExists(updateReqVO.getId()); + // 更新 + ConfigReportFieldDO updateObj = BeanUtils.toBean(updateReqVO, ConfigReportFieldDO.class); + configReportFieldMapper.updateById(updateObj); + } + + @Override + public void deleteConfigReportField(Long id) { + // 校验存在 + validateConfigReportFieldExists(id); + // 删除 + configReportFieldMapper.deleteById(id); + } + + @Override + public void deleteConfigReportFieldListByIds(List ids) { + // 校验存在 + validateConfigReportFieldExists(ids); + // 删除 + configReportFieldMapper.deleteByIds(ids); + } + + private void validateConfigReportFieldExists(List ids) { + List list = configReportFieldMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_REPORT_FIELD_NOT_EXISTS); + } + } + + private void validateConfigReportFieldExists(Long id) { + if (configReportFieldMapper.selectById(id) == null) { + throw exception(CONFIG_REPORT_FIELD_NOT_EXISTS); + } + } + + @Override + public ConfigReportFieldDO getConfigReportField(Long id) { + return configReportFieldMapper.selectById(id); + } + + @Override + public PageResult getConfigReportFieldPage(ConfigReportFieldPageReqVO pageReqVO) { + return configReportFieldMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTemplateService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTemplateService.java new file mode 100644 index 0000000..c8abb43 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTemplateService.java @@ -0,0 +1,66 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigReportTemplatePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigReportTemplateRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigReportTemplateSaveReqVO; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportTemplateDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 报表模版配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigReportTemplateService { + + /** + * 创建报表模版配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigReportTemplateRespVO createConfigReportTemplate(@Valid ConfigReportTemplateSaveReqVO createReqVO); + + /** + * 更新报表模版配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigReportTemplate(@Valid ConfigReportTemplateSaveReqVO updateReqVO); + + /** + * 删除报表模版配置 + * + * @param id 编号 + */ + void deleteConfigReportTemplate(Long id); + + /** + * 批量删除报表模版配置 + * + * @param ids 编号 + */ + void deleteConfigReportTemplateListByIds(List ids); + + /** + * 获得报表模版配置 + * + * @param id 编号 + * @return 报表模版配置 + */ + ConfigReportTemplateDO getConfigReportTemplate(Long id); + + /** + * 获得报表模版配置分页 + * + * @param pageReqVO 分页查询 + * @return 报表模版配置分页 + */ + PageResult getConfigReportTemplatePage(ConfigReportTemplatePageReqVO pageReqVO); + + ConfigReportTemplateDO getConfigReportTemplateByKey(String reportKey); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTemplateServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTemplateServiceImpl.java new file mode 100644 index 0000000..b55704f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTemplateServiceImpl.java @@ -0,0 +1,99 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigReportTemplatePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigReportTemplateRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigReportTemplateSaveReqVO; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import com.baomidou.mybatisplus.core.toolkit.Wrappers; + +import java.util.*; + +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportTemplateDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigReportTemplateMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.*; + +/** + * 报表模版配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigReportTemplateServiceImpl implements ConfigReportTemplateService { + + @Resource + private ConfigReportTemplateMapper configReportTemplateMapper; + + @Override + public ConfigReportTemplateRespVO createConfigReportTemplate(ConfigReportTemplateSaveReqVO createReqVO) { + // 插入 + ConfigReportTemplateDO configReportTemplate = BeanUtils.toBean(createReqVO, ConfigReportTemplateDO.class); + configReportTemplateMapper.insert(configReportTemplate); + // 返回 + return BeanUtils.toBean(configReportTemplate, ConfigReportTemplateRespVO.class); + } + + @Override + public void updateConfigReportTemplate(ConfigReportTemplateSaveReqVO updateReqVO) { + // 校验存在 + validateConfigReportTemplateExists(updateReqVO.getId()); + // 更新 + ConfigReportTemplateDO updateObj = BeanUtils.toBean(updateReqVO, ConfigReportTemplateDO.class); + configReportTemplateMapper.updateById(updateObj); + } + + @Override + public void deleteConfigReportTemplate(Long id) { + // 校验存在 + validateConfigReportTemplateExists(id); + // 删除 + configReportTemplateMapper.deleteById(id); + } + + @Override + public void deleteConfigReportTemplateListByIds(List ids) { + // 校验存在 + validateConfigReportTemplateExists(ids); + // 删除 + configReportTemplateMapper.deleteByIds(ids); + } + + private void validateConfigReportTemplateExists(List ids) { + List list = configReportTemplateMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_REPORT_TEMPLATE_NOT_EXISTS); + } + } + + private void validateConfigReportTemplateExists(Long id) { + if (configReportTemplateMapper.selectById(id) == null) { + throw exception(CONFIG_REPORT_TEMPLATE_NOT_EXISTS); + } + } + + @Override + public ConfigReportTemplateDO getConfigReportTemplate(Long id) { + return configReportTemplateMapper.selectById(id); + } + + @Override + public PageResult getConfigReportTemplatePage(ConfigReportTemplatePageReqVO pageReqVO) { + return configReportTemplateMapper.selectPage(pageReqVO); + } + + @Override + public ConfigReportTemplateDO getConfigReportTemplateByKey(String reportKey) { + return configReportTemplateMapper.selectOne(Wrappers.query().lambda().eq(ConfigReportTemplateDO::getKey, reportKey)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTypeService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTypeService.java new file mode 100644 index 0000000..c3e8be1 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTypeService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportTypeDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 报表类型配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigReportTypeService { + + /** + * 创建报表类型配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigReportTypeRespVO createConfigReportType(@Valid ConfigReportTypeSaveReqVO createReqVO); + + /** + * 更新报表类型配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigReportType(@Valid ConfigReportTypeSaveReqVO updateReqVO); + + /** + * 删除报表类型配置 + * + * @param id 编号 + */ + void deleteConfigReportType(Long id); + + /** + * 批量删除报表类型配置 + * + * @param ids 编号 + */ + void deleteConfigReportTypeListByIds(List ids); + + /** + * 获得报表类型配置 + * + * @param id 编号 + * @return 报表类型配置 + */ + ConfigReportTypeDO getConfigReportType(Long id); + + /** + * 获得报表类型配置分页 + * + * @param pageReqVO 分页查询 + * @return 报表类型配置分页 + */ + PageResult getConfigReportTypePage(ConfigReportTypePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTypeServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTypeServiceImpl.java new file mode 100644 index 0000000..22370f8 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTypeServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportTypeDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigReportTypeMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_REPORT_TYPE_NOT_EXISTS; + +/** + * 报表类型配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigReportTypeServiceImpl implements ConfigReportTypeService { + + @Resource + private ConfigReportTypeMapper configReportTypeMapper; + + @Override + public ConfigReportTypeRespVO createConfigReportType(ConfigReportTypeSaveReqVO createReqVO) { + // 插入 + ConfigReportTypeDO configReportType = BeanUtils.toBean(createReqVO, ConfigReportTypeDO.class); + configReportTypeMapper.insert(configReportType); + // 返回 + return BeanUtils.toBean(configReportType, ConfigReportTypeRespVO.class); + } + + @Override + public void updateConfigReportType(ConfigReportTypeSaveReqVO updateReqVO) { + // 校验存在 + validateConfigReportTypeExists(updateReqVO.getId()); + // 更新 + ConfigReportTypeDO updateObj = BeanUtils.toBean(updateReqVO, ConfigReportTypeDO.class); + configReportTypeMapper.updateById(updateObj); + } + + @Override + public void deleteConfigReportType(Long id) { + // 校验存在 + validateConfigReportTypeExists(id); + // 删除 + configReportTypeMapper.deleteById(id); + } + + @Override + public void deleteConfigReportTypeListByIds(List ids) { + // 校验存在 + validateConfigReportTypeExists(ids); + // 删除 + configReportTypeMapper.deleteByIds(ids); + } + + private void validateConfigReportTypeExists(List ids) { + List list = configReportTypeMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_REPORT_TYPE_NOT_EXISTS); + } + } + + private void validateConfigReportTypeExists(Long id) { + if (configReportTypeMapper.selectById(id) == null) { + throw exception(CONFIG_REPORT_TYPE_NOT_EXISTS); + } + } + + @Override + public ConfigReportTypeDO getConfigReportType(Long id) { + return configReportTypeMapper.selectById(id); + } + + @Override + public PageResult getConfigReportTypePage(ConfigReportTypePageReqVO pageReqVO) { + return configReportTypeMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleFlowService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleFlowService.java new file mode 100644 index 0000000..c55e756 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleFlowService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleFlowDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 样品流程配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigSampleFlowService { + + /** + * 创建样品流程配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigSampleFlowRespVO createConfigSampleFlow(@Valid ConfigSampleFlowSaveReqVO createReqVO); + + /** + * 更新样品流程配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigSampleFlow(@Valid ConfigSampleFlowSaveReqVO updateReqVO); + + /** + * 删除样品流程配置 + * + * @param id 编号 + */ + void deleteConfigSampleFlow(Long id); + + /** + * 批量删除样品流程配置 + * + * @param ids 编号 + */ + void deleteConfigSampleFlowListByIds(List ids); + + /** + * 获得样品流程配置 + * + * @param id 编号 + * @return 样品流程配置 + */ + ConfigSampleFlowDO getConfigSampleFlow(Long id); + + /** + * 获得样品流程配置分页 + * + * @param pageReqVO 分页查询 + * @return 样品流程配置分页 + */ + PageResult getConfigSampleFlowPage(ConfigSampleFlowPageReqVO pageReqVO); + + ConfigSampleFlowDO getConfigSampleFlowByKey(String key); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleFlowServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleFlowServiceImpl.java new file mode 100644 index 0000000..de1e479 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleFlowServiceImpl.java @@ -0,0 +1,97 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import com.baomidou.mybatisplus.core.toolkit.Wrappers; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleFlowDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSampleFlowMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_SAMPLE_FLOW_NOT_EXISTS; + +/** + * 样品流程配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigSampleFlowServiceImpl implements ConfigSampleFlowService { + + @Resource + private ConfigSampleFlowMapper configSampleFlowMapper; + + @Override + public ConfigSampleFlowRespVO createConfigSampleFlow(ConfigSampleFlowSaveReqVO createReqVO) { + // 插入 + ConfigSampleFlowDO configSampleFlow = BeanUtils.toBean(createReqVO, ConfigSampleFlowDO.class); + configSampleFlowMapper.insert(configSampleFlow); + // 返回 + return BeanUtils.toBean(configSampleFlow, ConfigSampleFlowRespVO.class); + } + + @Override + public void updateConfigSampleFlow(ConfigSampleFlowSaveReqVO updateReqVO) { + // 校验存在 + validateConfigSampleFlowExists(updateReqVO.getId()); + // 更新 + ConfigSampleFlowDO updateObj = BeanUtils.toBean(updateReqVO, ConfigSampleFlowDO.class); + configSampleFlowMapper.updateById(updateObj); + } + + @Override + public void deleteConfigSampleFlow(Long id) { + // 校验存在 + validateConfigSampleFlowExists(id); + // 删除 + configSampleFlowMapper.deleteById(id); + } + + @Override + public void deleteConfigSampleFlowListByIds(List ids) { + // 校验存在 + validateConfigSampleFlowExists(ids); + // 删除 + configSampleFlowMapper.deleteByIds(ids); + } + + private void validateConfigSampleFlowExists(List ids) { + List list = configSampleFlowMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_SAMPLE_FLOW_NOT_EXISTS); + } + } + + private void validateConfigSampleFlowExists(Long id) { + if (configSampleFlowMapper.selectById(id) == null) { + throw exception(CONFIG_SAMPLE_FLOW_NOT_EXISTS); + } + } + + @Override + public ConfigSampleFlowDO getConfigSampleFlow(Long id) { + return configSampleFlowMapper.selectById(id); + } + + @Override + public PageResult getConfigSampleFlowPage(ConfigSampleFlowPageReqVO pageReqVO) { + return configSampleFlowMapper.selectPage(pageReqVO); + } + + @Override + public ConfigSampleFlowDO getConfigSampleFlowByKey(String key) { + return configSampleFlowMapper.selectByKey(key); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleReportService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleReportService.java new file mode 100644 index 0000000..2c010b9 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleReportService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleReportDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 样品报表关系 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigSampleReportService { + + /** + * 创建样品报表关系 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigSampleReportRespVO createConfigSampleReport(@Valid ConfigSampleReportSaveReqVO createReqVO); + + /** + * 更新样品报表关系 + * + * @param updateReqVO 更新信息 + */ + void updateConfigSampleReport(@Valid ConfigSampleReportSaveReqVO updateReqVO); + + /** + * 删除样品报表关系 + * + * @param id 编号 + */ + void deleteConfigSampleReport(Long id); + + /** + * 批量删除样品报表关系 + * + * @param ids 编号 + */ + void deleteConfigSampleReportListByIds(List ids); + + /** + * 获得样品报表关系 + * + * @param id 编号 + * @return 样品报表关系 + */ + ConfigSampleReportDO getConfigSampleReport(Long id); + + /** + * 获得样品报表关系分页 + * + * @param pageReqVO 分页查询 + * @return 样品报表关系分页 + */ + PageResult getConfigSampleReportPage(ConfigSampleReportPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleReportServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleReportServiceImpl.java new file mode 100644 index 0000000..6ad3e18 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleReportServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleReportDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSampleReportMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_SAMPLE_REPORT_NOT_EXISTS; + +/** + * 样品报表关系 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigSampleReportServiceImpl implements ConfigSampleReportService { + + @Resource + private ConfigSampleReportMapper configSampleReportMapper; + + @Override + public ConfigSampleReportRespVO createConfigSampleReport(ConfigSampleReportSaveReqVO createReqVO) { + // 插入 + ConfigSampleReportDO configSampleReport = BeanUtils.toBean(createReqVO, ConfigSampleReportDO.class); + configSampleReportMapper.insert(configSampleReport); + // 返回 + return BeanUtils.toBean(configSampleReport, ConfigSampleReportRespVO.class); + } + + @Override + public void updateConfigSampleReport(ConfigSampleReportSaveReqVO updateReqVO) { + // 校验存在 + validateConfigSampleReportExists(updateReqVO.getId()); + // 更新 + ConfigSampleReportDO updateObj = BeanUtils.toBean(updateReqVO, ConfigSampleReportDO.class); + configSampleReportMapper.updateById(updateObj); + } + + @Override + public void deleteConfigSampleReport(Long id) { + // 校验存在 + validateConfigSampleReportExists(id); + // 删除 + configSampleReportMapper.deleteById(id); + } + + @Override + public void deleteConfigSampleReportListByIds(List ids) { + // 校验存在 + validateConfigSampleReportExists(ids); + // 删除 + configSampleReportMapper.deleteByIds(ids); + } + + private void validateConfigSampleReportExists(List ids) { + List list = configSampleReportMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_SAMPLE_REPORT_NOT_EXISTS); + } + } + + private void validateConfigSampleReportExists(Long id) { + if (configSampleReportMapper.selectById(id) == null) { + throw exception(CONFIG_SAMPLE_REPORT_NOT_EXISTS); + } + } + + @Override + public ConfigSampleReportDO getConfigSampleReport(Long id) { + return configSampleReportMapper.selectById(id); + } + + @Override + public PageResult getConfigSampleReportPage(ConfigSampleReportPageReqVO pageReqVO) { + return configSampleReportMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowCodeService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowCodeService.java new file mode 100644 index 0000000..21f701a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowCodeService.java @@ -0,0 +1,78 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowCodeDO; + +/** + * LiteFlow脚本配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigSimpleFlowCodeService { + + /** + * 创建LiteFlow脚本配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigSimpleFlowCodeRespVO createConfigSimpleFlowCode(@Valid ConfigSimpleFlowCodeSaveReqVO createReqVO); + + /** + * 更新LiteFlow脚本配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigSimpleFlowCode(@Valid ConfigSimpleFlowCodeSaveReqVO updateReqVO); + + /** + * 删除LiteFlow脚本配置 + * + * @param id 编号 + */ + void deleteConfigSimpleFlowCode(Long id); + + /** + * 批量删除LiteFlow脚本配置 + * + * @param ids 编号 + */ + void deleteConfigSimpleFlowCodeListByIds(List ids); + + /** + * 获得LiteFlow脚本配置 + * + * @param id 编号 + * @return LiteFlow脚本配置 + */ + ConfigSimpleFlowCodeDO getConfigSimpleFlowCode(Long id); + + /** + * 获得LiteFlow脚本配置分页 + * + * @param pageReqVO 分页查询 + * @return LiteFlow脚本配置分页 + */ + PageResult getConfigSimpleFlowCodePage(ConfigSimpleFlowCodePageReqVO pageReqVO); + + /** + * 获取LiteFlow脚本配置列表 + * @return + */ + List getConfigSimpleFlowCodeList(); + + /** + * 获得LiteFlow脚本配置列表 + * + * @param reqVO 查询 + * @return LiteFlow脚本配置列表 + */ + List getConfigSimpleFlowCodeList(ConfigSimpleFlowCodeReqVO reqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowCodeServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowCodeServiceImpl.java new file mode 100644 index 0000000..4cf2e0e --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowCodeServiceImpl.java @@ -0,0 +1,116 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import com.baomidou.mybatisplus.core.toolkit.IdWorker; + +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.mq.redis.core.RedisMQTemplate; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowCodeDO; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSimpleFlowCodeMapper; +import cn.iocoder.yudao.module.qms.core.liteflow.handler.RedisLiteFlowMessage; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.*; + +/** + * LiteFlow脚本配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigSimpleFlowCodeServiceImpl implements ConfigSimpleFlowCodeService { + + @Resource + private RedisMQTemplate redisMQTemplate; + + @Resource + private ConfigSimpleFlowCodeMapper configSimpleFlowCodeMapper; + + @Override + public ConfigSimpleFlowCodeRespVO createConfigSimpleFlowCode(ConfigSimpleFlowCodeSaveReqVO createReqVO) { + // 插入 + ConfigSimpleFlowCodeDO configSimpleFlowCode = BeanUtils.toBean(createReqVO, ConfigSimpleFlowCodeDO.class); + configSimpleFlowCodeMapper.insert(configSimpleFlowCode); + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + // 返回 + return BeanUtils.toBean(configSimpleFlowCode, ConfigSimpleFlowCodeRespVO.class); + } + + @Override + public void updateConfigSimpleFlowCode(ConfigSimpleFlowCodeSaveReqVO updateReqVO) { + // 校验存在 + validateConfigSimpleFlowCodeExists(updateReqVO.getId()); + // 更新 + ConfigSimpleFlowCodeDO updateObj = BeanUtils.toBean(updateReqVO, ConfigSimpleFlowCodeDO.class); + configSimpleFlowCodeMapper.updateById(updateObj); + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + } + + @Override + public void deleteConfigSimpleFlowCode(Long id) { + // 校验存在 + validateConfigSimpleFlowCodeExists(id); + // 删除 + configSimpleFlowCodeMapper.deleteById(id); + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + } + + @Override + public void deleteConfigSimpleFlowCodeListByIds(List ids) { + // 校验存在 + validateConfigSimpleFlowCodeExists(ids); + // 删除 + configSimpleFlowCodeMapper.deleteByIds(ids); + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + } + + private void validateConfigSimpleFlowCodeExists(List ids) { + List list = configSimpleFlowCodeMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_SIMPLE_FLOW_CODE_NOT_EXISTS); + } + } + + private void validateConfigSimpleFlowCodeExists(Long id) { + if (configSimpleFlowCodeMapper.selectById(id) == null) { + throw exception(CONFIG_SIMPLE_FLOW_CODE_NOT_EXISTS); + } + } + + @Override + public ConfigSimpleFlowCodeDO getConfigSimpleFlowCode(Long id) { + return configSimpleFlowCodeMapper.selectById(id); + } + + @Override + public PageResult getConfigSimpleFlowCodePage(ConfigSimpleFlowCodePageReqVO pageReqVO) { + return configSimpleFlowCodeMapper.selectPage(pageReqVO); + } + + @Override + public List getConfigSimpleFlowCodeList() { + return configSimpleFlowCodeMapper.selectList(); + } + + @Override + public List getConfigSimpleFlowCodeList(ConfigSimpleFlowCodeReqVO reqVO) { + return configSimpleFlowCodeMapper.selectList(reqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowRuleService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowRuleService.java new file mode 100644 index 0000000..137bef2 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowRuleService.java @@ -0,0 +1,78 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRulePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowRuleDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * LiteFlow规则配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigSimpleFlowRuleService { + + /** + * 创建LiteFlow规则配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigSimpleFlowRuleRespVO createConfigSimpleFlowRule(@Valid ConfigSimpleFlowRuleSaveReqVO createReqVO); + + /** + * 更新LiteFlow规则配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigSimpleFlowRule(@Valid ConfigSimpleFlowRuleSaveReqVO updateReqVO); + + /** + * 删除LiteFlow规则配置 + * + * @param id 编号 + */ + void deleteConfigSimpleFlowRule(Long id); + + /** + * 批量删除LiteFlow规则配置 + * + * @param ids 编号 + */ + void deleteConfigSimpleFlowRuleListByIds(List ids); + + /** + * 获得LiteFlow规则配置 + * + * @param id 编号 + * @return LiteFlow规则配置 + */ + ConfigSimpleFlowRuleDO getConfigSimpleFlowRule(Long id); + + /** + * 获得LiteFlow规则配置分页 + * + * @param pageReqVO 分页查询 + * @return LiteFlow规则配置分页 + */ + PageResult getConfigSimpleFlowRulePage(ConfigSimpleFlowRulePageReqVO pageReqVO); + + /** + * 获得LiteFlow规则配置 列表 + * @return 获得LiteFlow规则配置 列表 + */ + List getConfigSimpleFlowRuleList(); + + /** + * 获得LiteFlow规则配置 列表 + * @param reqVO 列表查询 + * @return LiteFlow规则配置列表 + */ + List getConfigSimpleFlowRuleList(ConfigSimpleFlowRuleReqVO reqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowRuleServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowRuleServiceImpl.java new file mode 100644 index 0000000..afc23e5 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowRuleServiceImpl.java @@ -0,0 +1,117 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import com.baomidou.mybatisplus.core.toolkit.IdWorker; + +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.mq.redis.core.RedisMQTemplate; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRulePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowRuleDO; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSimpleFlowRuleMapper; +import cn.iocoder.yudao.module.qms.core.liteflow.handler.RedisLiteFlowMessage; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.*; + +/** + * LiteFlow规则配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigSimpleFlowRuleServiceImpl implements ConfigSimpleFlowRuleService { + + @Resource + private RedisMQTemplate redisMQTemplate; + + @Resource + private ConfigSimpleFlowRuleMapper configSimpleFlowRuleMapper; + + @Override + public ConfigSimpleFlowRuleRespVO createConfigSimpleFlowRule(ConfigSimpleFlowRuleSaveReqVO createReqVO) { + // 插入 + ConfigSimpleFlowRuleDO configSimpleFlowRule = BeanUtils.toBean(createReqVO, ConfigSimpleFlowRuleDO.class); + configSimpleFlowRuleMapper.insert(configSimpleFlowRule); + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + // 返回 + return BeanUtils.toBean(configSimpleFlowRule, ConfigSimpleFlowRuleRespVO.class); + } + + @Override + public void updateConfigSimpleFlowRule(ConfigSimpleFlowRuleSaveReqVO updateReqVO) { + // 校验存在 + validateConfigSimpleFlowRuleExists(updateReqVO.getId()); + // 更新 + ConfigSimpleFlowRuleDO updateObj = BeanUtils.toBean(updateReqVO, ConfigSimpleFlowRuleDO.class); + configSimpleFlowRuleMapper.updateById(updateObj); + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + } + + @Override + public void deleteConfigSimpleFlowRule(Long id) { + // 校验存在 + validateConfigSimpleFlowRuleExists(id); + // 删除 + configSimpleFlowRuleMapper.deleteById(id); + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + } + + @Override + public void deleteConfigSimpleFlowRuleListByIds(List ids) { + // 校验存在 + validateConfigSimpleFlowRuleExists(ids); + // 删除 + configSimpleFlowRuleMapper.deleteByIds(ids); + + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + } + + private void validateConfigSimpleFlowRuleExists(List ids) { + List list = configSimpleFlowRuleMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_SIMPLE_FLOW_RULE_NOT_EXISTS); + } + } + + private void validateConfigSimpleFlowRuleExists(Long id) { + if (configSimpleFlowRuleMapper.selectById(id) == null) { + throw exception(CONFIG_SIMPLE_FLOW_RULE_NOT_EXISTS); + } + } + + @Override + public ConfigSimpleFlowRuleDO getConfigSimpleFlowRule(Long id) { + return configSimpleFlowRuleMapper.selectById(id); + } + + @Override + public PageResult getConfigSimpleFlowRulePage(ConfigSimpleFlowRulePageReqVO pageReqVO) { + return configSimpleFlowRuleMapper.selectPage(pageReqVO); + } + + @Override + public List getConfigSimpleFlowRuleList() { + return configSimpleFlowRuleMapper.selectList(); + } + + @Override + public List getConfigSimpleFlowRuleList(ConfigSimpleFlowRuleReqVO reqVO) { + return configSimpleFlowRuleMapper.selectList(reqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleProjectService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleProjectService.java new file mode 100644 index 0000000..4272d26 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleProjectService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigStandardSampleProjectDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 标准样检测项目配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigStandardSampleProjectService { + + /** + * 创建标准样检测项目配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigStandardSampleProjectRespVO createConfigStandardSampleProject(@Valid ConfigStandardSampleProjectSaveReqVO createReqVO); + + /** + * 更新标准样检测项目配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigStandardSampleProject(@Valid ConfigStandardSampleProjectSaveReqVO updateReqVO); + + /** + * 删除标准样检测项目配置 + * + * @param id 编号 + */ + void deleteConfigStandardSampleProject(Long id); + + /** + * 批量删除标准样检测项目配置 + * + * @param ids 编号 + */ + void deleteConfigStandardSampleProjectListByIds(List ids); + + /** + * 获得标准样检测项目配置 + * + * @param id 编号 + * @return 标准样检测项目配置 + */ + ConfigStandardSampleProjectDO getConfigStandardSampleProject(Long id); + + /** + * 获得标准样检测项目配置分页 + * + * @param pageReqVO 分页查询 + * @return 标准样检测项目配置分页 + */ + PageResult getConfigStandardSampleProjectPage(ConfigStandardSampleProjectPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleProjectServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleProjectServiceImpl.java new file mode 100644 index 0000000..1105aad --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleProjectServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigStandardSampleProjectDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigStandardSampleProjectMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_STANDARD_SAMPLE_PROJECT_NOT_EXISTS; + +/** + * 标准样检测项目配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigStandardSampleProjectServiceImpl implements ConfigStandardSampleProjectService { + + @Resource + private ConfigStandardSampleProjectMapper configStandardSampleProjectMapper; + + @Override + public ConfigStandardSampleProjectRespVO createConfigStandardSampleProject(ConfigStandardSampleProjectSaveReqVO createReqVO) { + // 插入 + ConfigStandardSampleProjectDO configStandardSampleProject = BeanUtils.toBean(createReqVO, ConfigStandardSampleProjectDO.class); + configStandardSampleProjectMapper.insert(configStandardSampleProject); + // 返回 + return BeanUtils.toBean(configStandardSampleProject, ConfigStandardSampleProjectRespVO.class); + } + + @Override + public void updateConfigStandardSampleProject(ConfigStandardSampleProjectSaveReqVO updateReqVO) { + // 校验存在 + validateConfigStandardSampleProjectExists(updateReqVO.getId()); + // 更新 + ConfigStandardSampleProjectDO updateObj = BeanUtils.toBean(updateReqVO, ConfigStandardSampleProjectDO.class); + configStandardSampleProjectMapper.updateById(updateObj); + } + + @Override + public void deleteConfigStandardSampleProject(Long id) { + // 校验存在 + validateConfigStandardSampleProjectExists(id); + // 删除 + configStandardSampleProjectMapper.deleteById(id); + } + + @Override + public void deleteConfigStandardSampleProjectListByIds(List ids) { + // 校验存在 + validateConfigStandardSampleProjectExists(ids); + // 删除 + configStandardSampleProjectMapper.deleteByIds(ids); + } + + private void validateConfigStandardSampleProjectExists(List ids) { + List list = configStandardSampleProjectMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_STANDARD_SAMPLE_PROJECT_NOT_EXISTS); + } + } + + private void validateConfigStandardSampleProjectExists(Long id) { + if (configStandardSampleProjectMapper.selectById(id) == null) { + throw exception(CONFIG_STANDARD_SAMPLE_PROJECT_NOT_EXISTS); + } + } + + @Override + public ConfigStandardSampleProjectDO getConfigStandardSampleProject(Long id) { + return configStandardSampleProjectMapper.selectById(id); + } + + @Override + public PageResult getConfigStandardSampleProjectPage(ConfigStandardSampleProjectPageReqVO pageReqVO) { + return configStandardSampleProjectMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleTypeService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleTypeService.java new file mode 100644 index 0000000..826551d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleTypeService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigStandardSampleTypeDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 标准样类型配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigStandardSampleTypeService { + + /** + * 创建标准样类型配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigStandardSampleTypeRespVO createConfigStandardSampleType(@Valid ConfigStandardSampleTypeSaveReqVO createReqVO); + + /** + * 更新标准样类型配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigStandardSampleType(@Valid ConfigStandardSampleTypeSaveReqVO updateReqVO); + + /** + * 删除标准样类型配置 + * + * @param id 编号 + */ + void deleteConfigStandardSampleType(Long id); + + /** + * 批量删除标准样类型配置 + * + * @param ids 编号 + */ + void deleteConfigStandardSampleTypeListByIds(List ids); + + /** + * 获得标准样类型配置 + * + * @param id 编号 + * @return 标准样类型配置 + */ + ConfigStandardSampleTypeDO getConfigStandardSampleType(Long id); + + /** + * 获得标准样类型配置分页 + * + * @param pageReqVO 分页查询 + * @return 标准样类型配置分页 + */ + PageResult getConfigStandardSampleTypePage(ConfigStandardSampleTypePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleTypeServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleTypeServiceImpl.java new file mode 100644 index 0000000..d82300d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleTypeServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigStandardSampleTypeDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigStandardSampleTypeMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_STANDARD_SAMPLE_TYPE_NOT_EXISTS; + +/** + * 标准样类型配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigStandardSampleTypeServiceImpl implements ConfigStandardSampleTypeService { + + @Resource + private ConfigStandardSampleTypeMapper configStandardSampleTypeMapper; + + @Override + public ConfigStandardSampleTypeRespVO createConfigStandardSampleType(ConfigStandardSampleTypeSaveReqVO createReqVO) { + // 插入 + ConfigStandardSampleTypeDO configStandardSampleType = BeanUtils.toBean(createReqVO, ConfigStandardSampleTypeDO.class); + configStandardSampleTypeMapper.insert(configStandardSampleType); + // 返回 + return BeanUtils.toBean(configStandardSampleType, ConfigStandardSampleTypeRespVO.class); + } + + @Override + public void updateConfigStandardSampleType(ConfigStandardSampleTypeSaveReqVO updateReqVO) { + // 校验存在 + validateConfigStandardSampleTypeExists(updateReqVO.getId()); + // 更新 + ConfigStandardSampleTypeDO updateObj = BeanUtils.toBean(updateReqVO, ConfigStandardSampleTypeDO.class); + configStandardSampleTypeMapper.updateById(updateObj); + } + + @Override + public void deleteConfigStandardSampleType(Long id) { + // 校验存在 + validateConfigStandardSampleTypeExists(id); + // 删除 + configStandardSampleTypeMapper.deleteById(id); + } + + @Override + public void deleteConfigStandardSampleTypeListByIds(List ids) { + // 校验存在 + validateConfigStandardSampleTypeExists(ids); + // 删除 + configStandardSampleTypeMapper.deleteByIds(ids); + } + + private void validateConfigStandardSampleTypeExists(List ids) { + List list = configStandardSampleTypeMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_STANDARD_SAMPLE_TYPE_NOT_EXISTS); + } + } + + private void validateConfigStandardSampleTypeExists(Long id) { + if (configStandardSampleTypeMapper.selectById(id) == null) { + throw exception(CONFIG_STANDARD_SAMPLE_TYPE_NOT_EXISTS); + } + } + + @Override + public ConfigStandardSampleTypeDO getConfigStandardSampleType(Long id) { + return configStandardSampleTypeMapper.selectById(id); + } + + @Override + public PageResult getConfigStandardSampleTypePage(ConfigStandardSampleTypePageReqVO pageReqVO) { + return configStandardSampleTypeMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleMethodService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleMethodService.java new file mode 100644 index 0000000..4162801 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleMethodService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 子样与检测方法配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigSubSampleMethodService { + + /** + * 创建子样与检测方法配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigSubSampleMethodRespVO createConfigSubSampleMethod(@Valid ConfigSubSampleMethodSaveReqVO createReqVO); + + /** + * 更新子样与检测方法配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigSubSampleMethod(@Valid ConfigSubSampleMethodSaveReqVO updateReqVO); + + /** + * 删除子样与检测方法配置 + * + * @param id 编号 + */ + void deleteConfigSubSampleMethod(Long id); + + /** + * 批量删除子样与检测方法配置 + * + * @param ids 编号 + */ + void deleteConfigSubSampleMethodListByIds(List ids); + + /** + * 获得子样与检测方法配置 + * + * @param id 编号 + * @return 子样与检测方法配置 + */ + ConfigSubSampleMethodDO getConfigSubSampleMethod(Long id); + + /** + * 获得子样与检测方法配置分页 + * + * @param pageReqVO 分页查询 + * @return 子样与检测方法配置分页 + */ + PageResult getConfigSubSampleMethodPage(ConfigSubSampleMethodPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleMethodServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleMethodServiceImpl.java new file mode 100644 index 0000000..ed4274a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleMethodServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSubSampleMethodMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_SUB_SAMPLE_METHOD_NOT_EXISTS; + +/** + * 子样与检测方法配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigSubSampleMethodServiceImpl implements ConfigSubSampleMethodService { + + @Resource + private ConfigSubSampleMethodMapper configSubSampleMethodMapper; + + @Override + public ConfigSubSampleMethodRespVO createConfigSubSampleMethod(ConfigSubSampleMethodSaveReqVO createReqVO) { + // 插入 + ConfigSubSampleMethodDO configSubSampleMethod = BeanUtils.toBean(createReqVO, ConfigSubSampleMethodDO.class); + configSubSampleMethodMapper.insert(configSubSampleMethod); + // 返回 + return BeanUtils.toBean(configSubSampleMethod, ConfigSubSampleMethodRespVO.class); + } + + @Override + public void updateConfigSubSampleMethod(ConfigSubSampleMethodSaveReqVO updateReqVO) { + // 校验存在 + validateConfigSubSampleMethodExists(updateReqVO.getId()); + // 更新 + ConfigSubSampleMethodDO updateObj = BeanUtils.toBean(updateReqVO, ConfigSubSampleMethodDO.class); + configSubSampleMethodMapper.updateById(updateObj); + } + + @Override + public void deleteConfigSubSampleMethod(Long id) { + // 校验存在 + validateConfigSubSampleMethodExists(id); + // 删除 + configSubSampleMethodMapper.deleteById(id); + } + + @Override + public void deleteConfigSubSampleMethodListByIds(List ids) { + // 校验存在 + validateConfigSubSampleMethodExists(ids); + // 删除 + configSubSampleMethodMapper.deleteByIds(ids); + } + + private void validateConfigSubSampleMethodExists(List ids) { + List list = configSubSampleMethodMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_SUB_SAMPLE_METHOD_NOT_EXISTS); + } + } + + private void validateConfigSubSampleMethodExists(Long id) { + if (configSubSampleMethodMapper.selectById(id) == null) { + throw exception(CONFIG_SUB_SAMPLE_METHOD_NOT_EXISTS); + } + } + + @Override + public ConfigSubSampleMethodDO getConfigSubSampleMethod(Long id) { + return configSubSampleMethodMapper.selectById(id); + } + + @Override + public PageResult getConfigSubSampleMethodPage(ConfigSubSampleMethodPageReqVO pageReqVO) { + return configSubSampleMethodMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleParentService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleParentService.java new file mode 100644 index 0000000..43a5fc5 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleParentService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleParentDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 分样配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigSubSampleParentService { + + /** + * 创建分样配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigSubSampleParentRespVO createConfigSubSampleParent(@Valid ConfigSubSampleParentSaveReqVO createReqVO); + + /** + * 更新分样配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigSubSampleParent(@Valid ConfigSubSampleParentSaveReqVO updateReqVO); + + /** + * 删除分样配置 + * + * @param id 编号 + */ + void deleteConfigSubSampleParent(Long id); + + /** + * 批量删除分样配置 + * + * @param ids 编号 + */ + void deleteConfigSubSampleParentListByIds(List ids); + + /** + * 获得分样配置 + * + * @param id 编号 + * @return 分样配置 + */ + ConfigSubSampleParentDO getConfigSubSampleParent(Long id); + + /** + * 获得分样配置分页 + * + * @param pageReqVO 分页查询 + * @return 分样配置分页 + */ + PageResult getConfigSubSampleParentPage(ConfigSubSampleParentPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleParentServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleParentServiceImpl.java new file mode 100644 index 0000000..688e18d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleParentServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleParentDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSubSampleParentMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_SUB_SAMPLE_PARENT_NOT_EXISTS; + +/** + * 分样配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigSubSampleParentServiceImpl implements ConfigSubSampleParentService { + + @Resource + private ConfigSubSampleParentMapper configSubSampleParentMapper; + + @Override + public ConfigSubSampleParentRespVO createConfigSubSampleParent(ConfigSubSampleParentSaveReqVO createReqVO) { + // 插入 + ConfigSubSampleParentDO configSubSampleParent = BeanUtils.toBean(createReqVO, ConfigSubSampleParentDO.class); + configSubSampleParentMapper.insert(configSubSampleParent); + // 返回 + return BeanUtils.toBean(configSubSampleParent, ConfigSubSampleParentRespVO.class); + } + + @Override + public void updateConfigSubSampleParent(ConfigSubSampleParentSaveReqVO updateReqVO) { + // 校验存在 + validateConfigSubSampleParentExists(updateReqVO.getId()); + // 更新 + ConfigSubSampleParentDO updateObj = BeanUtils.toBean(updateReqVO, ConfigSubSampleParentDO.class); + configSubSampleParentMapper.updateById(updateObj); + } + + @Override + public void deleteConfigSubSampleParent(Long id) { + // 校验存在 + validateConfigSubSampleParentExists(id); + // 删除 + configSubSampleParentMapper.deleteById(id); + } + + @Override + public void deleteConfigSubSampleParentListByIds(List ids) { + // 校验存在 + validateConfigSubSampleParentExists(ids); + // 删除 + configSubSampleParentMapper.deleteByIds(ids); + } + + private void validateConfigSubSampleParentExists(List ids) { + List list = configSubSampleParentMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_SUB_SAMPLE_PARENT_NOT_EXISTS); + } + } + + private void validateConfigSubSampleParentExists(Long id) { + if (configSubSampleParentMapper.selectById(id) == null) { + throw exception(CONFIG_SUB_SAMPLE_PARENT_NOT_EXISTS); + } + } + + @Override + public ConfigSubSampleParentDO getConfigSubSampleParent(Long id) { + return configSubSampleParentMapper.selectById(id); + } + + @Override + public PageResult getConfigSubSampleParentPage(ConfigSubSampleParentPageReqVO pageReqVO) { + return configSubSampleParentMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleService.java new file mode 100644 index 0000000..9c751f6 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 子样配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigSubSampleService { + + /** + * 创建子样配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigSubSampleRespVO createConfigSubSample(@Valid ConfigSubSampleSaveReqVO createReqVO); + + /** + * 更新子样配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigSubSample(@Valid ConfigSubSampleSaveReqVO updateReqVO); + + /** + * 删除子样配置 + * + * @param id 编号 + */ + void deleteConfigSubSample(Long id); + + /** + * 批量删除子样配置 + * + * @param ids 编号 + */ + void deleteConfigSubSampleListByIds(List ids); + + /** + * 获得子样配置 + * + * @param id 编号 + * @return 子样配置 + */ + ConfigSubSampleDO getConfigSubSample(Long id); + + /** + * 获得子样配置分页 + * + * @param pageReqVO 分页查询 + * @return 子样配置分页 + */ + PageResult getConfigSubSamplePage(ConfigSubSamplePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleServiceImpl.java new file mode 100644 index 0000000..8d89c92 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSubSampleMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_SUB_SAMPLE_NOT_EXISTS; + +/** + * 子样配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigSubSampleServiceImpl implements ConfigSubSampleService { + + @Resource + private ConfigSubSampleMapper configSubSampleMapper; + + @Override + public ConfigSubSampleRespVO createConfigSubSample(ConfigSubSampleSaveReqVO createReqVO) { + // 插入 + ConfigSubSampleDO configSubSample = BeanUtils.toBean(createReqVO, ConfigSubSampleDO.class); + configSubSampleMapper.insert(configSubSample); + // 返回 + return BeanUtils.toBean(configSubSample, ConfigSubSampleRespVO.class); + } + + @Override + public void updateConfigSubSample(ConfigSubSampleSaveReqVO updateReqVO) { + // 校验存在 + validateConfigSubSampleExists(updateReqVO.getId()); + // 更新 + ConfigSubSampleDO updateObj = BeanUtils.toBean(updateReqVO, ConfigSubSampleDO.class); + configSubSampleMapper.updateById(updateObj); + } + + @Override + public void deleteConfigSubSample(Long id) { + // 校验存在 + validateConfigSubSampleExists(id); + // 删除 + configSubSampleMapper.deleteById(id); + } + + @Override + public void deleteConfigSubSampleListByIds(List ids) { + // 校验存在 + validateConfigSubSampleExists(ids); + // 删除 + configSubSampleMapper.deleteByIds(ids); + } + + private void validateConfigSubSampleExists(List ids) { + List list = configSubSampleMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_SUB_SAMPLE_NOT_EXISTS); + } + } + + private void validateConfigSubSampleExists(Long id) { + if (configSubSampleMapper.selectById(id) == null) { + throw exception(CONFIG_SUB_SAMPLE_NOT_EXISTS); + } + } + + @Override + public ConfigSubSampleDO getConfigSubSample(Long id) { + return configSubSampleMapper.selectById(id); + } + + @Override + public PageResult getConfigSubSamplePage(ConfigSubSamplePageReqVO pageReqVO) { + return configSubSampleMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigWarehouseLocationInfomationService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigWarehouseLocationInfomationService.java new file mode 100644 index 0000000..4daf23c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigWarehouseLocationInfomationService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationInfomationDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 样品库位信息 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigWarehouseLocationInfomationService { + + /** + * 创建样品库位信息 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigWarehouseLocationInfomationRespVO createConfigWarehouseLocationInfomation(@Valid ConfigWarehouseLocationInfomationSaveReqVO createReqVO); + + /** + * 更新样品库位信息 + * + * @param updateReqVO 更新信息 + */ + void updateConfigWarehouseLocationInfomation(@Valid ConfigWarehouseLocationInfomationSaveReqVO updateReqVO); + + /** + * 删除样品库位信息 + * + * @param id 编号 + */ + void deleteConfigWarehouseLocationInfomation(Long id); + + /** + * 批量删除样品库位信息 + * + * @param ids 编号 + */ + void deleteConfigWarehouseLocationInfomationListByIds(List ids); + + /** + * 获得样品库位信息 + * + * @param id 编号 + * @return 样品库位信息 + */ + ConfigWarehouseLocationInfomationDO getConfigWarehouseLocationInfomation(Long id); + + /** + * 获得样品库位信息分页 + * + * @param pageReqVO 分页查询 + * @return 样品库位信息分页 + */ + PageResult getConfigWarehouseLocationInfomationPage(ConfigWarehouseLocationInfomationPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigWarehouseLocationInfomationServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigWarehouseLocationInfomationServiceImpl.java new file mode 100644 index 0000000..47291a5 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigWarehouseLocationInfomationServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationInfomationDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigWarehouseLocationInfomationMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_WAREHOUSE_LOCATION_INFOMATION_NOT_EXISTS; + +/** + * 样品库位信息 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigWarehouseLocationInfomationServiceImpl implements ConfigWarehouseLocationInfomationService { + + @Resource + private ConfigWarehouseLocationInfomationMapper configWarehouseLocationInfomationMapper; + + @Override + public ConfigWarehouseLocationInfomationRespVO createConfigWarehouseLocationInfomation(ConfigWarehouseLocationInfomationSaveReqVO createReqVO) { + // 插入 + ConfigWarehouseLocationInfomationDO configWarehouseLocationInfomation = BeanUtils.toBean(createReqVO, ConfigWarehouseLocationInfomationDO.class); + configWarehouseLocationInfomationMapper.insert(configWarehouseLocationInfomation); + // 返回 + return BeanUtils.toBean(configWarehouseLocationInfomation, ConfigWarehouseLocationInfomationRespVO.class); + } + + @Override + public void updateConfigWarehouseLocationInfomation(ConfigWarehouseLocationInfomationSaveReqVO updateReqVO) { + // 校验存在 + validateConfigWarehouseLocationInfomationExists(updateReqVO.getId()); + // 更新 + ConfigWarehouseLocationInfomationDO updateObj = BeanUtils.toBean(updateReqVO, ConfigWarehouseLocationInfomationDO.class); + configWarehouseLocationInfomationMapper.updateById(updateObj); + } + + @Override + public void deleteConfigWarehouseLocationInfomation(Long id) { + // 校验存在 + validateConfigWarehouseLocationInfomationExists(id); + // 删除 + configWarehouseLocationInfomationMapper.deleteById(id); + } + + @Override + public void deleteConfigWarehouseLocationInfomationListByIds(List ids) { + // 校验存在 + validateConfigWarehouseLocationInfomationExists(ids); + // 删除 + configWarehouseLocationInfomationMapper.deleteByIds(ids); + } + + private void validateConfigWarehouseLocationInfomationExists(List ids) { + List list = configWarehouseLocationInfomationMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_WAREHOUSE_LOCATION_INFOMATION_NOT_EXISTS); + } + } + + private void validateConfigWarehouseLocationInfomationExists(Long id) { + if (configWarehouseLocationInfomationMapper.selectById(id) == null) { + throw exception(CONFIG_WAREHOUSE_LOCATION_INFOMATION_NOT_EXISTS); + } + } + + @Override + public ConfigWarehouseLocationInfomationDO getConfigWarehouseLocationInfomation(Long id) { + return configWarehouseLocationInfomationMapper.selectById(id); + } + + @Override + public PageResult getConfigWarehouseLocationInfomationPage(ConfigWarehouseLocationInfomationPageReqVO pageReqVO) { + return configWarehouseLocationInfomationMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardDetailService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardDetailService.java new file mode 100644 index 0000000..c027e73 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardDetailService.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailExtendDO; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 物料检测标准检测项目 Service 接口 + * + * @author 后台管理 + */ +public interface MaterialAssayStandardDetailService { + + List selectListWithExtend(MaterialAssayStandardDetailPageReqVO params); + + List getByStandardId(Long standardId); + List getByStandardIdList(List standardId); + + /** + * 创建物料检测标准检测项目 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + MaterialAssayStandardDetailRespVO createMaterialAssayStandardDetail(@Valid MaterialAssayStandardDetailSaveReqVO createReqVO); + + /** + * 更新物料检测标准检测项目 + * + * @param updateReqVO 更新信息 + */ + void updateMaterialAssayStandardDetail(@Valid MaterialAssayStandardDetailSaveReqVO updateReqVO); + + /** + * 删除物料检测标准检测项目 + * + * @param id 编号 + */ + void deleteMaterialAssayStandardDetail(Long id); + + /** + * 批量删除物料检测标准检测项目 + * + * @param ids 编号 + */ + void deleteMaterialAssayStandardDetailListByIds(List ids); + + /** + * 获得物料检测标准检测项目 + * + * @param id 编号 + * @return 物料检测标准检测项目 + */ + MaterialAssayStandardDetailDO getMaterialAssayStandardDetail(Long id); + + /** + * 获得物料检测标准检测项目分页 + * + * @param pageReqVO 分页查询 + * @return 物料检测标准检测项目分页 + */ + PageResult getMaterialAssayStandardDetailPage(MaterialAssayStandardDetailPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardDetailServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardDetailServiceImpl.java new file mode 100644 index 0000000..6d90870 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardDetailServiceImpl.java @@ -0,0 +1,114 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailExtendDO; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.MaterialAssayStandardDetailMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.MATERIAL_ASSAY_STANDARD_DETAIL_NOT_EXISTS; + +/** + * 物料检测标准检测项目 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class MaterialAssayStandardDetailServiceImpl implements MaterialAssayStandardDetailService { + + @Resource + private MaterialAssayStandardDetailMapper materialAssayStandardDetailMapper; + + @Override + public List selectListWithExtend(MaterialAssayStandardDetailPageReqVO params) { + List list = materialAssayStandardDetailMapper.selectListWithExtend(params); + return BeanUtils.toBean(list, MaterialAssayStandardDetailRespVO.class); + } + + @Override + public List getByStandardId(Long standardId) { + MaterialAssayStandardDetailPageReqVO params = new MaterialAssayStandardDetailPageReqVO(); + params.setMaterialAssayStandardId(standardId); + return selectListWithExtend( params); + } + + @Override + public List getByStandardIdList(List standardIdList) { + MaterialAssayStandardDetailPageReqVO params = new MaterialAssayStandardDetailPageReqVO(); + params.setStandardIdList(standardIdList); + return selectListWithExtend( params); + } + + @Override + public MaterialAssayStandardDetailRespVO createMaterialAssayStandardDetail(MaterialAssayStandardDetailSaveReqVO createReqVO) { + // 插入 + MaterialAssayStandardDetailDO materialAssayStandardDetail = BeanUtils.toBean(createReqVO, MaterialAssayStandardDetailDO.class); + materialAssayStandardDetailMapper.insert(materialAssayStandardDetail); + // 返回 + return BeanUtils.toBean(materialAssayStandardDetail, MaterialAssayStandardDetailRespVO.class); + } + + @Override + public void updateMaterialAssayStandardDetail(MaterialAssayStandardDetailSaveReqVO updateReqVO) { + // 校验存在 + validateMaterialAssayStandardDetailExists(updateReqVO.getId()); + // 更新 + MaterialAssayStandardDetailDO updateObj = BeanUtils.toBean(updateReqVO, MaterialAssayStandardDetailDO.class); + materialAssayStandardDetailMapper.updateById(updateObj); + } + + @Override + public void deleteMaterialAssayStandardDetail(Long id) { + // 校验存在 + validateMaterialAssayStandardDetailExists(id); + // 删除 + materialAssayStandardDetailMapper.deleteById(id); + } + + @Override + public void deleteMaterialAssayStandardDetailListByIds(List ids) { + // 校验存在 + validateMaterialAssayStandardDetailExists(ids); + // 删除 + materialAssayStandardDetailMapper.deleteByIds(ids); + } + + private void validateMaterialAssayStandardDetailExists(List ids) { + List list = materialAssayStandardDetailMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(MATERIAL_ASSAY_STANDARD_DETAIL_NOT_EXISTS); + } + } + + private void validateMaterialAssayStandardDetailExists(Long id) { + if (materialAssayStandardDetailMapper.selectById(id) == null) { + throw exception(MATERIAL_ASSAY_STANDARD_DETAIL_NOT_EXISTS); + } + } + + @Override + public MaterialAssayStandardDetailDO getMaterialAssayStandardDetail(Long id) { + return materialAssayStandardDetailMapper.selectById(id); + } + + @Override + public PageResult getMaterialAssayStandardDetailPage(MaterialAssayStandardDetailPageReqVO pageReqVO) { + return materialAssayStandardDetailMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardMethodService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardMethodService.java new file mode 100644 index 0000000..930c67c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardMethodService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodSaveReqVO; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardMethodDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 物料检测标准与方法 Service 接口 + * + * @author 后台管理 + */ +public interface MaterialAssayStandardMethodService { + + /** + * 创建物料检测标准与方法 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + MaterialAssayStandardMethodRespVO createMaterialAssayStandardMethod(@Valid MaterialAssayStandardMethodSaveReqVO createReqVO); + + /** + * 更新物料检测标准与方法 + * + * @param updateReqVO 更新信息 + */ + void updateMaterialAssayStandardMethod(@Valid MaterialAssayStandardMethodSaveReqVO updateReqVO); + + /** + * 删除物料检测标准与方法 + * + * @param id 编号 + */ + void deleteMaterialAssayStandardMethod(Long id); + + /** + * 批量删除物料检测标准与方法 + * + * @param ids 编号 + */ + void deleteMaterialAssayStandardMethodListByIds(List ids); + + /** + * 获得物料检测标准与方法 + * + * @param id 编号 + * @return 物料检测标准与方法 + */ + MaterialAssayStandardMethodDO getMaterialAssayStandardMethod(Long id); + + /** + * 获得物料检测标准与方法分页 + * + * @param pageReqVO 分页查询 + * @return 物料检测标准与方法分页 + */ + PageResult getMaterialAssayStandardMethodPage(MaterialAssayStandardMethodPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardMethodServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardMethodServiceImpl.java new file mode 100644 index 0000000..6816f60 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardMethodServiceImpl.java @@ -0,0 +1,92 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodSaveReqVO; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardMethodDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.MaterialAssayStandardMethodMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.MATERIAL_ASSAY_STANDARD_METHOD_NOT_EXISTS; + +/** + * 物料检测标准与方法 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class MaterialAssayStandardMethodServiceImpl implements MaterialAssayStandardMethodService { + + @Resource + private MaterialAssayStandardMethodMapper materialAssayStandardMethodMapper; + + @Override + public MaterialAssayStandardMethodRespVO createMaterialAssayStandardMethod(MaterialAssayStandardMethodSaveReqVO createReqVO) { + // 插入 + MaterialAssayStandardMethodDO materialAssayStandardMethod = BeanUtils.toBean(createReqVO, MaterialAssayStandardMethodDO.class); + materialAssayStandardMethodMapper.insert(materialAssayStandardMethod); + // 返回 + return BeanUtils.toBean(materialAssayStandardMethod, MaterialAssayStandardMethodRespVO.class); + } + + @Override + public void updateMaterialAssayStandardMethod(MaterialAssayStandardMethodSaveReqVO updateReqVO) { + // 校验存在 + validateMaterialAssayStandardMethodExists(updateReqVO.getId()); + // 更新 + MaterialAssayStandardMethodDO updateObj = BeanUtils.toBean(updateReqVO, MaterialAssayStandardMethodDO.class); + materialAssayStandardMethodMapper.updateById(updateObj); + } + + @Override + public void deleteMaterialAssayStandardMethod(Long id) { + // 校验存在 + validateMaterialAssayStandardMethodExists(id); + // 删除 + materialAssayStandardMethodMapper.deleteById(id); + } + + @Override + public void deleteMaterialAssayStandardMethodListByIds(List ids) { + // 校验存在 + validateMaterialAssayStandardMethodExists(ids); + // 删除 + materialAssayStandardMethodMapper.deleteByIds(ids); + } + + private void validateMaterialAssayStandardMethodExists(List ids) { + List list = materialAssayStandardMethodMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(MATERIAL_ASSAY_STANDARD_METHOD_NOT_EXISTS); + } + } + + private void validateMaterialAssayStandardMethodExists(Long id) { + if (materialAssayStandardMethodMapper.selectById(id) == null) { + throw exception(MATERIAL_ASSAY_STANDARD_METHOD_NOT_EXISTS); + } + } + + @Override + public MaterialAssayStandardMethodDO getMaterialAssayStandardMethod(Long id) { + return materialAssayStandardMethodMapper.selectById(id); + } + + @Override + public PageResult getMaterialAssayStandardMethodPage(MaterialAssayStandardMethodPageReqVO pageReqVO) { + return materialAssayStandardMethodMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardService.java new file mode 100644 index 0000000..3d79ae9 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardService.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardExtendDO; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 物料检测标准 Service 接口 + * + * @author 后台管理 + */ +public interface MaterialAssayStandardService { + + List queryByBaseSampleID(Long baseSampleID); + + + /** + * 创建物料检测标准 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + MaterialAssayStandardRespVO createMaterialAssayStandard(@Valid MaterialAssayStandardSaveReqVO createReqVO); + + /** + * 更新物料检测标准 + * + * @param updateReqVO 更新信息 + */ + void updateMaterialAssayStandard(@Valid MaterialAssayStandardSaveReqVO updateReqVO); + + /** + * 删除物料检测标准 + * + * @param id 编号 + */ + void deleteMaterialAssayStandard(Long id); + + /** + * 批量删除物料检测标准 + * + * @param ids 编号 + */ + void deleteMaterialAssayStandardListByIds(List ids); + + /** + * 获得物料检测标准 + * + * @param id 编号 + * @return 物料检测标准 + */ + MaterialAssayStandardDO getMaterialAssayStandard(Long id); + + /** + * 获得物料检测标准分页 + * + * @param pageReqVO 分页查询 + * @return 物料检测标准分页 + */ + PageResult getMaterialAssayStandardPage(MaterialAssayStandardPageReqVO pageReqVO); + + PageResult getMaterialAssayStandardPageWithExtend(MaterialAssayStandardPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardServiceImpl.java new file mode 100644 index 0000000..51742f2 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardServiceImpl.java @@ -0,0 +1,111 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardExtendDO; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.MaterialAssayStandardMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.MATERIAL_ASSAY_STANDARD_NOT_EXISTS; + +/** + * 物料检测标准 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class MaterialAssayStandardServiceImpl implements MaterialAssayStandardService { + + + + @Resource private MaterialAssayStandardMapper materialAssayStandardMapper; + + @Override + public List queryByBaseSampleID(Long baseSampleID) { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(MaterialAssayStandardDO::getBaseSampleId, baseSampleID); + return materialAssayStandardMapper.selectList(query); + } + + @Override + public MaterialAssayStandardRespVO createMaterialAssayStandard(MaterialAssayStandardSaveReqVO createReqVO) { + // 插入 + MaterialAssayStandardDO materialAssayStandard = BeanUtils.toBean(createReqVO, MaterialAssayStandardDO.class); + materialAssayStandardMapper.insert(materialAssayStandard); + // 返回 + return BeanUtils.toBean(materialAssayStandard, MaterialAssayStandardRespVO.class); + } + + @Override + public void updateMaterialAssayStandard(MaterialAssayStandardSaveReqVO updateReqVO) { + // 校验存在 + validateMaterialAssayStandardExists(updateReqVO.getId()); + // 更新 + MaterialAssayStandardDO updateObj = BeanUtils.toBean(updateReqVO, MaterialAssayStandardDO.class); + materialAssayStandardMapper.updateById(updateObj); + } + + @Override + public void deleteMaterialAssayStandard(Long id) { + // 校验存在 + validateMaterialAssayStandardExists(id); + // 删除 + materialAssayStandardMapper.deleteById(id); + } + + @Override + public void deleteMaterialAssayStandardListByIds(List ids) { + // 校验存在 + validateMaterialAssayStandardExists(ids); + // 删除 + materialAssayStandardMapper.deleteByIds(ids); + } + + private void validateMaterialAssayStandardExists(List ids) { + List list = materialAssayStandardMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(MATERIAL_ASSAY_STANDARD_NOT_EXISTS); + } + } + + private void validateMaterialAssayStandardExists(Long id) { + if (materialAssayStandardMapper.selectById(id) == null) { + throw exception(MATERIAL_ASSAY_STANDARD_NOT_EXISTS); + } + } + + @Override + public MaterialAssayStandardDO getMaterialAssayStandard(Long id) { + return materialAssayStandardMapper.selectById(id); + } + + @Override + public PageResult getMaterialAssayStandardPage(MaterialAssayStandardPageReqVO pageReqVO) { + return materialAssayStandardMapper.selectPage(pageReqVO); + } + + @Override + public PageResult getMaterialAssayStandardPageWithExtend(MaterialAssayStandardPageReqVO pageReqVO) { + IPage page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize()); + Page pageList = materialAssayStandardMapper.selectPageWithExtend(page, pageReqVO); + PageResult ret = new PageResult<>(pageList.getRecords(), pageList.getTotal()); + return ret; + } +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionaryParameterController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionaryParameterController.java new file mode 100644 index 0000000..5910b79 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionaryParameterController.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.admin; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterPageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryParameterDO; +import cn.iocoder.yudao.module.qms.business.dic.service.DictionaryParameterService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 检测参数字典") +@RestController +@RequestMapping("/qms/dictionary-parameter") +@Validated +public class DictionaryParameterController implements BusinessControllerMarker { + + + @Resource + private DictionaryParameterService dictionaryParameterService; + + @PostMapping("/create") + @Operation(summary = "创建检测参数字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-parameter:create')") + public CommonResult createDictionaryParameter(@Valid @RequestBody DictionaryParameterSaveReqVO createReqVO) { + return success(dictionaryParameterService.createDictionaryParameter(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检测参数字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-parameter:update')") + public CommonResult updateDictionaryParameter(@Valid @RequestBody DictionaryParameterSaveReqVO updateReqVO) { + dictionaryParameterService.updateDictionaryParameter(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测参数字典") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:dictionary-parameter:delete')") + public CommonResult deleteDictionaryParameter(@RequestParam("id") Long id) { + dictionaryParameterService.deleteDictionaryParameter(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测参数字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-parameter:delete')") + public CommonResult deleteDictionaryParameterList(@RequestBody BatchDeleteReqVO req) { + dictionaryParameterService.deleteDictionaryParameterListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测参数字典") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:dictionary-parameter:query')") + public CommonResult getDictionaryParameter(@RequestParam("id") Long id) { + DictionaryParameterDO dictionaryParameter = dictionaryParameterService.getDictionaryParameter(id); + return success(BeanUtils.toBean(dictionaryParameter, DictionaryParameterRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检测参数字典分页") + @PreAuthorize("@ss.hasPermission('qms:dictionary-parameter:query')") + public CommonResult> getDictionaryParameterPage(@Valid DictionaryParameterPageReqVO pageReqVO) { + PageResult pageResult = dictionaryParameterService.getDictionaryParameterPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DictionaryParameterRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测参数字典 Excel") + @PreAuthorize("@ss.hasPermission('qms:dictionary-parameter:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDictionaryParameterExcel(@Valid DictionaryParameterPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = dictionaryParameterService.getDictionaryParameterPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测参数字典.xls", "数据", DictionaryParameterRespVO.class, + BeanUtils.toBean(list, DictionaryParameterRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionaryProjectController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionaryProjectController.java new file mode 100644 index 0000000..f745ec7 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionaryProjectController.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.admin; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectPageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryProjectDO; +import cn.iocoder.yudao.module.qms.business.dic.service.DictionaryProjectService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 检测项目字典") +@RestController +@RequestMapping("/qms/dictionary-project") +@Validated +public class DictionaryProjectController implements BusinessControllerMarker { + + + @Resource + private DictionaryProjectService dictionaryProjectService; + + @PostMapping("/create") + @Operation(summary = "创建检测项目字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-project:create')") + public CommonResult createDictionaryProject(@Valid @RequestBody DictionaryProjectSaveReqVO createReqVO) { + return success(dictionaryProjectService.createDictionaryProject(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检测项目字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-project:update')") + public CommonResult updateDictionaryProject(@Valid @RequestBody DictionaryProjectSaveReqVO updateReqVO) { + dictionaryProjectService.updateDictionaryProject(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测项目字典") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:dictionary-project:delete')") + public CommonResult deleteDictionaryProject(@RequestParam("id") Long id) { + dictionaryProjectService.deleteDictionaryProject(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测项目字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-project:delete')") + public CommonResult deleteDictionaryProjectList(@RequestBody BatchDeleteReqVO req) { + dictionaryProjectService.deleteDictionaryProjectListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测项目字典") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:dictionary-project:query')") + public CommonResult getDictionaryProject(@RequestParam("id") Long id) { + DictionaryProjectDO dictionaryProject = dictionaryProjectService.getDictionaryProject(id); + return success(BeanUtils.toBean(dictionaryProject, DictionaryProjectRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检测项目字典分页") + @PreAuthorize("@ss.hasPermission('qms:dictionary-project:query')") + public CommonResult> getDictionaryProjectPage(@Valid DictionaryProjectPageReqVO pageReqVO) { + PageResult pageResult = dictionaryProjectService.getDictionaryProjectPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DictionaryProjectRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测项目字典 Excel") + @PreAuthorize("@ss.hasPermission('qms:dictionary-project:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDictionaryProjectExcel(@Valid DictionaryProjectPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = dictionaryProjectService.getDictionaryProjectPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测项目字典.xls", "数据", DictionaryProjectRespVO.class, + BeanUtils.toBean(list, DictionaryProjectRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionarySampleFlowNodeController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionarySampleFlowNodeController.java new file mode 100644 index 0000000..ec340f6 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionarySampleFlowNodeController.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.admin; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodeRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleFlowNodeDO; +import cn.iocoder.yudao.module.qms.business.dic.service.DictionarySampleFlowNodeService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 样品流程节点字典") +@RestController +@RequestMapping("/qms/dictionary-sample-flow-node") +@Validated +public class DictionarySampleFlowNodeController implements BusinessControllerMarker { + + + @Resource + private DictionarySampleFlowNodeService dictionarySampleFlowNodeService; + + @PostMapping("/create") + @Operation(summary = "创建样品流程节点字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-flow-node:create')") + public CommonResult createDictionarySampleFlowNode(@Valid @RequestBody DictionarySampleFlowNodeSaveReqVO createReqVO) { + return success(dictionarySampleFlowNodeService.createDictionarySampleFlowNode(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新样品流程节点字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-flow-node:update')") + public CommonResult updateDictionarySampleFlowNode(@Valid @RequestBody DictionarySampleFlowNodeSaveReqVO updateReqVO) { + dictionarySampleFlowNodeService.updateDictionarySampleFlowNode(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除样品流程节点字典") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-flow-node:delete')") + public CommonResult deleteDictionarySampleFlowNode(@RequestParam("id") Long id) { + dictionarySampleFlowNodeService.deleteDictionarySampleFlowNode(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除样品流程节点字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-flow-node:delete')") + public CommonResult deleteDictionarySampleFlowNodeList(@RequestBody BatchDeleteReqVO req) { + dictionarySampleFlowNodeService.deleteDictionarySampleFlowNodeListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得样品流程节点字典") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-flow-node:query')") + public CommonResult getDictionarySampleFlowNode(@RequestParam("id") Long id) { + DictionarySampleFlowNodeDO dictionarySampleFlowNode = dictionarySampleFlowNodeService.getDictionarySampleFlowNode(id); + return success(BeanUtils.toBean(dictionarySampleFlowNode, DictionarySampleFlowNodeRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得样品流程节点字典分页") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-flow-node:query')") + public CommonResult> getDictionarySampleFlowNodePage(@Valid DictionarySampleFlowNodePageReqVO pageReqVO) { + PageResult pageResult = dictionarySampleFlowNodeService.getDictionarySampleFlowNodePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DictionarySampleFlowNodeRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出样品流程节点字典 Excel") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-flow-node:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDictionarySampleFlowNodeExcel(@Valid DictionarySampleFlowNodePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = dictionarySampleFlowNodeService.getDictionarySampleFlowNodePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "样品流程节点字典.xls", "数据", DictionarySampleFlowNodeRespVO.class, + BeanUtils.toBean(list, DictionarySampleFlowNodeRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionarySampleTypeController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionarySampleTypeController.java new file mode 100644 index 0000000..0f8e7c3 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionarySampleTypeController.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.admin; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypeRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleTypeDO; +import cn.iocoder.yudao.module.qms.business.dic.service.DictionarySampleTypeService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 样品类型字典") +@RestController +@RequestMapping("/qms/dictionary-sample-type") +@Validated +public class DictionarySampleTypeController implements BusinessControllerMarker { + + + @Resource + private DictionarySampleTypeService dictionarySampleTypeService; + + @PostMapping("/create") + @Operation(summary = "创建样品类型字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-type:create')") + public CommonResult createDictionarySampleType(@Valid @RequestBody DictionarySampleTypeSaveReqVO createReqVO) { + return success(dictionarySampleTypeService.createDictionarySampleType(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新样品类型字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-type:update')") + public CommonResult updateDictionarySampleType(@Valid @RequestBody DictionarySampleTypeSaveReqVO updateReqVO) { + dictionarySampleTypeService.updateDictionarySampleType(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除样品类型字典") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-type:delete')") + public CommonResult deleteDictionarySampleType(@RequestParam("id") Long id) { + dictionarySampleTypeService.deleteDictionarySampleType(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除样品类型字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-type:delete')") + public CommonResult deleteDictionarySampleTypeList(@RequestBody BatchDeleteReqVO req) { + dictionarySampleTypeService.deleteDictionarySampleTypeListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得样品类型字典") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-type:query')") + public CommonResult getDictionarySampleType(@RequestParam("id") Long id) { + DictionarySampleTypeDO dictionarySampleType = dictionarySampleTypeService.getDictionarySampleType(id); + return success(BeanUtils.toBean(dictionarySampleType, DictionarySampleTypeRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得样品类型字典分页") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-type:query')") + public CommonResult> getDictionarySampleTypePage(@Valid DictionarySampleTypePageReqVO pageReqVO) { + PageResult pageResult = dictionarySampleTypeService.getDictionarySampleTypePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DictionarySampleTypeRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出样品类型字典 Excel") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-type:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDictionarySampleTypeExcel(@Valid DictionarySampleTypePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = dictionarySampleTypeService.getDictionarySampleTypePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "样品类型字典.xls", "数据", DictionarySampleTypeRespVO.class, + BeanUtils.toBean(list, DictionarySampleTypeRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterPageReqVO.java new file mode 100644 index 0000000..223b9dc --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterPageReqVO.java @@ -0,0 +1,59 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 检测参数字典分页 Request VO") +@Data +public class DictionaryParameterPageReqVO extends PageParam { + + @Schema(description = "参数序号") + private Integer no; + + @Schema(description = "名称", example = "赵六") + private String name; + + @Schema(description = "键值") + private String key; + + @Schema(description = "检测单位ID", example = "19642") + private Long unitId; + + @Schema(description = "单位") + private String unit; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", example = "1") + private Integer dataType; + + @Schema(description = "小数位") + private Integer decimal; + + @Schema(description = "排序") + private Integer sort; + + @Schema(description = "计算公式") + private String formula; + + @Schema(description = "填写方式,【字典】【jy_dictionary_parameter_Filling_way】人工录入,天平采集,计算") + private String fillingWay; + + @Schema(description = "参数简称", example = "李四") + private String shortName; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterRespVO.java new file mode 100644 index 0000000..5f949ab --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterRespVO.java @@ -0,0 +1,75 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 检测参数字典 Response VO") +@Data +@ExcelIgnoreUnannotated +public class DictionaryParameterRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20080") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "参数序号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("参数序号") + private Integer no; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @ExcelProperty("名称") + private String name; + + @Schema(description = "键值") + @ExcelProperty("键值") + private String key; + + @Schema(description = "检测单位ID", example = "19642") + @ExcelProperty("检测单位ID") + private Long unitId; + + @Schema(description = "单位") + @ExcelProperty("单位") + private String unit; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间") + private Integer dataType; + + @Schema(description = "小数位") + @ExcelProperty("小数位") + private Integer decimal; + + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("排序") + private Integer sort; + + @Schema(description = "计算公式") + @ExcelProperty("计算公式") + private String formula; + + @Schema(description = "填写方式,【字典】【jy_dictionary_parameter_Filling_way】人工录入,天平采集,计算", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("填写方式,【字典】【jy_dictionary_parameter_Filling_way】人工录入,天平采集,计算") + private String fillingWay; + + @Schema(description = "参数简称", example = "李四") + @ExcelProperty("参数简称") + private String shortName; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterSaveReqVO.java new file mode 100644 index 0000000..be8d577 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterSaveReqVO.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - 检测参数字典新增/修改 Request VO") +@Data +public class DictionaryParameterSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20080") + private Long id; + + @Schema(description = "参数序号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "参数序号不能为空") + private Integer no; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @NotEmpty(message = "名称不能为空") + private String name; + + @Schema(description = "键值") + private String key; + + @Schema(description = "检测单位ID", example = "19642") + private Long unitId; + + @Schema(description = "单位") + private String unit; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间不能为空") + private Integer dataType; + + @Schema(description = "小数位") + private Integer decimal; + + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "排序不能为空") + private Integer sort; + + @Schema(description = "计算公式") + private String formula; + + @Schema(description = "填写方式,【字典】【jy_dictionary_parameter_Filling_way】人工录入,天平采集,计算", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "填写方式,【字典】【jy_dictionary_parameter_Filling_way】人工录入,天平采集,计算不能为空") + private String fillingWay; + + @Schema(description = "参数简称", example = "李四") + private String shortName; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectPageReqVO.java new file mode 100644 index 0000000..9535665 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectPageReqVO.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 检测项目字典分页 Request VO") +@Data +public class DictionaryProjectPageReqVO extends PageParam { + + @Schema(description = "检测项目代码") + private String code; + + @Schema(description = "检测项目名称", example = "三氧化二铝") + private String name; + + @Schema(description = "检测项目缩写", example = "Al2O3") + private String simpleName; + + @Schema(description = "检测项目显示名称", example = "Al2O3") + private String showName; + + @Schema(description = "键值") + private String key; + + @Schema(description = "物料属性ID", example = "15500") + private Long materialPropertiesId; + + @Schema(description = "物料属性编码") + private String materialPropertiesCode; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectRespVO.java new file mode 100644 index 0000000..38b270a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectRespVO.java @@ -0,0 +1,59 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 检测项目字典 Response VO") +@Data +@ExcelIgnoreUnannotated +public class DictionaryProjectRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16336") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "检测项目代码") + @ExcelProperty("检测项目代码") + private String code; + + @Schema(description = "检测项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "三氧化二铝") + @ExcelProperty("检测项目名称") + private String name; + + @Schema(description = "检测项目缩写", requiredMode = Schema.RequiredMode.REQUIRED, example = "Al2O3") + @ExcelProperty("检测项目缩写") + private String simpleName; + + @Schema(description = "检测项目显示名称", example = "Al2O3") + @ExcelProperty("检测项目显示名称") + private String showName; + + @Schema(description = "键值") + @ExcelProperty("键值") + private String key; + + @Schema(description = "物料属性ID", example = "15500") + @ExcelProperty("物料属性ID") + private Long materialPropertiesId; + + @Schema(description = "物料属性编码") + @ExcelProperty("物料属性编码") + private String materialPropertiesCode; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectSaveReqVO.java new file mode 100644 index 0000000..bbbcf43 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectSaveReqVO.java @@ -0,0 +1,45 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import lombok.Data; + +@Schema(description = "管理后台 - 检测项目字典新增/修改 Request VO") +@Data +public class DictionaryProjectSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16336") + private Long id; + + @Schema(description = "检测项目代码") + private String code; + + @Schema(description = "检测项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "三氧化二铝") + @NotEmpty(message = "检测项目名称不能为空") + private String name; + + @Schema(description = "检测项目缩写", requiredMode = Schema.RequiredMode.REQUIRED, example = "Al2O3") + @NotEmpty(message = "检测项目缩写不能为空") + private String simpleName; + + @Schema(description = "检测项目显示名称", example = "Al2O3") + @NotEmpty(message = "检测项目显示名称不能为空") + private String showName; + + @Schema(description = "键值") + private String key; + + @Schema(description = "物料属性ID", example = "15500") + private Long materialPropertiesId; + + @Schema(description = "物料属性编码") + private String materialPropertiesCode; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodePageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodePageReqVO.java new file mode 100644 index 0000000..e8038e0 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodePageReqVO.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 样品流程节点字典分页 Request VO") +@Data +public class DictionarySampleFlowNodePageReqVO extends PageParam { + + @Schema(description = "键") + private String key; + + @Schema(description = "名称", example = "李四") + private String name; + + @Schema(description = "类型,主样、子样", example = "1") + private String type; + + @Schema(description = "代码") + private String code; + + @Schema(description = "默认事件") + private String defaultEvent; + + @Schema(description = "排序") + private Integer sort; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodeRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodeRespVO.java new file mode 100644 index 0000000..e2b70b5 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodeRespVO.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 样品流程节点字典 Response VO") +@Data +@ExcelIgnoreUnannotated +public class DictionarySampleFlowNodeRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17734") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "键") + @ExcelProperty("键") + private String key; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("名称") + private String name; + + @Schema(description = "类型,主样、子样", example = "1") + @ExcelProperty("类型,主样、子样") + private String type; + + @Schema(description = "代码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("代码") + private String code; + + @Schema(description = "默认事件") + @ExcelProperty("默认事件") + private String defaultEvent; + + @Schema(description = "排序") + private Integer sort; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodeSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodeSaveReqVO.java new file mode 100644 index 0000000..41fb69e --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodeSaveReqVO.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import lombok.Data; + +@Schema(description = "管理后台 - 样品流程节点字典新增/修改 Request VO") +@Data +public class DictionarySampleFlowNodeSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17734") + private Long id; + + @Schema(description = "键") + @NotEmpty(message = "键名不能为空") + private String key; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "名称不能为空") + private String name; + + @Schema(description = "类型,主样、子样", example = "1") + private String type; + + @Schema(description = "代码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "代码不能为空") + private String code; + + @Schema(description = "默认事件") + private String defaultEvent; + + @Schema(description = "排序") + private Integer sort; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypePageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypePageReqVO.java new file mode 100644 index 0000000..7fec477 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypePageReqVO.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 样品类型字典分页 Request VO") +@Data +public class DictionarySampleTypePageReqVO extends PageParam { + + @Schema(description = "父级ID", example = "8469") + private Long parentId; + + @Schema(description = "名称,结算样、生产样、西南铜委托样、商检委托样、内部委托样、抽查委托样、内审委托样等", example = "王五") + private String name; + + @Schema(description = "键") + private String key; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypeRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypeRespVO.java new file mode 100644 index 0000000..d05352b --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypeRespVO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 样品类型字典 Response VO") +@Data +@ExcelIgnoreUnannotated +public class DictionarySampleTypeRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28674") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "父级ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8469") + @ExcelProperty("父级ID") + private Long parentId; + + @Schema(description = "名称,结算样、生产样、西南铜委托样、商检委托样、内部委托样、抽查委托样、内审委托样等", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("名称,结算样、生产样、西南铜委托样、商检委托样、内部委托样、抽查委托样、内审委托样等") + private String name; + + @Schema(description = "键值", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("键值") + private String key; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypeSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypeSaveReqVO.java new file mode 100644 index 0000000..38c5533 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypeSaveReqVO.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - 样品类型字典新增/修改 Request VO") +@Data +public class DictionarySampleTypeSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28674") + private Long id; + + @Schema(description = "父级ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8469") + @NotNull(message = "父级ID不能为空") + private Long parentId; + + @Schema(description = "名称,结算样、生产样、西南铜委托样、商检委托样、内部委托样、抽查委托样、内审委托样等", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "名称,结算样、生产样、西南铜委托样、商检委托样、内部委托样、抽查委托样、内审委托样等不能为空") + private String name; + + @Schema(description = "键值", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "键值不能为空") + private String key; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionaryParameterDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionaryParameterDO.java new file mode 100644 index 0000000..4190fec --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionaryParameterDO.java @@ -0,0 +1,97 @@ +package cn.iocoder.yudao.module.qms.business.dic.dal.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; +/** +* 检测参数字典 DO +* +* @author 后台管理 +*/ +@TableName("t_dic_prm") +@KeySequence("t_dic_prm_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class DictionaryParameterDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 参数序号 + */ + @TableField("NO") + private Integer no; + /** + * 名称 + */ + @TableField("NAME") + private String name; + /** + * 键值 + */ + @TableField("KY") + private String key; + /** + * 检测单位ID + */ + @TableField("UNT_ID") + private Long unitId; + /** + * 单位 + */ + @TableField("UNT") + private String unit; + /** + * 数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间 + */ + @TableField("DAT_TP") + private Integer dataType; + /** + * 小数位 + */ + @TableField("DEC") + private Integer decimal; + /** + * 排序 + */ + @TableField("SRT") + private Integer sort; + /** + * 计算公式 + */ + @TableField("FMU") + private String formula; + /** + * 填写方式,【字典】【jy_dictionary_parameter_Filling_way】人工录入,天平采集,计算 + */ + @TableField("FIL_WY") + private String fillingWay; + /** + * 参数简称 + */ + @TableField("SHRT_NAME") + private String shortName; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionaryProjectDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionaryProjectDO.java new file mode 100644 index 0000000..1aa7642 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionaryProjectDO.java @@ -0,0 +1,77 @@ +package cn.iocoder.yudao.module.qms.business.dic.dal.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; +/** +* 检测项目字典 DO +* +* @author 后台管理 +*/ +@TableName("t_dic_prj") +@KeySequence("t_dic_prj_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class DictionaryProjectDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 检测项目代码 + */ + @TableField("CD") + private String code; + /** + * 检测项目名称 + */ + @TableField("NAME") + private String name; + /** + * 检测项目缩写 + */ + @TableField("SMPL_NAME") + private String simpleName; + /** + * 检测项目显示名称 + */ + @TableField("SHW_NAME") + private String showName; + /** + * 键值 + */ + @TableField("KY") + private String key; + /** + * 物料属性ID + */ + @TableField("MTRL_PRPS_ID") + private Long materialPropertiesId; + /** + * 物料属性编码 + */ + @TableField("MTRL_PRPS_CD") + private String materialPropertiesCode; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionarySampleFlowNodeDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionarySampleFlowNodeDO.java new file mode 100644 index 0000000..d089463 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionarySampleFlowNodeDO.java @@ -0,0 +1,72 @@ +package cn.iocoder.yudao.module.qms.business.dic.dal.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; +/** +* 样品流程节点字典 DO +* +* @author 后台管理 +*/ +@TableName("t_dic_smp_flw_nde") +@KeySequence("t_dic_smp_flw_nde_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class DictionarySampleFlowNodeDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * key + */ + @TableField("KY") + private String key; + /** + * 名称 + */ + @TableField("NAME") + private String name; + /** + * 类型,主样、子样 + */ + @TableField("TP") + private String type; + /** + * 代码 + */ + @TableField("CD") + private String code; + /** + * 默认事件 + */ + @TableField("DFT_EVN") + private String defaultEvent; + /** + * 排序 + */ + @TableField("SRT") + private Integer sort; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionarySampleTypeDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionarySampleTypeDO.java new file mode 100644 index 0000000..a024b2a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionarySampleTypeDO.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.qms.business.dic.dal.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; +/** +* 样品类型字典 DO +* +* @author 后台管理 +*/ +@TableName("t_dic_smp_tp") +@KeySequence("t_dic_smp_tp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class DictionarySampleTypeDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 父级ID + */ + @TableField("PRN_ID") + private Long parentId; + /** + * 名称,结算样、生产样、西南铜委托样、商检委托样、内部委托样、抽查委托样、内审委托样等 + */ + @TableField("NAME") + private String name; + /** + * 键值 + */ + @TableField("KY") + private String key; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryParameterMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryParameterMapper.java new file mode 100644 index 0000000..2100e1e --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryParameterMapper.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.qms.business.dic.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterPageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryParameterDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 检测参数字典 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface DictionaryParameterMapper extends BaseMapperX { + + default PageResult selectPage(DictionaryParameterPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(DictionaryParameterDO::getNo, reqVO.getNo()) + .likeIfPresent(DictionaryParameterDO::getName, reqVO.getName()) + .eqIfPresent(DictionaryParameterDO::getKey, reqVO.getKey()) + .eqIfPresent(DictionaryParameterDO::getUnitId, reqVO.getUnitId()) + .eqIfPresent(DictionaryParameterDO::getUnit, reqVO.getUnit()) + .eqIfPresent(DictionaryParameterDO::getDataType, reqVO.getDataType()) + .eqIfPresent(DictionaryParameterDO::getDecimal, reqVO.getDecimal()) + .eqIfPresent(DictionaryParameterDO::getSort, reqVO.getSort()) + .eqIfPresent(DictionaryParameterDO::getFormula, reqVO.getFormula()) + .eqIfPresent(DictionaryParameterDO::getFillingWay, reqVO.getFillingWay()) + .likeIfPresent(DictionaryParameterDO::getShortName, reqVO.getShortName()) + .eqIfPresent(DictionaryParameterDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(DictionaryParameterDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(DictionaryParameterDO::getRemark, reqVO.getRemark()) + .orderByDesc(DictionaryParameterDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryProjectMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryProjectMapper.java new file mode 100644 index 0000000..e99726c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryProjectMapper.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.qms.business.dic.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectPageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryProjectDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 检测项目字典 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface DictionaryProjectMapper extends BaseMapperX { + + default PageResult selectPage(DictionaryProjectPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(DictionaryProjectDO::getCode, reqVO.getCode()) + .likeIfPresent(DictionaryProjectDO::getName, reqVO.getName()) + .likeIfPresent(DictionaryProjectDO::getSimpleName, reqVO.getSimpleName()) + .eqIfPresent(DictionaryProjectDO::getKey, reqVO.getKey()) + .eqIfPresent(DictionaryProjectDO::getMaterialPropertiesId, reqVO.getMaterialPropertiesId()) + .eqIfPresent(DictionaryProjectDO::getMaterialPropertiesCode, reqVO.getMaterialPropertiesCode()) + .eqIfPresent(DictionaryProjectDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(DictionaryProjectDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(DictionaryProjectDO::getRemark, reqVO.getRemark()) + .orderByDesc(DictionaryProjectDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleFlowNodeMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleFlowNodeMapper.java new file mode 100644 index 0000000..aed30a7 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleFlowNodeMapper.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.qms.business.dic.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleFlowNodeDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 样品流程节点字典 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface DictionarySampleFlowNodeMapper extends BaseMapperX { + + default PageResult selectPage(DictionarySampleFlowNodePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(DictionarySampleFlowNodeDO::getName, reqVO.getName()) + .eqIfPresent(DictionarySampleFlowNodeDO::getType, reqVO.getType()) + .eqIfPresent(DictionarySampleFlowNodeDO::getCode, reqVO.getCode()) + .eqIfPresent(DictionarySampleFlowNodeDO::getDefaultEvent, reqVO.getDefaultEvent()) + .eqIfPresent(DictionarySampleFlowNodeDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(DictionarySampleFlowNodeDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(DictionarySampleFlowNodeDO::getRemark, reqVO.getRemark()) + .orderByDesc(DictionarySampleFlowNodeDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleTypeMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleTypeMapper.java new file mode 100644 index 0000000..ff04dac --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleTypeMapper.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.module.qms.business.dic.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleTypeDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 样品类型字典 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface DictionarySampleTypeMapper extends BaseMapperX { + + default PageResult selectPage(DictionarySampleTypePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(DictionarySampleTypeDO::getParentId, reqVO.getParentId()) + .likeIfPresent(DictionarySampleTypeDO::getName, reqVO.getName()) + .eqIfPresent(DictionarySampleTypeDO::getKey, reqVO.getKey()) + .eqIfPresent(DictionarySampleTypeDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(DictionarySampleTypeDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(DictionarySampleTypeDO::getRemark, reqVO.getRemark()) + .orderByDesc(DictionarySampleTypeDO::getId)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryParameterService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryParameterService.java new file mode 100644 index 0000000..6b9d8b3 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryParameterService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterPageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryParameterDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 检测参数字典 Service 接口 + * + * @author 后台管理 + */ +public interface DictionaryParameterService { + + /** + * 创建检测参数字典 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + DictionaryParameterRespVO createDictionaryParameter(@Valid DictionaryParameterSaveReqVO createReqVO); + + /** + * 更新检测参数字典 + * + * @param updateReqVO 更新信息 + */ + void updateDictionaryParameter(@Valid DictionaryParameterSaveReqVO updateReqVO); + + /** + * 删除检测参数字典 + * + * @param id 编号 + */ + void deleteDictionaryParameter(Long id); + + /** + * 批量删除检测参数字典 + * + * @param ids 编号 + */ + void deleteDictionaryParameterListByIds(List ids); + + /** + * 获得检测参数字典 + * + * @param id 编号 + * @return 检测参数字典 + */ + DictionaryParameterDO getDictionaryParameter(Long id); + + /** + * 获得检测参数字典分页 + * + * @param pageReqVO 分页查询 + * @return 检测参数字典分页 + */ + PageResult getDictionaryParameterPage(DictionaryParameterPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryParameterServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryParameterServiceImpl.java new file mode 100644 index 0000000..25b21f7 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryParameterServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterPageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryParameterDO; +import cn.iocoder.yudao.module.qms.business.dic.dal.mapper.DictionaryParameterMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.DICTIONARY_PARAMETER_NOT_EXISTS; + +/** + * 检测参数字典 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class DictionaryParameterServiceImpl implements DictionaryParameterService { + + @Resource + private DictionaryParameterMapper dictionaryParameterMapper; + + @Override + public DictionaryParameterRespVO createDictionaryParameter(DictionaryParameterSaveReqVO createReqVO) { + // 插入 + DictionaryParameterDO dictionaryParameter = BeanUtils.toBean(createReqVO, DictionaryParameterDO.class); + dictionaryParameterMapper.insert(dictionaryParameter); + // 返回 + return BeanUtils.toBean(dictionaryParameter, DictionaryParameterRespVO.class); + } + + @Override + public void updateDictionaryParameter(DictionaryParameterSaveReqVO updateReqVO) { + // 校验存在 + validateDictionaryParameterExists(updateReqVO.getId()); + // 更新 + DictionaryParameterDO updateObj = BeanUtils.toBean(updateReqVO, DictionaryParameterDO.class); + dictionaryParameterMapper.updateById(updateObj); + } + + @Override + public void deleteDictionaryParameter(Long id) { + // 校验存在 + validateDictionaryParameterExists(id); + // 删除 + dictionaryParameterMapper.deleteById(id); + } + + @Override + public void deleteDictionaryParameterListByIds(List ids) { + // 校验存在 + validateDictionaryParameterExists(ids); + // 删除 + dictionaryParameterMapper.deleteByIds(ids); + } + + private void validateDictionaryParameterExists(List ids) { + List list = dictionaryParameterMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(DICTIONARY_PARAMETER_NOT_EXISTS); + } + } + + private void validateDictionaryParameterExists(Long id) { + if (dictionaryParameterMapper.selectById(id) == null) { + throw exception(DICTIONARY_PARAMETER_NOT_EXISTS); + } + } + + @Override + public DictionaryParameterDO getDictionaryParameter(Long id) { + return dictionaryParameterMapper.selectById(id); + } + + @Override + public PageResult getDictionaryParameterPage(DictionaryParameterPageReqVO pageReqVO) { + return dictionaryParameterMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryProjectService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryProjectService.java new file mode 100644 index 0000000..342eb68 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryProjectService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectPageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryProjectDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 检测项目字典 Service 接口 + * + * @author 后台管理 + */ +public interface DictionaryProjectService { + + /** + * 创建检测项目字典 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + DictionaryProjectRespVO createDictionaryProject(@Valid DictionaryProjectSaveReqVO createReqVO); + + /** + * 更新检测项目字典 + * + * @param updateReqVO 更新信息 + */ + void updateDictionaryProject(@Valid DictionaryProjectSaveReqVO updateReqVO); + + /** + * 删除检测项目字典 + * + * @param id 编号 + */ + void deleteDictionaryProject(Long id); + + /** + * 批量删除检测项目字典 + * + * @param ids 编号 + */ + void deleteDictionaryProjectListByIds(List ids); + + /** + * 获得检测项目字典 + * + * @param id 编号 + * @return 检测项目字典 + */ + DictionaryProjectDO getDictionaryProject(Long id); + + /** + * 获得检测项目字典分页 + * + * @param pageReqVO 分页查询 + * @return 检测项目字典分页 + */ + PageResult getDictionaryProjectPage(DictionaryProjectPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryProjectServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryProjectServiceImpl.java new file mode 100644 index 0000000..87746f1 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryProjectServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectPageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryProjectDO; +import cn.iocoder.yudao.module.qms.business.dic.dal.mapper.DictionaryProjectMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.DICTIONARY_PROJECT_NOT_EXISTS; + +/** + * 检测项目字典 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class DictionaryProjectServiceImpl implements DictionaryProjectService { + + @Resource + private DictionaryProjectMapper dictionaryProjectMapper; + + @Override + public DictionaryProjectRespVO createDictionaryProject(DictionaryProjectSaveReqVO createReqVO) { + // 插入 + DictionaryProjectDO dictionaryProject = BeanUtils.toBean(createReqVO, DictionaryProjectDO.class); + dictionaryProjectMapper.insert(dictionaryProject); + // 返回 + return BeanUtils.toBean(dictionaryProject, DictionaryProjectRespVO.class); + } + + @Override + public void updateDictionaryProject(DictionaryProjectSaveReqVO updateReqVO) { + // 校验存在 + validateDictionaryProjectExists(updateReqVO.getId()); + // 更新 + DictionaryProjectDO updateObj = BeanUtils.toBean(updateReqVO, DictionaryProjectDO.class); + dictionaryProjectMapper.updateById(updateObj); + } + + @Override + public void deleteDictionaryProject(Long id) { + // 校验存在 + validateDictionaryProjectExists(id); + // 删除 + dictionaryProjectMapper.deleteById(id); + } + + @Override + public void deleteDictionaryProjectListByIds(List ids) { + // 校验存在 + validateDictionaryProjectExists(ids); + // 删除 + dictionaryProjectMapper.deleteByIds(ids); + } + + private void validateDictionaryProjectExists(List ids) { + List list = dictionaryProjectMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(DICTIONARY_PROJECT_NOT_EXISTS); + } + } + + private void validateDictionaryProjectExists(Long id) { + if (dictionaryProjectMapper.selectById(id) == null) { + throw exception(DICTIONARY_PROJECT_NOT_EXISTS); + } + } + + @Override + public DictionaryProjectDO getDictionaryProject(Long id) { + return dictionaryProjectMapper.selectById(id); + } + + @Override + public PageResult getDictionaryProjectPage(DictionaryProjectPageReqVO pageReqVO) { + return dictionaryProjectMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleFlowNodeService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleFlowNodeService.java new file mode 100644 index 0000000..00730f8 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleFlowNodeService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodeRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleFlowNodeDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 样品流程节点字典 Service 接口 + * + * @author 后台管理 + */ +public interface DictionarySampleFlowNodeService { + + /** + * 创建样品流程节点字典 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + DictionarySampleFlowNodeRespVO createDictionarySampleFlowNode(@Valid DictionarySampleFlowNodeSaveReqVO createReqVO); + + /** + * 更新样品流程节点字典 + * + * @param updateReqVO 更新信息 + */ + void updateDictionarySampleFlowNode(@Valid DictionarySampleFlowNodeSaveReqVO updateReqVO); + + /** + * 删除样品流程节点字典 + * + * @param id 编号 + */ + void deleteDictionarySampleFlowNode(Long id); + + /** + * 批量删除样品流程节点字典 + * + * @param ids 编号 + */ + void deleteDictionarySampleFlowNodeListByIds(List ids); + + /** + * 获得样品流程节点字典 + * + * @param id 编号 + * @return 样品流程节点字典 + */ + DictionarySampleFlowNodeDO getDictionarySampleFlowNode(Long id); + + /** + * 获得样品流程节点字典分页 + * + * @param pageReqVO 分页查询 + * @return 样品流程节点字典分页 + */ + PageResult getDictionarySampleFlowNodePage(DictionarySampleFlowNodePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleFlowNodeServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleFlowNodeServiceImpl.java new file mode 100644 index 0000000..d0ad5b9 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleFlowNodeServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodeRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleFlowNodeDO; +import cn.iocoder.yudao.module.qms.business.dic.dal.mapper.DictionarySampleFlowNodeMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.DICTIONARY_SAMPLE_FLOW_NODE_NOT_EXISTS; + +/** + * 样品流程节点字典 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class DictionarySampleFlowNodeServiceImpl implements DictionarySampleFlowNodeService { + + @Resource + private DictionarySampleFlowNodeMapper dictionarySampleFlowNodeMapper; + + @Override + public DictionarySampleFlowNodeRespVO createDictionarySampleFlowNode(DictionarySampleFlowNodeSaveReqVO createReqVO) { + // 插入 + DictionarySampleFlowNodeDO dictionarySampleFlowNode = BeanUtils.toBean(createReqVO, DictionarySampleFlowNodeDO.class); + dictionarySampleFlowNodeMapper.insert(dictionarySampleFlowNode); + // 返回 + return BeanUtils.toBean(dictionarySampleFlowNode, DictionarySampleFlowNodeRespVO.class); + } + + @Override + public void updateDictionarySampleFlowNode(DictionarySampleFlowNodeSaveReqVO updateReqVO) { + // 校验存在 + validateDictionarySampleFlowNodeExists(updateReqVO.getId()); + // 更新 + DictionarySampleFlowNodeDO updateObj = BeanUtils.toBean(updateReqVO, DictionarySampleFlowNodeDO.class); + dictionarySampleFlowNodeMapper.updateById(updateObj); + } + + @Override + public void deleteDictionarySampleFlowNode(Long id) { + // 校验存在 + validateDictionarySampleFlowNodeExists(id); + // 删除 + dictionarySampleFlowNodeMapper.deleteById(id); + } + + @Override + public void deleteDictionarySampleFlowNodeListByIds(List ids) { + // 校验存在 + validateDictionarySampleFlowNodeExists(ids); + // 删除 + dictionarySampleFlowNodeMapper.deleteByIds(ids); + } + + private void validateDictionarySampleFlowNodeExists(List ids) { + List list = dictionarySampleFlowNodeMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(DICTIONARY_SAMPLE_FLOW_NODE_NOT_EXISTS); + } + } + + private void validateDictionarySampleFlowNodeExists(Long id) { + if (dictionarySampleFlowNodeMapper.selectById(id) == null) { + throw exception(DICTIONARY_SAMPLE_FLOW_NODE_NOT_EXISTS); + } + } + + @Override + public DictionarySampleFlowNodeDO getDictionarySampleFlowNode(Long id) { + return dictionarySampleFlowNodeMapper.selectById(id); + } + + @Override + public PageResult getDictionarySampleFlowNodePage(DictionarySampleFlowNodePageReqVO pageReqVO) { + return dictionarySampleFlowNodeMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleTypeService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleTypeService.java new file mode 100644 index 0000000..2c6c02a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleTypeService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypeRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleTypeDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 样品类型字典 Service 接口 + * + * @author 后台管理 + */ +public interface DictionarySampleTypeService { + + /** + * 创建样品类型字典 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + DictionarySampleTypeRespVO createDictionarySampleType(@Valid DictionarySampleTypeSaveReqVO createReqVO); + + /** + * 更新样品类型字典 + * + * @param updateReqVO 更新信息 + */ + void updateDictionarySampleType(@Valid DictionarySampleTypeSaveReqVO updateReqVO); + + /** + * 删除样品类型字典 + * + * @param id 编号 + */ + void deleteDictionarySampleType(Long id); + + /** + * 批量删除样品类型字典 + * + * @param ids 编号 + */ + void deleteDictionarySampleTypeListByIds(List ids); + + /** + * 获得样品类型字典 + * + * @param id 编号 + * @return 样品类型字典 + */ + DictionarySampleTypeDO getDictionarySampleType(Long id); + + /** + * 获得样品类型字典分页 + * + * @param pageReqVO 分页查询 + * @return 样品类型字典分页 + */ + PageResult getDictionarySampleTypePage(DictionarySampleTypePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleTypeServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleTypeServiceImpl.java new file mode 100644 index 0000000..71abbb2 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleTypeServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypeRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleTypeDO; +import cn.iocoder.yudao.module.qms.business.dic.dal.mapper.DictionarySampleTypeMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.DICTIONARY_SAMPLE_TYPE_NOT_EXISTS; + +/** + * 样品类型字典 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class DictionarySampleTypeServiceImpl implements DictionarySampleTypeService { + + @Resource + private DictionarySampleTypeMapper dictionarySampleTypeMapper; + + @Override + public DictionarySampleTypeRespVO createDictionarySampleType(DictionarySampleTypeSaveReqVO createReqVO) { + // 插入 + DictionarySampleTypeDO dictionarySampleType = BeanUtils.toBean(createReqVO, DictionarySampleTypeDO.class); + dictionarySampleTypeMapper.insert(dictionarySampleType); + // 返回 + return BeanUtils.toBean(dictionarySampleType, DictionarySampleTypeRespVO.class); + } + + @Override + public void updateDictionarySampleType(DictionarySampleTypeSaveReqVO updateReqVO) { + // 校验存在 + validateDictionarySampleTypeExists(updateReqVO.getId()); + // 更新 + DictionarySampleTypeDO updateObj = BeanUtils.toBean(updateReqVO, DictionarySampleTypeDO.class); + dictionarySampleTypeMapper.updateById(updateObj); + } + + @Override + public void deleteDictionarySampleType(Long id) { + // 校验存在 + validateDictionarySampleTypeExists(id); + // 删除 + dictionarySampleTypeMapper.deleteById(id); + } + + @Override + public void deleteDictionarySampleTypeListByIds(List ids) { + // 校验存在 + validateDictionarySampleTypeExists(ids); + // 删除 + dictionarySampleTypeMapper.deleteByIds(ids); + } + + private void validateDictionarySampleTypeExists(List ids) { + List list = dictionarySampleTypeMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(DICTIONARY_SAMPLE_TYPE_NOT_EXISTS); + } + } + + private void validateDictionarySampleTypeExists(Long id) { + if (dictionarySampleTypeMapper.selectById(id) == null) { + throw exception(DICTIONARY_SAMPLE_TYPE_NOT_EXISTS); + } + } + + @Override + public DictionarySampleTypeDO getDictionarySampleType(Long id) { + return dictionarySampleTypeMapper.selectById(id); + } + + @Override + public PageResult getDictionarySampleTypePage(DictionarySampleTypePageReqVO pageReqVO) { + return dictionarySampleTypeMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataCollectionController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataCollectionController.java new file mode 100644 index 0000000..a572527 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataCollectionController.java @@ -0,0 +1,129 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.admin; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.annotation.FileUploadController; +import cn.iocoder.yudao.framework.business.controller.AbstractFileUploadController; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionDO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionRespVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionSaveReqVO; +import cn.iocoder.yudao.module.qms.common.data.service.DataCollectionService; +import cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 数据集") +@RestController +@RequestMapping("/qms/common/data/data-collection") +@Validated +@FileUploadController(source = "common.data.datacollection") +public class DataCollectionController extends AbstractFileUploadController implements BusinessControllerMarker{ + +// static { +// FileUploadController annotation = DemoContractController.class.getAnnotation(FileUploadController.class); +// if (annotation != null) { +// setFileUploadInfo(annotation); +// } +// } + + @Resource + private DataCollectionService dataCollectionService; + + @PostMapping("/create-temp-data") + @Operation(summary = "创建临时数据集") + public CommonResult createTempData(@Valid @RequestBody DataCollectionSaveReqVO vo) { + vo.setCancelFlag(-1); + vo.setNodeType(DataTypeConstant.DATA_TYPE_DATA); + vo.setVersion(1); + return success(dataCollectionService.createDataCollection(vo)); + } + + @PostMapping("/saveDataCollection") + @Operation(summary = "保存数据集") + @PreAuthorize("@ss.hasPermission('qms:data-collection:create')") + public CommonResult saveDataCollection(@Valid @RequestBody DataCollectionSaveReqVO createReqVO) { + return dataCollectionService.saveDataCollection(createReqVO); + } + + @PostMapping("/saveClassify") + @Operation(summary = "保存数据集分类") + @PreAuthorize("@ss.hasPermission('qms:data-collection:create')") + public CommonResult saveClassify(@Valid @RequestBody DataCollectionSaveReqVO createReqVO) { + return dataCollectionService.saveClassify(createReqVO); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除数据集") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:data-collection:delete')") + public CommonResult deleteDataCollection(@RequestParam("id") Long id) { + dataCollectionService.deleteDataCollection(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除数据集") + @PreAuthorize("@ss.hasPermission('qms:data-collection:delete')") + public CommonResult deleteDataCollectionList(@RequestBody BatchDeleteReqVO req) { + dataCollectionService.deleteDataCollectionListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得数据集") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:data-collection:query')") + public CommonResult getDataCollection(@RequestParam("id") Long id) { + DataCollectionDO dataCollection = dataCollectionService.getDataCollection(id); + return success(BeanUtils.toBean(dataCollection, DataCollectionRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得数据集分页") + public CommonResult> getDataCollectionPage(@Valid DataCollectionPageReqVO pageReqVO) { + PageResult pageResult = dataCollectionService.getDataCollectionPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DataCollectionRespVO.class)); + } + + @GetMapping("/get-tree-data") + @Operation(summary = "查询分类树") + public CommonResult> getTreeData() { + List list = dataCollectionService.getTreeData(); + return success(BeanUtils.toBean(list, DataCollectionRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出数据集 Excel") + @PreAuthorize("@ss.hasPermission('qms:data-collection:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDataCollectionExcel(@Valid DataCollectionPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = dataCollectionService.getDataCollectionPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "数据集.xls", "数据", DataCollectionRespVO.class, + BeanUtils.toBean(list, DataCollectionRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataCollectionFieldController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataCollectionFieldController.java new file mode 100644 index 0000000..b1cc7f8 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataCollectionFieldController.java @@ -0,0 +1,104 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.admin; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionFieldDO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldRespVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldSaveReqVO; +import cn.iocoder.yudao.module.qms.common.data.service.DataCollectionFieldService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 数据集字段") +@RestController +@RequestMapping("/qms/common/data/data-collection-field") +@Validated +public class DataCollectionFieldController implements BusinessControllerMarker { + + + @Resource + private DataCollectionFieldService dataCollectionFieldService; + + @PostMapping("/create") + @Operation(summary = "创建数据集字段") + @PreAuthorize("@ss.hasPermission('qms:data-collection-field:create')") + public CommonResult createDataCollectionField(@Valid @RequestBody DataCollectionFieldSaveReqVO createReqVO) { + return success(dataCollectionFieldService.createDataCollectionField(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新数据集字段") + @PreAuthorize("@ss.hasPermission('qms:data-collection-field:update')") + public CommonResult updateDataCollectionField(@Valid @RequestBody DataCollectionFieldSaveReqVO updateReqVO) { + dataCollectionFieldService.updateDataCollectionField(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除数据集字段") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:data-collection-field:delete')") + public CommonResult deleteDataCollectionField(@RequestParam("id") Long id) { + dataCollectionFieldService.deleteDataCollectionField(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除数据集字段") + @PreAuthorize("@ss.hasPermission('qms:data-collection-field:delete')") + public CommonResult deleteDataCollectionFieldList(@RequestBody BatchDeleteReqVO req) { + dataCollectionFieldService.deleteDataCollectionFieldListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得数据集字段") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:data-collection-field:query')") + public CommonResult getDataCollectionField(@RequestParam("id") Long id) { + DataCollectionFieldDO dataCollectionField = dataCollectionFieldService.getDataCollectionField(id); + return success(BeanUtils.toBean(dataCollectionField, DataCollectionFieldRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得数据集字段分页") + public CommonResult> getDataCollectionFieldPage(@Valid DataCollectionFieldPageReqVO pageReqVO) { + PageResult pageResult = dataCollectionFieldService.getDataCollectionFieldPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DataCollectionFieldRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出数据集字段 Excel") + @PreAuthorize("@ss.hasPermission('qms:data-collection-field:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDataCollectionFieldExcel(@Valid DataCollectionFieldPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = dataCollectionFieldService.getDataCollectionFieldPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "数据集字段.xls", "数据", DataCollectionFieldRespVO.class, + BeanUtils.toBean(list, DataCollectionFieldRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldPageReqVO.java new file mode 100644 index 0000000..cc0f4df --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldPageReqVO.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 数据集字段分页 Request VO") +@Data +public class DataCollectionFieldPageReqVO extends PageParam { + + @Schema(description = "数据集ID", example = "1538") + private Long dataCollectionId; + + @Schema(description = "名称", example = "李四") + private String fieldName; + + @Schema(description = "字段key") + private String fieldKey; + + @Schema(description = "字段类型,【字典】【jy_data_collect_field_type】文件、记录、模板", example = "1") + private String fieldType; + + @Schema(description = "禁用状态,0-启用;1-禁用") + private Integer cancelFlag; + + @Schema(description = "排序号") + private Integer sortNo; + + @Schema(description = "其他配置") + private String customConfig; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldRespVO.java new file mode 100644 index 0000000..91275c3 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldRespVO.java @@ -0,0 +1,59 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 数据集字段 Response VO") +@Data +@ExcelIgnoreUnannotated +public class DataCollectionFieldRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21752") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "数据集ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1538") + @ExcelProperty("数据集ID") + private Long dataCollectionId; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("名称") + private String fieldName; + + @Schema(description = "字段key", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("字段key") + private String fieldKey; + + @Schema(description = "字段类型,【字典】【jy_data_collect_field_type】文件、记录、模板", example = "1") + @ExcelProperty("字段类型,【字典】【jy_data_collect_field_type】文件、记录、模板") + private String fieldType; + + @Schema(description = "禁用状态,0-启用;1-禁用") + @ExcelProperty("禁用状态,0-启用;1-禁用") + private Integer cancelFlag; + + @Schema(description = "排序号") + @ExcelProperty("排序号") + private Integer sortNo; + + @Schema(description = "其他配置") + @ExcelProperty("其他配置") + private String customConfig; + + @Schema(description = "所属部门") + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldSaveReqVO.java new file mode 100644 index 0000000..74e6808 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldSaveReqVO.java @@ -0,0 +1,45 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - 数据集字段新增/修改 Request VO") +@Data +public class DataCollectionFieldSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21752") + private Long id; + + @Schema(description = "数据集ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1538") + @NotNull(message = "数据集ID不能为空") + private Long dataCollectionId; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "名称不能为空") + private String fieldName; + + @Schema(description = "字段key", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "字段key不能为空") + private String fieldKey; + + @Schema(description = "字段类型,【字典】【jy_data_collect_field_type】文件、记录、模板", example = "1") + private String fieldType; + + @Schema(description = "禁用状态") + private Integer cancelFlag; + + @Schema(description = "排序号") + private Integer sortNo; + + @Schema(description = "其他配置") + private String customConfig; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionPageReqVO.java new file mode 100644 index 0000000..b327bb5 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionPageReqVO.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 数据集分页 Request VO") +@Data +public class DataCollectionPageReqVO extends PageParam { + + @Schema(description = "上级id", example = "28344") + private Long parentId; + + @Schema(description = "主id") + private Long mainId; + + @Schema(description = "id路径") + private String idPath; + + @Schema(description = "名称", example = "赵六") + private String name; + + @Schema(description = "节点类型,category-分类;form-表单", example = "2") + private String nodeType; + + @Schema(description = "数据键,【字典】【jy_data_collect_key】文件、记录、模板") + private String dataKey; + + @Schema(description = "版本") + private Integer version; + + @Schema(description = "是否最新版本,默认显示最新版本") + private Integer currentFlag; + + @Schema(description = "禁用状态,0-启用;1-禁用") + private Integer cancelFlag; + + @Schema(description = "是否流程审批") + private Integer flowFlag; + + @Schema(description = "表单key") + private String formKey; + + @Schema(description = "表单版本id", example = "24468") + private String formVersionId; + + @Schema(description = "流程key") + private String flowKey; + + @Schema(description = "流程版本id", example = "23527") + private String flowVersionId; + + @Schema(description = "排序号") + private Integer sortNo; + + @Schema(description = "其他配置") + private String customConfig; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionRespVO.java new file mode 100644 index 0000000..7cd70ba --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionRespVO.java @@ -0,0 +1,95 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 数据集 Response VO") +@Data +@ExcelIgnoreUnannotated +public class DataCollectionRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21859") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "主id") + @ExcelProperty("主id,用于标识版本") + private Long mainId; + + @Schema(description = "上级id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28344") + @ExcelProperty("上级id") + private Long parentId; + + @Schema(description = "id路径", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("id路径") + private String idPath; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @ExcelProperty("名称") + private String name; + + @Schema(description = "节点类型,category-分类;form-表单", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("节点类型,category-分类;form-表单") + private String nodeType; + + @Schema(description = "数据键,【字典】【jy_data_collect_key】文件、记录、模板") + @ExcelProperty("数据键,【字典】【jy_data_collect_key】文件、记录、模板") + private String dataKey; + + @Schema(description = "版本") + @ExcelProperty("版本") + private Integer version; + + @Schema(description = "是否最新版本,默认显示最新版本") + @ExcelProperty("是否最新版本,默认显示最新版本") + private Integer currentFlag; + + @Schema(description = "禁用状态,0-启用;1-禁用") + @ExcelProperty("禁用状态,0-启用;1-禁用") + private Integer cancelFlag; + + @Schema(description = "是否流程审批") + @ExcelProperty("是否流程审批") + private Integer flowFlag; + + @Schema(description = "表单key") + @ExcelProperty("表单key") + private String formKey; + + @Schema(description = "表单版本id", example = "24468") + @ExcelProperty("表单版本id") + private String formVersionId; + + @Schema(description = "流程key") + @ExcelProperty("流程key") + private String flowKey; + + @Schema(description = "流程版本id", example = "23527") + @ExcelProperty("流程版本id") + private String flowVersionId; + + @Schema(description = "排序号") + @ExcelProperty("排序号") + private Integer sortNo; + + @Schema(description = "其他配置") + @ExcelProperty("其他配置") + private String customConfig; + + @Schema(description = "所属部门") + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionSaveReqVO.java new file mode 100644 index 0000000..7e1c641 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionSaveReqVO.java @@ -0,0 +1,84 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.util.List; + +@Schema(description = "管理后台 - 数据集新增/修改 Request VO") +@Data +public class DataCollectionSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21859") + private Long id; + + @Schema(description = "主id") + private Long mainId; + + @Schema(description = "上级id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28344") + @NotNull(message = "上级id不能为空") + private Long parentId; + + @Schema(description = "id路径") +// @NotEmpty(message = "id路径不能为空") + private String idPath; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + private String name; + + @Schema(description = "节点类型", example = "2") +// @NotEmpty(message = "节点类型不能为空") + private String nodeType; + + @Schema(description = "数据键") +// @NotEmpty(message = "数据键") + private String dataKey; + + @Schema(description = "版本") + private Integer version; + + @Schema(description = "是否最新版本") + private Integer currentFlag; + + @Schema(description = "禁用状态") + private Integer cancelFlag; + + @Schema(description = "是否流程审批") + private Integer flowFlag; + + @Schema(description = "表单key") + private String formKey; + + @Schema(description = "表单版本id", example = "24468") + private String formVersionId; + + @Schema(description = "流程key") + private String flowKey; + + @Schema(description = "流程版本id", example = "23527") + private String flowVersionId; + + @Schema(description = "排序号") + private Integer sortNo; + + @Schema(description = "其他配置") + private String customConfig; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "是否创建新版本") + private String newVersionFlag; + + @Schema(description = "字段列表") + private List fieldList; + + @Schema(description = "删除字段") + private String deleteFieldIds; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataCollectionDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataCollectionDO.java new file mode 100644 index 0000000..88ad2bb --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataCollectionDO.java @@ -0,0 +1,122 @@ +package cn.iocoder.yudao.module.qms.common.data.dal.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; +/** +* 数据集 DO +* +* @author 后台管理 +*/ +@TableName("t_dat_colt") +@KeySequence("t_dat_colt_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class DataCollectionDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + + //主id + @TableField("MAIN_ID") + private Long mainId; + + /** + * 上级id + */ + @TableField("PRN_ID") + private Long parentId; + /** + * id路径 + */ + @TableField("ID_PATH") + private String idPath; + /** + * 名称 + */ + @TableField("NAME") + private String name; + /** + * 节点类型,category-分类;form-表单 + */ + @TableField("NDE_TP") + private String nodeType; + /** + * 数据键,【字典】【jy_data_collect_key】文件、记录、模板 + */ + @TableField("DAT_KY") + private String dataKey; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + /** + * 是否最新版本,默认显示最新版本 + */ + @TableField("CRNT_FLG") + private Integer currentFlag; + /** + * 禁用状态,0-启用;1-禁用 + */ + @TableField("CNL_FLG") + private Integer cancelFlag; + /** + * 是否流程审批 + */ + @TableField("FLW_FLG") + private Integer flowFlag; + /** + * 表单key + */ + @TableField("FORM_KY") + private String formKey; + /** + * 表单版本id + */ + @TableField("FORM_VER_ID") + private String formVersionId; + /** + * 流程key + */ + @TableField("FLW_KY") + private String flowKey; + /** + * 流程版本id + */ + @TableField("FLW_VER_ID") + private String flowVersionId; + /** + * 排序号 + */ + @TableField("SRT_NO") + private Integer sortNo; + /** + * 其他配置 + */ + @TableField("CST_CFG") + private String customConfig; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataCollectionFieldDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataCollectionFieldDO.java new file mode 100644 index 0000000..bae7145 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataCollectionFieldDO.java @@ -0,0 +1,78 @@ +package cn.iocoder.yudao.module.qms.common.data.dal.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; + +/** +* 数据集字段 DO +* +* @author 后台管理 +*/ +@TableName("t_dat_colt_fld") +@KeySequence("t_dat_colt_fld_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class DataCollectionFieldDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 数据集ID + */ + @TableField("DAT_COLT_ID") + private Long dataCollectionId; + /** + * 名称 + */ + @TableField("FLD_NAME") + private String fieldName; + /** + * 字段key + */ + @TableField("FLD_KY") + private String fieldKey; + /** + * 字段类型,【字典】【jy_data_collect_field_type】文件、记录、模板 + */ + @TableField("FLD_TP") + private String fieldType; + /** + * 禁用状态,0-启用;1-禁用 + */ + @TableField("CNL_FLG") + private Integer cancelFlag; + /** + * 排序号 + */ + @TableField("SRT_NO") + private Integer sortNo; + /** + * 其他配置 + */ + @TableField("CST_CFG") + private String customConfig; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionFieldMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionFieldMapper.java new file mode 100644 index 0000000..6a5eb55 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionFieldMapper.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.qms.common.data.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionFieldDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 数据集字段 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface DataCollectionFieldMapper extends BaseMapperX { + + default PageResult selectPage(DataCollectionFieldPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(DataCollectionFieldDO::getDataCollectionId, reqVO.getDataCollectionId()) + .likeIfPresent(DataCollectionFieldDO::getFieldName, reqVO.getFieldName()) + .eqIfPresent(DataCollectionFieldDO::getFieldKey, reqVO.getFieldKey()) + .eqIfPresent(DataCollectionFieldDO::getFieldType, reqVO.getFieldType()) + .eqIfPresent(DataCollectionFieldDO::getCancelFlag, reqVO.getCancelFlag()) + .eqIfPresent(DataCollectionFieldDO::getSortNo, reqVO.getSortNo()) + .eqIfPresent(DataCollectionFieldDO::getCustomConfig, reqVO.getCustomConfig()) + .eqIfPresent(DataCollectionFieldDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .eqIfPresent(DataCollectionFieldDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(DataCollectionFieldDO::getCreateTime, reqVO.getCreateTime()) + .orderByAsc(DataCollectionFieldDO::getSortNo)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionMapper.java new file mode 100644 index 0000000..1149202 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionMapper.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.qms.common.data.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 数据集 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface DataCollectionMapper extends BaseMapperX { + + default PageResult selectPage(DataCollectionPageReqVO reqVO) { + + LambdaQueryWrapperX wrapper = new LambdaQueryWrapperX<>(); + wrapper.ne(DataCollectionDO::getCancelFlag, -1); //-1为临时数据 + wrapper.eqIfPresent(DataCollectionDO::getParentId, reqVO.getParentId()); + wrapper.eqIfPresent(DataCollectionDO::getMainId, reqVO.getMainId()); + wrapper.eqIfPresent(DataCollectionDO::getIdPath, reqVO.getIdPath()); + wrapper.likeIfPresent(DataCollectionDO::getName, reqVO.getName()); + wrapper.eqIfPresent(DataCollectionDO::getNodeType, reqVO.getNodeType()); + wrapper.eqIfPresent(DataCollectionDO::getDataKey, reqVO.getDataKey()); + wrapper.eqIfPresent(DataCollectionDO::getVersion, reqVO.getVersion()); + wrapper.eqIfPresent(DataCollectionDO::getCurrentFlag, reqVO.getCurrentFlag()); + wrapper.eqIfPresent(DataCollectionDO::getCancelFlag, reqVO.getCancelFlag()); + wrapper.eqIfPresent(DataCollectionDO::getFlowFlag, reqVO.getFlowFlag()); + wrapper.eqIfPresent(DataCollectionDO::getFormKey, reqVO.getFormKey()); + wrapper.eqIfPresent(DataCollectionDO::getFormVersionId, reqVO.getFormVersionId()); + wrapper.eqIfPresent(DataCollectionDO::getFlowKey, reqVO.getFlowKey()); + wrapper.eqIfPresent(DataCollectionDO::getFlowVersionId, reqVO.getFlowVersionId()); + wrapper.eqIfPresent(DataCollectionDO::getSortNo, reqVO.getSortNo()); + wrapper.eqIfPresent(DataCollectionDO::getCustomConfig, reqVO.getCustomConfig()); + wrapper.eqIfPresent(DataCollectionDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()); + wrapper.eqIfPresent(DataCollectionDO::getRemark, reqVO.getRemark()); + wrapper.betweenIfPresent(DataCollectionDO::getCreateTime, reqVO.getCreateTime()); + + if(reqVO.getMainId() != null){ + wrapper.orderByDesc(DataCollectionDO::getVersion); + } + wrapper.orderByAsc(DataCollectionDO::getSortNo); + + return selectPage(reqVO, wrapper); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionFieldService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionFieldService.java new file mode 100644 index 0000000..fed253a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionFieldService.java @@ -0,0 +1,72 @@ +package cn.iocoder.yudao.module.qms.common.data.service; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldRespVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldSaveReqVO; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionFieldDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 数据集字段 Service 接口 + * + * @author 后台管理 + */ +public interface DataCollectionFieldService { + + /** + * 创建数据集字段 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + DataCollectionFieldRespVO createDataCollectionField(@Valid DataCollectionFieldSaveReqVO createReqVO); + + + //保存字段 + CommonResult saveFields(List fieldList, Long dcId, String newVersionFlag); + + //删除字段 + CommonResult deleteFields(String deleteFieldIds, Long dcId); + + /** + * 更新数据集字段 + * + * @param updateReqVO 更新信息 + */ + void updateDataCollectionField(@Valid DataCollectionFieldSaveReqVO updateReqVO); + + /** + * 删除数据集字段 + * + * @param id 编号 + */ + void deleteDataCollectionField(Long id); + + /** + * 批量删除数据集字段 + * + * @param ids 编号 + */ + void deleteDataCollectionFieldListByIds(List ids); + + /** + * 获得数据集字段 + * + * @param id 编号 + * @return 数据集字段 + */ + DataCollectionFieldDO getDataCollectionField(Long id); + + /** + * 获得数据集字段分页 + * + * @param pageReqVO 分页查询 + * @return 数据集字段分页 + */ + PageResult getDataCollectionFieldPage(DataCollectionFieldPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionFieldServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionFieldServiceImpl.java new file mode 100644 index 0000000..45f7b42 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionFieldServiceImpl.java @@ -0,0 +1,136 @@ +package cn.iocoder.yudao.module.qms.common.data.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionFieldDO; +import cn.iocoder.yudao.module.qms.common.data.dal.mapper.DataCollectionFieldMapper; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldRespVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldSaveReqVO; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.util.ObjectUtils; +import org.springframework.validation.annotation.Validated; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.DATA_COLLECTION_FIELD_NOT_EXISTS; + +/** + * 数据集字段 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class DataCollectionFieldServiceImpl implements DataCollectionFieldService { + + @Resource + private DataCollectionFieldMapper dataCollectionFieldMapper; + + @Override + public CommonResult saveFields(List fieldList, Long dcId, String newVersionFlag) { + List updateList = new ArrayList<>(); + List insertList = new ArrayList<>(); + if(fieldList == null) + fieldList = new ArrayList<>(); + if("1".equals(newVersionFlag)){ + //新版本,所有字段都做插入处理 + for (DataCollectionFieldSaveReqVO field : fieldList) { + DataCollectionFieldDO entity = BeanUtils.toBean(field, DataCollectionFieldDO.class); + entity.setId(null); + entity.setDataCollectionId(dcId); + insertList.add(entity); + } + if(!insertList.isEmpty()) + dataCollectionFieldMapper.insertBatch(insertList); + return CommonResult.success("保存成功"); + } + for(DataCollectionFieldSaveReqVO field : fieldList){ + DataCollectionFieldDO entity = BeanUtils.toBean(field, DataCollectionFieldDO.class); + entity.setDataCollectionId(dcId); + if(field.getId() != null) + updateList.add(entity); + else + insertList.add(entity); + } + if(!insertList.isEmpty()) + dataCollectionFieldMapper.insertBatch(insertList); + if(!updateList.isEmpty()) + dataCollectionFieldMapper.updateBatch(updateList); + return CommonResult.success("保存成功"); + } + + + @Override + public CommonResult deleteFields(String deleteFieldIds, Long dcId) { + if(ObjectUtils.isEmpty(deleteFieldIds)) + return CommonResult.success(""); + List ids = Arrays.asList(deleteFieldIds.split(",")).stream().map(Long::parseLong).toList(); + dataCollectionFieldMapper.deleteByIds(ids); + return CommonResult.success("删除成功"); + } + + @Override + public DataCollectionFieldRespVO createDataCollectionField(DataCollectionFieldSaveReqVO createReqVO) { + // 插入 + DataCollectionFieldDO dataCollectionField = BeanUtils.toBean(createReqVO, DataCollectionFieldDO.class); + dataCollectionFieldMapper.insert(dataCollectionField); + // 返回 + return BeanUtils.toBean(dataCollectionField, DataCollectionFieldRespVO.class); + } + + @Override + public void updateDataCollectionField(DataCollectionFieldSaveReqVO updateReqVO) { + // 校验存在 + validateDataCollectionFieldExists(updateReqVO.getId()); + // 更新 + DataCollectionFieldDO updateObj = BeanUtils.toBean(updateReqVO, DataCollectionFieldDO.class); + dataCollectionFieldMapper.updateById(updateObj); + } + + @Override + public void deleteDataCollectionField(Long id) { + // 校验存在 + validateDataCollectionFieldExists(id); + // 删除 + dataCollectionFieldMapper.deleteById(id); + } + + @Override + public void deleteDataCollectionFieldListByIds(List ids) { + // 校验存在 + validateDataCollectionFieldExists(ids); + // 删除 + dataCollectionFieldMapper.deleteByIds(ids); + } + + private void validateDataCollectionFieldExists(List ids) { + List list = dataCollectionFieldMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(DATA_COLLECTION_FIELD_NOT_EXISTS); + } + } + + private void validateDataCollectionFieldExists(Long id) { + if (dataCollectionFieldMapper.selectById(id) == null) { + throw exception(DATA_COLLECTION_FIELD_NOT_EXISTS); + } + } + + @Override + public DataCollectionFieldDO getDataCollectionField(Long id) { + return dataCollectionFieldMapper.selectById(id); + } + + @Override + public PageResult getDataCollectionFieldPage(DataCollectionFieldPageReqVO pageReqVO) { + return dataCollectionFieldMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionService.java new file mode 100644 index 0000000..10c0fff --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionService.java @@ -0,0 +1,79 @@ +package cn.iocoder.yudao.module.qms.common.data.service; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionDO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionRespVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionSaveReqVO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 数据集 Service 接口 + * + * @author 后台管理 + */ +public interface DataCollectionService { + + /*获取分类树数据*/ + List getTreeData(); + + //保存数据集 + CommonResult saveDataCollection(@Valid DataCollectionSaveReqVO createReqVO); + CommonResult saveDataCollectionWithNewVersion(@Valid DataCollectionSaveReqVO createReqVO); + + //保存分类 + CommonResult saveClassify(@Valid DataCollectionSaveReqVO createReqVO); + + //更新后代节点路径-递归调用 + CommonResult updateAllIdPath(Long parentId, Integer level); + + /** + * 创建数据集 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + DataCollectionRespVO createDataCollection(@Valid DataCollectionSaveReqVO createReqVO); + + /** + * 更新数据集 + * + * @param updateReqVO 更新信息 + */ + void updateDataCollection(@Valid DataCollectionSaveReqVO updateReqVO); + + /** + * 删除数据集 + * + * @param id 编号 + */ + void deleteDataCollection(Long id); + + /** + * 批量删除数据集 + * + * @param ids 编号 + */ + void deleteDataCollectionListByIds(List ids); + + /** + * 获得数据集 + * + * @param id 编号 + * @return 数据集 + */ + DataCollectionDO getDataCollection(Long id); + + /** + * 获得数据集分页 + * + * @param pageReqVO 分页查询 + * @return 数据集分页 + */ + PageResult getDataCollectionPage(DataCollectionPageReqVO pageReqVO); + + List listByParId(Long parId); +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionServiceImpl.java new file mode 100644 index 0000000..b8d4cc3 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionServiceImpl.java @@ -0,0 +1,236 @@ +package cn.iocoder.yudao.module.qms.common.data.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldSaveReqVO; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionDO; +import cn.iocoder.yudao.module.qms.common.data.dal.mapper.DataCollectionMapper; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionRespVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionSaveReqVO; +import cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant; +import cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.ObjectUtils; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.DATA_COLLECTION_NOT_EXISTS; + +/** + * 数据集 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class DataCollectionServiceImpl implements DataCollectionService { + + private int id_path_update_level_limit = 7; + + @Resource private DataCollectionMapper dataCollectionMapper; + @Resource private DataCollectionFieldService dataCollectionFieldService; + + + + + @Override + @Transactional(rollbackFor = Exception.class) + public CommonResult saveDataCollection(DataCollectionSaveReqVO reqV) { + String newVersionFlag = reqV.getNewVersionFlag(); + if("1".equals(newVersionFlag)) + return saveDataCollectionWithNewVersion(reqV); + Long id = reqV.getId(); + DataCollectionDO backData = this.getDataCollection(id); + if(backData.getCancelFlag() == null || backData.getCancelFlag() == -1){ + reqV.setCancelFlag(0); + reqV.setCurrentFlag(1); + reqV.setMainId( id); + } + + List fieldList = reqV.getFieldList(); + String deleteFieldIds = reqV.getDeleteFieldIds(); + dataCollectionFieldService.saveFields(fieldList, id, "0"); + dataCollectionFieldService.deleteFields(deleteFieldIds, id); + this.updateDataCollection(reqV); + return CommonResult.success("保存成功"); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public CommonResult saveDataCollectionWithNewVersion(DataCollectionSaveReqVO createReqVO) { + + DataCollectionDO dataCollection = BeanUtils.toBean(createReqVO, DataCollectionDO.class); + dataCollection.setCurrentFlag(0); + dataCollectionMapper.updateById(dataCollection); + + //创建新版本 + Integer version = dataCollection.getVersion(); + if(version != null) + version ++; + else + version = 1; + dataCollection.setId(null); + dataCollection.setVersion(version); + dataCollection.setCurrentFlag(1); + dataCollection.setMainId(createReqVO.getMainId()); + dataCollectionMapper.insert(dataCollection); + //保存字段列表 + Long newId = dataCollection.getId(); + List fieldList = createReqVO.getFieldList(); + dataCollectionFieldService.saveFields(fieldList, newId, "1"); + return CommonResult.success("保存成功"); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public CommonResult saveClassify(DataCollectionSaveReqVO entity) { + if(ObjectUtils.isEmpty(entity.getParentId())) + entity.setParentId(0L); + Long parentId = entity.getParentId(); + //检查同一层级下是否重名 + List checkList = listByParId(parentId); + boolean duplicate = false; + DataCollectionDO duplicateEntity = checkList.stream().filter(e->e.getName().equals(entity.getName())).findFirst().orElse(null); + if(duplicateEntity != null && !duplicateEntity.getId().equals(entity.getId())) + duplicate = true; + if(duplicate) + throw new ServiceException(ErrorCodeConstants.DATA_COLLECTION_CLASSIFY_DUPLICATE); + entity.setNodeType(DataTypeConstant.DATA_TYPE_CATEGORY); + Long id = entity.getId(); + DataCollectionDO dataCollection = BeanUtils.toBean(entity, DataCollectionDO.class); + if(ObjectUtils.isEmpty(id)){ + dataCollectionMapper.insert(dataCollection); + id = dataCollection.getId(); + } + DataCollectionDO backData = this.getDataCollection(id); + Long parentId_ = backData.getParentId(); + //检查parId,避免父节点设置为本节点的后代节点 + if(parentId_.equals(id)) + throw new ServiceException(ErrorCodeConstants.DATA_COLLECTION_CLASSIFY_PARENT_ERROR); + String idPath = getIdPath(dataCollection); + int curIdIndex = idPath.indexOf("/" + id.toString() + "/"); + int parIdIndex = idPath.indexOf("/" + parentId.toString() + "/"); + if(curIdIndex <= parIdIndex) + throw new ServiceException(ErrorCodeConstants.DATA_COLLECTION_CLASSIFY_PARENT_ERROR); + dataCollection.setIdPath(idPath); + + //更新后代节点路径 + updateAllIdPath(id, 1); + dataCollectionMapper.updateById(dataCollection); + return CommonResult.success(BeanUtils.toBean(dataCollection, DataCollectionRespVO.class)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public CommonResult updateAllIdPath(Long parentId, Integer level) { + if(level > id_path_update_level_limit) + return CommonResult.success("更新完成(超出层数限制:"+id_path_update_level_limit+")"); + List list = listByParId(parentId); + DataCollectionDO parEntity = this.getDataCollection(parentId); + if(list.isEmpty()) + return CommonResult.success(""); + String parIdPath = "/0/"; + if(parEntity != null) + parIdPath = parEntity.getIdPath(); + for(DataCollectionDO entity : list){ + entity.setIdPath(parIdPath + "/" + entity.getId() + "/"); + dataCollectionMapper.updateById( entity); + updateAllIdPath(entity.getId(),level+1); + } + return CommonResult.success(""); + } + + @Override + public List getTreeData() { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(DataCollectionDO::getNodeType, DataTypeConstant.DATA_TYPE_CATEGORY); + query.orderByAsc(DataCollectionDO::getSortNo); + return dataCollectionMapper.selectList(query); + } + + @Override + public DataCollectionRespVO createDataCollection(DataCollectionSaveReqVO createReqVO) { + // 插入 + DataCollectionDO dataCollection = BeanUtils.toBean(createReqVO, DataCollectionDO.class); + dataCollectionMapper.insert(dataCollection); + // 返回 + return BeanUtils.toBean(dataCollection, DataCollectionRespVO.class); + } + + @Override + public void updateDataCollection(DataCollectionSaveReqVO updateReqVO) { + // 校验存在 + validateDataCollectionExists(updateReqVO.getId()); + // 更新 + DataCollectionDO updateObj = BeanUtils.toBean(updateReqVO, DataCollectionDO.class); + dataCollectionMapper.updateById(updateObj); + } + + @Override + public void deleteDataCollection(Long id) { + // 校验存在 + validateDataCollectionExists(id); + // 删除 + dataCollectionMapper.deleteById(id); + } + + @Override + public void deleteDataCollectionListByIds(List ids) { + // 校验存在 + validateDataCollectionExists(ids); + // 删除 + dataCollectionMapper.deleteByIds(ids); + } + + private void validateDataCollectionExists(List ids) { + List list = dataCollectionMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(DATA_COLLECTION_NOT_EXISTS); + } + } + + private void validateDataCollectionExists(Long id) { + if (dataCollectionMapper.selectById(id) == null) { + throw exception(DATA_COLLECTION_NOT_EXISTS); + } + } + + @Override + public DataCollectionDO getDataCollection(Long id) { + return dataCollectionMapper.selectById(id); + } + + @Override + public PageResult getDataCollectionPage(DataCollectionPageReqVO pageReqVO) { + return dataCollectionMapper.selectPage(pageReqVO); + } + + @Override + public List listByParId(Long parId) { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(DataCollectionDO::getParentId, parId); + query.ne(DataCollectionDO::getCancelFlag, -1); + return dataCollectionMapper.selectList(query); + } + + + private String getIdPath(DataCollectionDO entity){ + String parIdPath = ""; + if(ObjectUtils.isEmpty(entity.getParentId()) || 0L == entity.getParentId()) + parIdPath = "/0/"; + DataCollectionDO parEntity = this.getDataCollection(entity.getParentId()); + if(parEntity != null){ + parIdPath = parEntity.getIdPath(); + } + return parIdPath + entity.getId() + "/"; + } +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/admin/DictionaryBusinessController.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/admin/DictionaryBusinessController.java new file mode 100644 index 0000000..882f982 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/admin/DictionaryBusinessController.java @@ -0,0 +1,142 @@ +package cn.iocoder.yudao.module.qms.common.dic.controller.admin; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.DictionaryBusinessPageReqVO; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.DictionaryBusinessRespVO; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.DictionaryBusinessSaveReqVO; +import cn.iocoder.yudao.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO; +import cn.iocoder.yudao.module.qms.common.dic.service.DictionaryBusinessService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 业务参数字典") +@RestController +@RequestMapping("/qms/dictionary-business") +@Validated +public class DictionaryBusinessController implements BusinessControllerMarker { + + + @Resource + private DictionaryBusinessService dictionaryBusinessService; + + + @GetMapping("/getDataListByCategoryKey") + @Operation(summary = "根据分类Key查询数据列表") + public CommonResult> getDataListByCategoryKey(@RequestParam(required = true) String key) { +// String key = pageReqVO.getKey(); +// if(ObjectUtils.isEmpty(key)) +// return CommonResult.error(MISS_PARAMETER); + List list = dictionaryBusinessService.queryDictItemsByKey(key); + return success(BeanUtils.toBean(list, DictionaryBusinessRespVO.class)); + } + + @GetMapping("/getDataByDataKey") + @Operation(summary = "根据数据Key查询数据") + public CommonResult getDataByDataKey(@RequestParam(required = true) String key) { +// String key = pageReqVO.getKey(); + return dictionaryBusinessService.getDataByDataKey(key); + } + + @PostMapping("/saveData") + @Operation(summary = "保存数据") + public CommonResult saveData(@Valid @RequestBody DictionaryBusinessSaveReqVO createReqVO) { + return dictionaryBusinessService.saveData(createReqVO); + } + + @PostMapping("/saveClassify") + @Operation(summary = "保存分类") + public CommonResult saveClassify(@Valid @RequestBody DictionaryBusinessSaveReqVO createReqVO) { + return dictionaryBusinessService.saveCategory(createReqVO); + } + + @GetMapping("/getTreeData") + @Operation(summary = "查询分类树") + public CommonResult> getTreeData() { + List list = dictionaryBusinessService.getTreeData(); + return success(BeanUtils.toBean(list, DictionaryBusinessRespVO.class)); + } + +// @PostMapping("/create") +// @Operation(summary = "创建业务参数字典") +// @PreAuthorize("@ss.hasPermission('qms:dictionary-business:create')") +// public CommonResult createDictionaryBusiness(@Valid @RequestBody DictionaryBusinessSaveReqVO createReqVO) { +// return success(dictionaryBusinessService.createDictionaryBusiness(createReqVO)); +// } +// +// @PutMapping("/update") +// @Operation(summary = "更新业务参数字典") +// @PreAuthorize("@ss.hasPermission('qms:dictionary-business:update')") +// public CommonResult updateDictionaryBusiness(@Valid @RequestBody DictionaryBusinessSaveReqVO updateReqVO) { +// dictionaryBusinessService.updateDictionaryBusiness(updateReqVO); +// return success(true); +// } + + @DeleteMapping("/delete") + @Operation(summary = "删除业务参数字典") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:dictionary-business:delete')") + public CommonResult deleteDictionaryBusiness(@RequestParam("id") Long id) { + dictionaryBusinessService.deleteDictionaryBusiness(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除业务参数字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-business:delete')") + public CommonResult deleteDictionaryBusinessList(@RequestBody BatchDeleteReqVO req) { + dictionaryBusinessService.deleteDictionaryBusinessListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得业务参数字典") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:dictionary-business:query')") + public CommonResult getDictionaryBusiness(@RequestParam("id") Long id) { + DictionaryBusinessDO dictionaryBusiness = dictionaryBusinessService.getDictionaryBusiness(id); + return success(BeanUtils.toBean(dictionaryBusiness, DictionaryBusinessRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得业务参数字典分页") + @PreAuthorize("@ss.hasPermission('qms:dictionary-business:query')") + public CommonResult> getDictionaryBusinessPage(@Valid DictionaryBusinessPageReqVO pageReqVO) { + PageResult pageResult = dictionaryBusinessService.getDictionaryBusinessPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DictionaryBusinessRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出业务参数字典 Excel") + @PreAuthorize("@ss.hasPermission('qms:dictionary-business:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDictionaryBusinessExcel(@Valid DictionaryBusinessPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = dictionaryBusinessService.getDictionaryBusinessPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "业务参数字典.xls", "数据", DictionaryBusinessRespVO.class, + BeanUtils.toBean(list, DictionaryBusinessRespVO.class)); + } + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessPageReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessPageReqVO.java new file mode 100644 index 0000000..c91d113 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessPageReqVO.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.qms.common.dic.controller.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 业务参数字典分页 Request VO") +@Data +public class DictionaryBusinessPageReqVO extends PageParam { + + @Schema(description = "id路径") + private String idPath; + + @Schema(description = "上级id", example = "3392") + private Long parentId; + + @Schema(description = "节点类型", example = "2") + private String nodeType; + + @Schema(description = "名称", example = "芋艿") + private String name; + + @Schema(description = "键") + private String key; + + @Schema(description = "值") + private String value; + + @Schema(description = "其他配置") + private String customConfig; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "排序号") + private Integer sortNo; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessRespVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessRespVO.java new file mode 100644 index 0000000..44d3578 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessRespVO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.qms.common.dic.controller.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 业务参数字典 Response VO") +@Data +@ExcelIgnoreUnannotated +public class DictionaryBusinessRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5551") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "id路径", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("id路径") + private String idPath; + + @Schema(description = "上级id", example = "3392") + @ExcelProperty("上级id") + private Long parentId; + + @Schema(description = "节点类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("节点类型") + private String nodeType; + + @Schema(description = "名称", example = "芋艿") + @ExcelProperty("名称") + private String name; + + @Schema(description = "键") + @ExcelProperty("键") + private String key; + + @Schema(description = "值") + @ExcelProperty("值") + private String value; + + @Schema(description = "其他配置") + @ExcelProperty("其他配置") + private String customConfig; + + @Schema(description = "所属部门") + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "排序号") + @ExcelProperty("排序号") + private Integer sortNo; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessSaveReqVO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessSaveReqVO.java new file mode 100644 index 0000000..9b0aa18 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessSaveReqVO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.qms.common.dic.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import lombok.Data; + +@Schema(description = "管理后台 - 业务参数字典新增/修改 Request VO") +@Data +public class DictionaryBusinessSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5551") + private Long id; + + @Schema(description = "id路径", requiredMode = Schema.RequiredMode.REQUIRED) + private String idPath; + + @Schema(description = "上级id", example = "3392") + private Long parentId; + + @Schema(description = "节点类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private String nodeType; + + @Schema(description = "名称", example = "芋艿") + private String name; + + @Schema(description = "键") + private String key; + + @Schema(description = "值") + private String value; + + @Schema(description = "其他配置") + private String customConfig; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "排序号") + private Integer sortNo; +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/dal/dataobject/DictionaryBusinessDO.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/dal/dataobject/DictionaryBusinessDO.java new file mode 100644 index 0000000..42f0cc9 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/dal/dataobject/DictionaryBusinessDO.java @@ -0,0 +1,82 @@ +package cn.iocoder.yudao.module.qms.common.dic.dal.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; +/** +* 业务参数字典 DO +* +* @author 后台管理 +*/ +@TableName("t_dic_bsn") +@KeySequence("t_dic_bsn_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class DictionaryBusinessDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * id路径 + */ + @TableField("ID_PATH") + private String idPath; + /** + * 上级id + */ + @TableField("PRN_ID") + private Long parentId; + /** + * 节点类型 + */ + @TableField("NDE_TP") + private String nodeType; + /** + * 名称 + */ + @TableField("NAME") + private String name; + /** + * 键 + */ + @TableField("KY") + private String key; + /** + * 值 + */ + @TableField("VAL") + private String value; + /** + * 其他配置 + */ + @TableField("CST_CFG") + private String customConfig; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 排序号 + */ + @TableField("SRT_NO") + private Integer sortNo; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/dal/mapper/DictionaryBusinessMapper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/dal/mapper/DictionaryBusinessMapper.java new file mode 100644 index 0000000..371e2b5 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/dal/mapper/DictionaryBusinessMapper.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.qms.common.dic.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.*; +import cn.iocoder.yudao.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO; +import cn.iocoder.yudao.module.qms.core.legend.vo.DictModel; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 业务参数字典 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface DictionaryBusinessMapper extends BaseMapperX { + + default PageResult selectPage(DictionaryBusinessPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(DictionaryBusinessDO::getIdPath, reqVO.getIdPath()) + .eqIfPresent(DictionaryBusinessDO::getParentId, reqVO.getParentId()) + .eqIfPresent(DictionaryBusinessDO::getNodeType, reqVO.getNodeType()) + .likeIfPresent(DictionaryBusinessDO::getName, reqVO.getName()) + .eqIfPresent(DictionaryBusinessDO::getKey, reqVO.getKey()) + .eqIfPresent(DictionaryBusinessDO::getValue, reqVO.getValue()) + .eqIfPresent(DictionaryBusinessDO::getCustomConfig, reqVO.getCustomConfig()) + .eqIfPresent(DictionaryBusinessDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(DictionaryBusinessDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(DictionaryBusinessDO::getRemark, reqVO.getRemark()) + .orderByDesc(DictionaryBusinessDO::getId)); + } + + + /** + * 查询自定义字典表 + * @param table 表名 + * @param text 显示字段名 + * @param code 存储字段名 + * @param filterSql 条件sql + * @param keys 存储字段值 作为查询条件in + */ + List queryTableDictCustom(@Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("filterSql") String filterSql, + @Param("keys") List keys); + + /** + * 通过字典code获取字典数据 + * @param code + * @param key + */ + String queryDictTextByKey(@Param("code") String code, @Param("key") String key); + String queryDictTextByID(@Param("code") String code, @Param("id") String id); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/service/DictionaryBusinessService.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/service/DictionaryBusinessService.java new file mode 100644 index 0000000..e6e3112 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/service/DictionaryBusinessService.java @@ -0,0 +1,100 @@ +package cn.iocoder.yudao.module.qms.common.dic.service; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.DictionaryBusinessPageReqVO; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.DictionaryBusinessRespVO; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.DictionaryBusinessSaveReqVO; +import cn.iocoder.yudao.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO; +import cn.iocoder.yudao.module.qms.core.legend.vo.DictModel; +import jakarta.validation.Valid; + +import java.util.List; +import java.util.Map; + +/** + * 业务参数字典 Service 接口 + * + * @author 后台管理 + */ +public interface DictionaryBusinessService { + + //通过查询指定table的 text code key 获取字典值 + String queryTableDictTextByKey(String table, String text, String code, String key); + + //通过字典code及字典项的value获取字典文本 + String queryDictTextByKey(String code, String key); + String queryDictTextByID(String code, String id); + + //通过查询指定table的 text code key 获取字典值,可批量查询 + List queryTableDictText(String table, String text, String code, List keys); + + //通过多个字典code查询翻译文本 + Map> queryManyDict(List dictCodeList, List keys); +// Map> queryManyDictByIDs(List dictCodeList, List ids); + + List queryDictItemsByKey(String key); + + CommonResult getDataByDataKey(String key); + + + //保存分类 + CommonResult saveCategory(@Valid DictionaryBusinessSaveReqVO createReqVO); + + //保存数据 + CommonResult saveData(@Valid DictionaryBusinessSaveReqVO createReqVO); + + + /*获取分类树数据*/ + List getTreeData(); + + List listByParId(Long parId, String nodeType); + + CommonResult updateAllIdPath(Long parentId, Integer level); + + /** + * 创建业务参数字典 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + DictionaryBusinessRespVO createDictionaryBusiness(@Valid DictionaryBusinessSaveReqVO createReqVO); + + /** + * 更新业务参数字典 + * + * @param updateReqVO 更新信息 + */ + void updateDictionaryBusiness(@Valid DictionaryBusinessSaveReqVO updateReqVO); + + /** + * 删除业务参数字典 + * + * @param id 编号 + */ + void deleteDictionaryBusiness(Long id); + + /** + * 批量删除业务参数字典 + * + * @param ids 编号 + */ + void deleteDictionaryBusinessListByIds(List ids); + + /** + * 获得业务参数字典 + * + * @param id 编号 + * @return 业务参数字典 + */ + DictionaryBusinessDO getDictionaryBusiness(Long id); + + /** + * 获得业务参数字典分页 + * + * @param pageReqVO 分页查询 + * @return 业务参数字典分页 + */ + PageResult getDictionaryBusinessPage(DictionaryBusinessPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/service/DictionaryBusinessServiceImpl.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/service/DictionaryBusinessServiceImpl.java new file mode 100644 index 0000000..cc6c705 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/service/DictionaryBusinessServiceImpl.java @@ -0,0 +1,397 @@ +package cn.iocoder.yudao.module.qms.common.dic.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.*; +import cn.iocoder.yudao.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO; +import cn.iocoder.yudao.module.qms.common.dic.dal.mapper.DictionaryBusinessMapper; +import cn.iocoder.yudao.module.qms.core.constant.CacheConstant; +import cn.iocoder.yudao.module.qms.core.constant.CommonConstant; +import cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant; +import cn.iocoder.yudao.module.qms.core.legend.SqlInjectionUtil; +import cn.iocoder.yudao.module.qms.core.legend.security.DictQueryBlackListHandler; +import cn.iocoder.yudao.module.qms.core.legend.vo.DictModel; +import cn.iocoder.yudao.module.qms.core.legend.vo.DictModelMany; +import cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; +import org.springframework.util.ObjectUtils; +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant.*; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.*; + +/** + * 业务参数字典 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +@Slf4j +public class DictionaryBusinessServiceImpl implements DictionaryBusinessService { + private int id_path_update_level_limit = 7; + @Resource private DictionaryBusinessMapper dictionaryBusinessMapper; + @Resource private DictQueryBlackListHandler dictQueryBlackListHandler; + + + @Override + @Cacheable(value = CacheConstant.QMS_DICT_TABLE_CACHE, unless = "#result == null ") + public String queryTableDictTextByKey(String table, String text, String code, String key) { + log.debug("无缓存dictTable的时候调用这里!"); + + // 1.表字典黑名单check + String str = table+","+text+","+code; + if(!dictQueryBlackListHandler.isPass(str)){ + log.error(dictQueryBlackListHandler.getError()); + return null; + } + // 2.sql注入check + SqlInjectionUtil.filterContent(table, text, code, key); + + // 3.针对采用 ${}写法的表名和字段进行转义和check + table = SqlInjectionUtil.getSqlInjectTableName(table); + text = SqlInjectionUtil.getSqlInjectField(text); + code = SqlInjectionUtil.getSqlInjectField(code); + + List dictModeList = dictionaryBusinessMapper.queryTableDictCustom(table, text, code, null, Arrays.asList(key)); + if(CollectionUtils.isEmpty(dictModeList)){ + return null; + } + return dictModeList.get(0).getText(); + } + + @Override + @Cacheable(value = CacheConstant.QMS_DICT_BIZ_CACHE,key = "#code+':'+#key", unless = "#result == null ") + public String queryDictTextByKey(String code, String key) { + return dictionaryBusinessMapper.queryDictTextByKey(code, key); + } + + @Override + @Cacheable(value = CacheConstant.QMS_DICT_BIZ_CACHE,key = "#code+':'+#id", unless = "#result == null ") + public String queryDictTextByID(String code, String id) { + return dictionaryBusinessMapper.queryDictTextByID(code, id); + } + + @Override + public List queryTableDictText(String table, String text, String code, List keys) { + // 1.表字典黑名单check + String str = table+","+text+","+code; + if(!dictQueryBlackListHandler.isPass(str)){ + log.error(dictQueryBlackListHandler.getError()); + return null; + } + + // 2.分割SQL获取表名和条件 + String filterSql = null; + if(table.toLowerCase().indexOf(CommonConstant.SQL_WHERE)>0){ + String[] arr = table.split(" (?i)where "); + table = arr[0]; + filterSql = arr[1]; + } + + // 3.SQL注入check + SqlInjectionUtil.filterContent(table, text, code); + SqlInjectionUtil.specialFilterContentForDictSql(filterSql); + + // 4.针对采用 ${}写法的表名和字段进行转义和check + table = SqlInjectionUtil.getSqlInjectTableName(table); + text = SqlInjectionUtil.getSqlInjectField(text); + code = SqlInjectionUtil.getSqlInjectField(code); + + return dictionaryBusinessMapper.queryTableDictCustom(table, text, code, filterSql, keys); + } + + @Override + public Map> queryManyDict(List dictCodeList, List itemKeys) { + //将dictCodeList分组 + List listByKey = new ArrayList<>(); + List listByID = new ArrayList<>(); + for(String dictCode: dictCodeList){ + if(dictCode.contains(DICT_ANNOTATION_SPLIT)){ + String[] dictCodeArr = dictCode.split(DICT_ANNOTATION_SPLIT); + if(dictCodeArr[1].equals(DICT_ANNOTATION_KEY_TYPE_KEY)) { + listByKey.add(dictCodeArr[0]); + }else + listByID.add(dictCodeArr[0]); + }else{ + listByKey.add(dictCode); + } + } + Map> dictMap = new HashMap<>(5); + if(!listByKey.isEmpty()) + dictMap = queryManyDictBy(DICT_ANNOTATION_KEY_TYPE_KEY, dictMap, listByKey, itemKeys); + if(!listByID.isEmpty()) + dictMap = queryManyDictBy(DICT_ANNOTATION_KEY_TYPE_ID, dictMap, listByID, itemKeys); + return dictMap; + } + + + private Map> queryManyDictBy(String dictValType, Map> dictMap, List dictCodeList, List itemKeys){ + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.in(DictionaryBusinessDO::getKey, dictCodeList); + query.eq(DictionaryBusinessDO::getNodeType, DataTypeConstant.DATA_TYPE_CATEGORY); +// query.eq(DictionaryBusinessDO::getDeleted, 0); + List parList = dictionaryBusinessMapper.selectList(query); + if(parList.isEmpty()) + return dictMap; + List parIds = parList.stream().map(DictionaryBusinessDO::getId).toList(); + query.clear(); + + //通过key查询 + query.in(DictionaryBusinessDO::getParentId, parIds); + + query.eq(DictionaryBusinessDO::getNodeType, DataTypeConstant.DATA_TYPE_DATA); + if(dictValType.equals(DICT_ANNOTATION_KEY_TYPE_KEY)) + query.in(DictionaryBusinessDO::getKey, itemKeys); + else + query.in(DictionaryBusinessDO::getId, itemKeys); + List itemList = dictionaryBusinessMapper.selectList(query); + List modelItemList = new ArrayList<>(); + for(DictionaryBusinessDO item: itemList){ + Long parId = item.getParentId(); + DictionaryBusinessDO parNode = parList.stream().filter(e->e.getId().equals(parId)).findFirst().orElse(null); + if(parNode == null) + continue; + if(dictValType.equals(DICT_ANNOTATION_KEY_TYPE_KEY)) + modelItemList.add(new DictModelMany(parNode.getKey(), item.getKey(), item.getName())); + else + modelItemList.add(new DictModelMany(parNode.getKey(), item.getId().toString(), item.getName())); + } + for(DictModelMany dict: modelItemList){ + List list = dictMap.computeIfAbsent(dict.getDictCode(), i -> new ArrayList<>()); + list.add(new DictModel(dict.getValue(), dict.getText())); + } + return dictMap; + } + +// @Override +// public Map> queryManyDictByIDs(List dictCodeList, List ids) { +// Map> dictMap = new HashMap<>(5); +// LambdaQueryWrapper query = new LambdaQueryWrapper<>(); +// query.in(DictionaryBusinessDO::getKey, dictCodeList); +// query.eq(DictionaryBusinessDO::getNodeType, DataTypeConstant.DATA_TYPE_CATEGORY); +//// query.eq(DictionaryBusinessDO::getDeleted, 0); +// List parList = dictionaryBusinessMapper.selectList(query); +// if(parList.isEmpty()) +// return dictMap; +// List parIds = parList.stream().map(DictionaryBusinessDO::getId).toList(); +// query.clear(); +// query.in(DictionaryBusinessDO::getParentId, parIds); +// query.eq(DictionaryBusinessDO::getNodeType, DataTypeConstant.DATA_TYPE_DATA); +// query.in(DictionaryBusinessDO::getId, ids); +// List itemList = dictionaryBusinessMapper.selectList(query); +// List modelItemList = new ArrayList<>(); +// for(DictionaryBusinessDO item: itemList){ +// Long parId = item.getParentId(); +// DictionaryBusinessDO parNode = parList.stream().filter(e->e.getId().equals(parId)).findFirst().orElse(null); +// if(parNode == null) +// continue; +// modelItemList.add(new DictModelMany(parNode.getKey(), item.getId().toString(), item.getName())); +// } +// for(DictModelMany dict: modelItemList){ +// List list = dictMap.computeIfAbsent(dict.getDictCode(), i -> new ArrayList<>()); +// list.add(new DictModel(dict.getValue(), dict.getText())); +// } +// return dictMap; +// } + + /* + * 通过分类key获取数据列表*/ + @Override + public List queryDictItemsByKey(String key) { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(DictionaryBusinessDO::getKey, key); + query.eq(DictionaryBusinessDO::getNodeType, DataTypeConstant.DATA_TYPE_CATEGORY); + List list = dictionaryBusinessMapper.selectList(query); + if(list.isEmpty()) + throw exception(DICTIONARY_BUSINESS_NOT_EXISTS); + if(list.size() > 1) + throw exception(DICTIONARY_BUSINESS_CATEGORY_MORE_THAN_ONE); + DictionaryBusinessDO entity = list.get(0); + List dataList = this.listByParId(entity.getId(), DataTypeConstant.DATA_TYPE_DATA); + + return dataList; + } + + /* + * 通过数据key获取数据*/ + @Override + public CommonResult getDataByDataKey(String key) { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(DictionaryBusinessDO::getKey, key); + query.eq(DictionaryBusinessDO::getNodeType, DataTypeConstant.DATA_TYPE_DATA); + List list = dictionaryBusinessMapper.selectList(query); + if(list.isEmpty()) + return CommonResult.error(DICTIONARY_BUSINESS_NOT_EXISTS); + if(list.size() > 1) + throw exception(DICTIONARY_BUSINESS_DATA_MORE_THAN_ONE); + DictionaryBusinessRespVO vo = BeanUtils.toBean(list.get(0), DictionaryBusinessRespVO.class); + return CommonResult.success(vo); + } + + @Override + public CommonResult saveCategory(DictionaryBusinessSaveReqVO entity) { + if(entity.getParentId() == null) + entity.setParentId(0L); + Long parentId = entity.getParentId(); + List checkList = listByParId(parentId, DataTypeConstant.DATA_TYPE_CATEGORY); + boolean duplicate = false; + DictionaryBusinessDO duplicateEntity = checkList.stream().filter(e->e.getName().equals(entity.getName())).findFirst().orElse(null); + if(duplicateEntity != null && !duplicateEntity.getId().equals(entity.getId())) + duplicate = true; + if(duplicate) + throw exception(ErrorCodeConstants.DICTIONARY_BUSINESS_CLASSIFY_DUPLICATE); + entity.setNodeType(DataTypeConstant.DATA_TYPE_CATEGORY); + Long id = entity.getId(); + DictionaryBusinessDO dic = BeanUtils.toBean(entity, DictionaryBusinessDO.class); + if(ObjectUtils.isEmpty(id)){ + dictionaryBusinessMapper.insert(dic); + id = dic.getId(); + } + DictionaryBusinessDO backData = this.getDictionaryBusiness(id); + Long parentId_ = backData.getParentId(); + //检查parId,避免父节点设置为本节点的后代节点 + if(parentId_.equals(id)) + throw new ServiceException(ErrorCodeConstants.DATA_COLLECTION_CLASSIFY_PARENT_ERROR); + String idPath = getIdPath(dic); + int curIdIndex = idPath.indexOf("/" + id.toString() + "/"); + int parIdIndex = idPath.indexOf("/" + parentId.toString() + "/"); + if(curIdIndex <= parIdIndex) + throw new ServiceException(ErrorCodeConstants.DATA_COLLECTION_CLASSIFY_PARENT_ERROR); + dic.setIdPath(idPath); + + //更新后代节点路径 + updateAllIdPath(id, 1); + dictionaryBusinessMapper.updateById(dic); + return CommonResult.success(BeanUtils.toBean(dic, DictionaryBusinessRespVO.class)); + } + + @Override + public CommonResult saveData(DictionaryBusinessSaveReqVO createReqVO) { + Long id = createReqVO.getId(); + DictionaryBusinessDO entity = BeanUtils.toBean(createReqVO, DictionaryBusinessDO.class); + if(id == null){ + dictionaryBusinessMapper.insert(entity); + }else{ + dictionaryBusinessMapper.updateById(entity); + } + DictionaryBusinessRespVO vo = BeanUtils.toBean(entity, DictionaryBusinessRespVO.class); + return CommonResult.success( vo); + } + + @Override + public CommonResult updateAllIdPath(Long parentId, Integer level) { + if(level > id_path_update_level_limit) + return CommonResult.success("更新完成(超出层数限制:"+id_path_update_level_limit+")"); + List list = listByParId(parentId, DataTypeConstant.DATA_TYPE_CATEGORY); + DictionaryBusinessDO parEntity = this.getDictionaryBusiness(parentId); + if(list.isEmpty()) + return CommonResult.success(""); + String parIdPath = "/0/"; + if(parEntity != null) + parIdPath = parEntity.getIdPath(); + for(DictionaryBusinessDO entity : list){ + entity.setIdPath(parIdPath + "/" + entity.getId() + "/"); + dictionaryBusinessMapper.updateById( entity); + updateAllIdPath(entity.getId(),level+1); + } + return CommonResult.success(""); + } + + @Override + public List getTreeData() { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(DictionaryBusinessDO::getNodeType, DataTypeConstant.DATA_TYPE_CATEGORY); + query.orderByAsc(DictionaryBusinessDO::getSortNo); + return dictionaryBusinessMapper.selectList(query); + } + + @Override + public List listByParId(Long parId, String nodeType) { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(DictionaryBusinessDO::getParentId, parId); + if(!ObjectUtils.isEmpty(nodeType)) + query.eq(DictionaryBusinessDO::getNodeType, nodeType); + query.orderByAsc(DictionaryBusinessDO::getSortNo); + return dictionaryBusinessMapper.selectList(query); + } + + @Override + public DictionaryBusinessRespVO createDictionaryBusiness(DictionaryBusinessSaveReqVO createReqVO) { + // 插入 + DictionaryBusinessDO dictionaryBusiness = BeanUtils.toBean(createReqVO, DictionaryBusinessDO.class); + dictionaryBusinessMapper.insert(dictionaryBusiness); + // 返回 + return BeanUtils.toBean(dictionaryBusiness, DictionaryBusinessRespVO.class); + } + + @Override + public void updateDictionaryBusiness(DictionaryBusinessSaveReqVO updateReqVO) { + // 校验存在 + validateDictionaryBusinessExists(updateReqVO.getId()); + // 更新 + DictionaryBusinessDO updateObj = BeanUtils.toBean(updateReqVO, DictionaryBusinessDO.class); + dictionaryBusinessMapper.updateById(updateObj); + } + + @Override + public void deleteDictionaryBusiness(Long id) { + // 校验存在 + validateDictionaryBusinessExists(id); + // 删除 + dictionaryBusinessMapper.deleteById(id); + } + + @Override + public void deleteDictionaryBusinessListByIds(List ids) { + // 校验存在 + validateDictionaryBusinessExists(ids); + // 删除 + dictionaryBusinessMapper.deleteByIds(ids); + } + + private void validateDictionaryBusinessExists(List ids) { + List list = dictionaryBusinessMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(DICTIONARY_BUSINESS_NOT_EXISTS); + } + } + + private void validateDictionaryBusinessExists(Long id) { + if (dictionaryBusinessMapper.selectById(id) == null) { + throw exception(DICTIONARY_BUSINESS_NOT_EXISTS); + } + } + + @Override + public DictionaryBusinessDO getDictionaryBusiness(Long id) { + return dictionaryBusinessMapper.selectById(id); + } + + @Override + public PageResult getDictionaryBusinessPage(DictionaryBusinessPageReqVO pageReqVO) { + return dictionaryBusinessMapper.selectPage(pageReqVO); + } + + private String getIdPath(DictionaryBusinessDO entity){ + String parIdPath = ""; + if(ObjectUtils.isEmpty(entity.getParentId()) || 0L == entity.getParentId()) + parIdPath = "/0/"; + DictionaryBusinessDO parEntity = this.getDictionaryBusiness(entity.getParentId()); + if(parEntity != null){ + parIdPath = parEntity.getIdPath(); + } + return parIdPath + entity.getId() + "/"; + } +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/aspect/DictAspect.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/aspect/DictAspect.java new file mode 100644 index 0000000..02c6518 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/aspect/DictAspect.java @@ -0,0 +1,397 @@ +package cn.iocoder.yudao.module.qms.core.aspect; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.module.qms.core.aspect.annotation.Dict; +import cn.iocoder.yudao.module.qms.core.legend.LegendApi; +import cn.iocoder.yudao.module.qms.core.constant.CommonConstant; +import cn.iocoder.yudao.module.qms.core.legend.LegendConvertUtils; +import cn.iocoder.yudao.module.qms.core.legend.vo.DictModel; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.parser.Feature; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.extern.slf4j.Slf4j; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Component; +import org.springframework.util.StringUtils; + +import java.lang.reflect.Field; +import java.util.*; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUser; +import static cn.iocoder.yudao.module.qms.core.constant.CacheConstant.QMS_DICT_BIZ_CACHE; +import static cn.iocoder.yudao.module.qms.core.constant.CacheConstant.QMS_DICT_TABLE_CACHE; +import static cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant.DICT_ANNOTATION_SPLIT; + +@Aspect +@Component +@Slf4j +public class DictAspect { + @Lazy + @Autowired private LegendApi legendApi; + @Autowired public RedisTemplate redisTemplate; + + @Autowired private ObjectMapper objectMapper; + + private static final String JAVA_UTIL_DATE = "java.util.Date"; + + /** + * 定义切点Pointcut + */ + @Pointcut("execution(public * cn.iocoder.yudao.module.qms..*.*Controller.*(..))") + public void executeService() { + } + + @Around("executeService()") + public Object doAround(ProceedingJoinPoint pjp) throws Throwable { + long time1=System.currentTimeMillis(); + Object result = pjp.proceed(); + long time2=System.currentTimeMillis(); + log.info("获取JSON数据 耗时:"+(time2-time1)+"ms"); + long start=System.currentTimeMillis(); + result=this.parseDictText(result); + long end=System.currentTimeMillis(); + log.info("注入字典到JSON数据 耗时"+(end-start)+"ms"); + return result; + } + + /** + * 本方法针对返回对象为CommonResult 的 PageResult 的分页列表数据进行动态字典注入 + * 字典注入实现 通过对实体类添加注解@dict 来标识需要的字典内容,字典分为单字典code即可。 + * 同时支持table字典 code table text + * 示例为SysUser 字段为sex 添加了注解@Dict(dicCode = "sex") 会在字典服务立马查出来对应的text 然后在请求list的时候将这个字典text,已字段名称加_dictText形式返回到前端 + * 例输入当前返回值的就会多出一个sex_dictText字段 + * { + * sex:1, + * sex_dictText:"男" + * } + */ + private Object parseDictText(Object result) { + if (!(result instanceof CommonResult)) + return result; + Object data = ((CommonResult) result).getData(); + if (!(data instanceof PageResult)) + return result; + List items = new ArrayList<>(); + + //step.1 筛选出加了 Dict 注解的字段列表 + List dictFieldList = new ArrayList<>(); + // 字典数据列表, key = 字典code,value=数据列表 + Map> dataListMap = new HashMap<>(5); + //取出结果集 + List records = ((PageResult) data).getList();; + Boolean hasDict= checkHasDict(records); + if(!hasDict){ + return result; + } + + log.debug(" __ 进入字典翻译切面 DictAspect —— " ); + for (Object record : records) { + String json="{}"; + try { + json = objectMapper.writeValueAsString(record); + } catch (JsonProcessingException e) { + log.error("json解析失败"+e.getMessage(),e); + } + JSONObject item = JSONObject.parseObject(json, Feature.OrderedField); + + // 遍历所有字段,把字典Code取出来,放到 map 里 + for (Field field : LegendConvertUtils.getAllFields(record)) { + String value = item.getString(field.getName()); + if (LegendConvertUtils.isEmpty(value)) { + continue; + } + if (field.getAnnotation(Dict.class) == null) { + continue; + } + if (!dictFieldList.contains(field)) { + dictFieldList.add(field); + } + String code = field.getAnnotation(Dict.class).dicCode(); + String text = field.getAnnotation(Dict.class).dicText(); + String table = field.getAnnotation(Dict.class).dictTable(); + String keyOrId = field.getAnnotation(Dict.class).keyOrID(); + + List dataList; + String dictCode = code; + if (!StringUtils.isEmpty(table)) { + //指定table + dictCode = String.format("%s,%s,%s,%s", table, text, code, keyOrId); + }else{ + dictCode = String.format("%s"+DICT_ANNOTATION_SPLIT+"%s", code, keyOrId); + } + dataList = dataListMap.computeIfAbsent(dictCode, k -> new ArrayList<>()); + this.listAddAllDeduplicate(dataList, Arrays.asList(value.split(","))); + } + items.add(item); + } + + //step.2 调用翻译方法,一次性翻译 + Map> translText = this.translateAllDict(dataListMap); + + //step.3 将翻译结果填充到返回结果里 + for (JSONObject record : items) { + for (Field field : dictFieldList) { + String code = field.getAnnotation(Dict.class).dicCode(); + String text = field.getAnnotation(Dict.class).dicText(); + String table = field.getAnnotation(Dict.class).dictTable(); + //update-begin--Author:wxr -- Date:20230509 ----for:增加是否为业务字典 + + String fieldDictCode = code; + if (!StringUtils.isEmpty(table)) { + fieldDictCode = String.format("%s,%s,%s", table, text, code); + } + //update-end--Author:wxr -- Date:20230509 ----for:增加是否为业务字典 + + String value = record.getString(field.getName()); + if (LegendConvertUtils.isNotEmpty(value)) { + List dictModels = translText.get(fieldDictCode); + if(dictModels==null || dictModels.size()==0){ + continue; + } + + String textValue = this.translDictText(dictModels, value); + log.debug(" 字典Val : " + textValue); + log.debug(" __翻译字典字段__ " + field.getName() + CommonConstant.DICT_TEXT_SUFFIX + ": " + textValue); + + // TODO-sun 测试输出,待删 + log.debug(" ---- dictCode: " + fieldDictCode); + log.debug(" ---- value: " + value); + log.debug(" ----- text: " + textValue); + log.debug(" ---- dictModels: " + JSON.toJSONString(dictModels)); + + record.put(field.getName() + CommonConstant.DICT_TEXT_SUFFIX, textValue); + } + } + } + +// ((PageResult) ((CommonResult) result).getData()).setList(items); + ((PageResult) data).setList(items); + return result; + } + + /** + * list 去重添加 + */ + private void listAddAllDeduplicate(List dataList, List addList) { + // 筛选出dataList中没有的数据 + List filterList = addList.stream().filter(i -> !dataList.contains(i)).collect(Collectors.toList()); + dataList.addAll(filterList); + } + + /** + * 一次性把所有的字典都翻译了 + * 1. 所有的普通数据字典的所有数据只执行一次SQL + * 2. 表字典相同的所有数据只执行一次SQL + * @param dataListMap + * @return + */ + private Map> translateAllDict(Map> dataListMap) { + //获取当前租户 + LoginUser loginUser = getLoginUser(); + Long tenantId = loginUser.getTenantId(); + // 翻译后的字典文本,key=dictCode + Map> translText = new HashMap<>(5); + // 需要翻译的数据(有些可以从redis缓存中获取,就不走数据库查询) + List needTranslData = new ArrayList<>(); + // 需要翻译的数据 - 业务字典 + List needTanslBizData = new ArrayList<>(); + //step.1 先通过redis中获取缓存字典数据 + for (String dictCode : dataListMap.keySet()) { + List dataList = dataListMap.get(dictCode); + if (dataList.size() == 0) { + continue; + } + // 表字典需要翻译的数据 + List needTranslDataTable = new ArrayList<>(); + for (String s : dataList) { + String data = s.trim(); + if (data.length() == 0) { + continue; //跳过循环 + } + if (dictCode.contains(",")) { + String keyString = String.format(QMS_DICT_TABLE_CACHE + "::SimpleKey [%s,%s]", dictCode, data); + if (redisTemplate.hasKey(keyString)) { + try { + String text = LegendConvertUtils.getString(redisTemplate.opsForValue().get(keyString)); + List list = translText.computeIfAbsent(dictCode, k -> new ArrayList<>()); + list.add(new DictModel(data, text)); + } catch (Exception e) { + log.warn(e.getMessage()); + } + } else if (!needTranslDataTable.contains(data)) { + // 去重添加 + needTranslDataTable.add(data); + } + } else if (dictCode.startsWith("biz+")) { + String keyString = String.format(QMS_DICT_BIZ_CACHE + "::%s:%s:%s", tenantId, dictCode.substring(4), data); + if (redisTemplate.hasKey(keyString)) { + try { + String text = LegendConvertUtils.getString(redisTemplate.opsForValue().get(keyString)); + List list = translText.computeIfAbsent(dictCode, k -> new ArrayList<>()); + list.add(new DictModel(data, text)); + } catch (Exception e) { + log.warn(e.getMessage()); + } + } else if (!needTanslBizData.contains(data)) { + // 去重添加 + needTanslBizData.add(data); + } + } else { + String keyString = String.format(QMS_DICT_BIZ_CACHE + "::%s:%s", dictCode, data); + if (redisTemplate.hasKey(keyString)) { + try { + String text = LegendConvertUtils.getString(redisTemplate.opsForValue().get(keyString)); + List list = translText.computeIfAbsent(dictCode, k -> new ArrayList<>()); + list.add(new DictModel(data, text)); + } catch (Exception e) { + log.warn(e.getMessage()); + } + } else if (!needTranslData.contains(data)) { + // 去重添加 + needTranslData.add(data); + } + } + + } + //step.2 调用数据库翻译表字典 + if (needTranslDataTable.size() > 0) { + String[] arr = dictCode.split(","); + String table = arr[0], text = arr[1], code = arr[2]; + String values = String.join(",", needTranslDataTable); + log.debug("translateDictFromTableByKeys.dictCode:" + dictCode); + log.debug("translateDictFromTableByKeys.values:" + values); + List texts = legendApi.translateDictFromTableByKeys(table, text, code, values); + log.debug("translateDictFromTableByKeys.result:" + texts); + List list = translText.computeIfAbsent(dictCode, k -> new ArrayList<>()); + list.addAll(texts); + + // 做 redis 缓存 + String strTemplate = QMS_DICT_TABLE_CACHE + "::SimpleKey [%s,%s]"; + for (DictModel dict : texts) { + String redisKey = String.format(strTemplate, dictCode, dict.getValue()); + try { + // 保留1分钟 + redisTemplate.opsForValue().set(redisKey, dict.getText(), 60, TimeUnit.SECONDS); + } catch (Exception e) { + log.warn(e.getMessage(), e); + } + } + } + } + + //step.3 调用数据库进行翻译业务字典 + if (needTanslBizData.size() > 0) { + List dictCodeList = Arrays.asList(dataListMap.keySet().toArray(new String[]{})); + // 将业务字典的key筛选出来 + List filterDictCodes = dictCodeList.stream().filter(key -> key.startsWith("biz+")).map(key -> key.substring(4)).collect(Collectors.toList()); + String dictCodes = String.join(",", filterDictCodes); + String values = String.join(",", needTanslBizData); + log.debug("translateManyDictBiz.dictCodes:" + dictCodes); + log.debug("translateManyDictBiz.values:" + values); + + Map> manyDict = legendApi.translateManyDictBiz(dictCodes, values); + + log.debug("translateManyDictBiz.result:" + manyDict); + String strTemplate = QMS_DICT_BIZ_CACHE + "::%s:%s:%s"; + for (String dictCode : manyDict.keySet()) { + List list = translText.computeIfAbsent("biz+" + dictCode, k -> new ArrayList<>()); + List newList = manyDict.get(dictCode); + list.addAll(newList); + // 做 redis 缓存 + for (DictModel dict : newList) { + String redisKey = String.format(strTemplate, tenantId, dictCode, dict.getValue()); + try { + redisTemplate.opsForValue().set(redisKey, dict.getText()); + } catch (Exception e) { + log.warn(e.getMessage(), e); + } + } + } + } + + //step.4 调用数据库进行翻译普通字典 + if (needTranslData.size() > 0) { + List dictCodeList = Arrays.asList(dataListMap.keySet().toArray(new String[]{})); + // 将不包含逗号的字典code筛选出来,因为带逗号的是表字典,而不是普通的数据字典 + List filterDictCodes = dictCodeList.stream().filter(key -> !key.contains(",")).collect(Collectors.toList()); + String dictCodes = String.join(",", filterDictCodes); + String values = String.join(",", needTranslData); + log.debug("translateManyDict.dictCodes:" + dictCodes); + log.debug("translateManyDict.values:" + values); + + Map> manyDict = legendApi.translateManyDict(dictCodes, values); + String strTemplate = QMS_DICT_BIZ_CACHE + "::%s:%s"; + log.debug("translateManyDict.result:" + manyDict); + for (String dictCode : manyDict.keySet()) { + List list = translText.computeIfAbsent(dictCode, k -> new ArrayList<>()); + List newList = manyDict.get(dictCode); + list.addAll(newList); + + // 做 redis 缓存 + for (DictModel dict : newList) { + String redisKey = String.format(strTemplate, dictCode, dict.getValue()); + try { + redisTemplate.opsForValue().set(redisKey, dict.getText()); + } catch (Exception e) { + log.warn(e.getMessage(), e); + } + } + } + } + return translText; + } + + /** + * 字典值替换文本 + * + * @param dictModels + * @param values + * @return + */ + private String translDictText(List dictModels, String values) { + List result = new ArrayList<>(); + + // 允许多个逗号分隔,允许传数组对象 + String[] splitVal = values.split(","); + for (String val : splitVal) { + String dictText = val; + for (DictModel dict : dictModels) { + if (val.equals(dict.getValue())) { + dictText = dict.getText(); + break; + } + } + result.add(dictText); + } + return String.join(",", result); + } + + /** + * 检测返回结果集中是否包含Dict注解 + * @param records + * @return + */ + private Boolean checkHasDict(List records){ + if(LegendConvertUtils.isNotEmpty(records) && records.size()>0){ + for (Field field : LegendConvertUtils.getAllFields(records.get(0))) { + if (LegendConvertUtils.isNotEmpty(field.getAnnotation(Dict.class))) { + return true; + } + } + } + return false; + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/aspect/annotation/Dict.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/aspect/annotation/Dict.java new file mode 100644 index 0000000..781faf9 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/aspect/annotation/Dict.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.qms.core.aspect.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import static cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant.DICT_ANNOTATION_KEY_TYPE_KEY; + + +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.RUNTIME) +public @interface Dict { + + String dicCode(); + + String dicText() default ""; + + String keyOrID() default DICT_ANNOTATION_KEY_TYPE_KEY; + + String dictTable() default ""; +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/CodeGenUtil.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/CodeGenUtil.java new file mode 100644 index 0000000..9d96480 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/CodeGenUtil.java @@ -0,0 +1,252 @@ +package cn.iocoder.yudao.module.qms.core.code; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +import org.apache.commons.lang.StringUtils; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Component; + +import com.alibaba.fastjson.JSON; + +import cn.hutool.core.collection.ListUtil; +import cn.hutool.core.date.DateUtil; +import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; +import lombok.RequiredArgsConstructor; + + +@Component +@RequiredArgsConstructor +public class CodeGenUtil { + + private final RedisTemplate redisTemplate; + + //private final RabbitMqClient rabbitMqClient; + + private final static String REDIS_SERIAL_NUM_KEY = "mas:serial_num"; + + private final static String REDIS_RANDOM_NUM_KEY = "mas:random_num"; + + /** + * 生成编码 + * 编码生成规则,以“|”分割:/、原样输出;?、编密号;@、当前日期格式化;#、财务月日期格式化;*、流水号配置以“-”分割,第一位流水号编码(为?时需要传入动态流水号编号),第二位流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算);^、随机获取一个批量生成的编码,配置以“-”分割,第一位随机流水号编码,第二位随机流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算) + * @param codeRule 编码规则 + * @return + */ + public String genCode(String codeRule) { + return genCode(null, "", "", codeRule); + } + + + /** + * 生成编码 + * 编码生成规则,以“|”分割:/、原样输出;?、编密号;@、当前日期格式化;#、财务月日期格式化;*、流水号配置以“-”分割,第一位流水号编码(为?时需要传入动态流水号编号),第二位流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算);^、随机获取一个批量生成的编码,配置以“-”分割,第一位随机流水号编码,第二位随机流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算) + * @param prefix 前缀 + * @param codeRule 编码规则 + * @return + */ + public String genCode(String prefix, String codeRule) { + return genCode(null, prefix, "", codeRule); + } + + + /** + * 生成编码 + * 编码生成规则,以“|”分割:/、原样输出;?、编密号;@、当前日期格式化;#、财务月日期格式化;*、流水号配置以“-”分割,第一位流水号编码(为?时需要传入动态流水号编号),第二位流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算);^、随机获取一个批量生成的编码,配置以“-”分割,第一位随机流水号编码,第二位随机流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算) + * @param tenantId 租户id + * @param prefix 前缀 + * @param codeRule 编码规则 + * @return + */ + public String genCode(String tenantId, String prefix, String codeRule) { + return genCode(tenantId, prefix, null, codeRule); + } + + /** + * 动态生成编码 + * 编码生成规则,以“|”分割:/、原样输出;?、编密号;@、当前日期格式化;#、财务月日期格式化;*、流水号配置以“-”分割,第一位流水号编码(为?时需要传入动态流水号编号),第二位流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算);^、随机获取一个批量生成的编码,配置以“-”分割,第一位随机流水号编码,第二位随机流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算) + * @param prefix 前缀 + * @param dynamicSerialNumCode 动态流水号编码 + * @param codeRule 编码规则 + * @return + */ + public String genDynamicCode(String prefix, String dynamicSerialNumCode, String codeRule) { + return genCode(null, prefix, dynamicSerialNumCode, codeRule); + } + + /** + * 生成编码 + * 编码生成规则,以“|”分割:/、原样输出;?、编密号;@、当前日期格式化;#、财务月日期格式化;*、流水号配置以“-”分割,第一位流水号编码(为?时需要传入动态流水号编号),第二位流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算);^、随机获取一个批量生成的编码,配置以“-”分割,第一位随机流水号编码,第二位随机流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算) + * @param tenantId 租户id + * @param prefix 前缀 + * @param dynamicSerialNumCode 动态流水号编码 + * @param codeRule 编码规则 + * @return + */ + public String genCode(String tenantId, String prefix, String dynamicSerialNumCode, String codeRule) { + if (StringUtils.isBlank(codeRule)) { + return ""; + } + if(StringUtils.isBlank(tenantId)) { + tenantId = TenantContextHolder.getRequiredTenantId().toString(); + } + String[] rules = codeRule.split("\\|");//竖线分割 + if (rules.length < 1) { + return ""; + } + StringBuffer codeBuffer = new StringBuffer(prefix); + for (String rule : rules) { + String ruleStart = rule.substring(0, 1); + switch (ruleStart) { + case "/": + codeBuffer.append(rule.substring(1)); + break; + case "@": + codeBuffer.append(DateUtil.format(new Date(), rule.substring(1))); + break; + case "#": + codeBuffer.append(getFinancialYearAndMonth(rule.substring(1))); + break; + case "?": + codeBuffer.append(SampleEncryptUtil.sampleEncrypt()); + if (StringUtils.isNotBlank(prefix)) { + codeBuffer.delete(0, prefix.length()); + } + break; + case "*"://流水号 + String serialNumRule = rule.substring(1); + String[] serialNumRules = serialNumRule.split("-"); + if (serialNumRules.length != 3) { + throw new IllegalArgumentException("流水号规则不正确!"); + + } + String serialNumCode = serialNumRules[0];//流水号编码 + if("?".equals(serialNumCode)) { + if (StringUtils.isBlank(dynamicSerialNumCode)) { + throw new IllegalArgumentException("动态流水号编码需要必传!"); + } + serialNumCode = dynamicSerialNumCode; + } + + Integer serialNumSeveral = Integer.parseInt(serialNumRules[1]);//流水号位数 + String serialNumCodeRule = serialNumRules[2];//流水号生成规则 + String serialNumRedisKey = null; + switch (serialNumCodeRule) { + case "D"://按日 + String day = DateUtil.format(new Date(), "yyyyMMdd"); + serialNumRedisKey = tenantId + ":" + REDIS_SERIAL_NUM_KEY + ":" + serialNumCode + ":D:" + day; + break; + case "M"://按月 + String month = DateUtil.format(new Date(), "yyyyMM"); + serialNumRedisKey = tenantId + ":" + REDIS_SERIAL_NUM_KEY + ":" + serialNumCode + ":M:" + month; + break; + case "Y"://按年 + String year = DateUtil.format(new Date(), "yyyy"); + serialNumRedisKey = tenantId + ":" + REDIS_SERIAL_NUM_KEY + ":" + serialNumCode + ":Y:" + year; + break; + case "F"://按财务月 + String financialMonth = getFinancialYearAndMonth("yyyyMM"); + serialNumRedisKey = tenantId + ":" + REDIS_SERIAL_NUM_KEY + ":" + serialNumCode + ":F:" + financialMonth; + break; + } + long serialNum = redisTemplate.opsForValue().increment(serialNumRedisKey, 1); +// BaseMap baseMap = new BaseMap(); +// baseMap.put("redisKey", serialNumRedisKey); +// baseMap.put("redisValue", serialNum); +// rabbitMqClient.sendQmsSerialnumMessage(baseMap); + codeBuffer.append(String.format("%0"+serialNumSeveral+"d", serialNum)); + break; + case "^"://批量生成,随机获取 + String batchSerialNumRule = rule.substring(1); + String[] batchSerialNumRules = batchSerialNumRule.split("-"); + if (batchSerialNumRules.length != 3) { + throw new IllegalArgumentException("流水号规则不正确!"); + + } + String batchSerialNumCode = batchSerialNumRules[0];//流水号编码 + Integer batchSerialNumSeveral = Integer.parseInt(batchSerialNumRules[1]);//随机流水号位数 + String batchSerialNumCodeRule = batchSerialNumRules[2];//流水号生成规则 + String batchSerialNumRedisKey = null; + long batchSerialNumRedisKeyTimeout = 0; + switch (batchSerialNumCodeRule) { + case "D"://按日 + String day = DateUtil.format(new Date(), "yyyyMMdd"); + batchSerialNumRedisKey = tenantId + ":" + REDIS_RANDOM_NUM_KEY + ":" + batchSerialNumCode + ":D:" + day; + batchSerialNumRedisKeyTimeout = 2; + break; + case "M"://按月 + String month = DateUtil.format(new Date(), "yyyyMM"); + batchSerialNumRedisKey = tenantId + ":" + REDIS_RANDOM_NUM_KEY + ":" + batchSerialNumCode + ":M:" + month; + batchSerialNumRedisKeyTimeout = 40; + break; + case "Y"://按年 + String year = DateUtil.format(new Date(), "yyyy"); + batchSerialNumRedisKey = tenantId + ":" + REDIS_RANDOM_NUM_KEY + ":" + batchSerialNumCode + ":Y:" + year; + batchSerialNumRedisKeyTimeout = 370; + break; + case "F"://按财务月 + String financialMonth = getFinancialYearAndMonth("yyyyMM"); + batchSerialNumRedisKey = tenantId + ":" + REDIS_RANDOM_NUM_KEY + ":" + batchSerialNumCode + ":F:" + financialMonth; + batchSerialNumRedisKeyTimeout = 50; + break; + } + + String value = null; + if (redisTemplate.hasKey(batchSerialNumRedisKey)) {//key存在 + value = redisTemplate.opsForSet().pop(batchSerialNumRedisKey); + } else { + StringBuffer maxBuffer = new StringBuffer(); + for (int i = 0; i < batchSerialNumSeveral; i++) { + maxBuffer.append(9); + } + long max = Long.valueOf(maxBuffer.toString()); + + List valueList = new ArrayList<>(); + for (int i = 1; i <= max; i++) { + valueList.add(String.format("%0" + batchSerialNumSeveral + "d", i)); + } + + String key = batchSerialNumRedisKey; + ListUtil.page(valueList, 1000, ls -> { + String[] array = ls.toArray(new String[ls.size()]); + redisTemplate.opsForSet().add(key, array); + }); + redisTemplate.expire(batchSerialNumRedisKey, batchSerialNumRedisKeyTimeout, TimeUnit.DAYS); + + value = redisTemplate.opsForSet().pop(batchSerialNumRedisKey); + } + Set members = redisTemplate.opsForSet().members(batchSerialNumRedisKey); +// BaseMap randomBaseMap = new BaseMap(); +// randomBaseMap.put("redisKey", batchSerialNumRedisKey); +// randomBaseMap.put("redisRandomValue", JSON.toJSONString(members)); +// rabbitMqClient.sendQmsSerialnumMessage(randomBaseMap); + codeBuffer.append(value); + break; + } + } + return codeBuffer.toString(); + } + + /** + * 获取财务年月 + * @param codeRule 财务年月格式(如:yyMM、yyyyMM、yy-MM-、yyMM-) + * @return + */ + public String getFinancialYearAndMonth(String codeRule) { + String yearMonth = ""; + Calendar now = Calendar.getInstance(); + int year = now.get(Calendar.YEAR); + int month = now.get(Calendar.MONTH) + 1; + int day = now.get(Calendar.DAY_OF_MONTH); + if (day <= 25 || (day <= 31 && month == 12)) { + yearMonth = DateUtil.format(DateUtil.parse(year + "-" + month + "-01", "yyyy-MM-dd"), codeRule); + } else { + yearMonth = DateUtil.format(DateUtil.parse(year + "-" + (month + 1) + "-01", "yyyy-MM-dd"), codeRule); + } + return yearMonth; + } +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/SampleEncryptUtil.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/SampleEncryptUtil.java new file mode 100644 index 0000000..3ee8624 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/SampleEncryptUtil.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.qms.core.code; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import org.apache.commons.lang.StringUtils; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; + +public class SampleEncryptUtil { + + private static final String[] ID_CHAR_SET = { + "0","1","2","3","4","5","6","7","8","9", + "A","B","C","D","E","F","G","H","I","J", + "K","L","M","N","P","Q","R","S","T","U", + "V","W","X","Y","Z"}; + + public static String sampleEncrypt() { + long id = IdWorker.getId(); + return sampleEncrypt(id); + } + + public static String sampleEncrypt(long id) { + String pivotStr = pivotStr(id + ""); + String to35Num = to35Num(pivotStr); + return StringUtils.leftPad(to35Num, 13, '0'); + } + + private static String to35Num(String l) { + List al = new ArrayList<>(); + BigInteger y = new BigInteger(l); + BigInteger t; + while (y.compareTo(BigInteger.ZERO) > 0) { + t = y.mod(new BigInteger(ID_CHAR_SET.length + "")); + y = y.divide(new BigInteger(ID_CHAR_SET.length + "")); + al.add(0, ID_CHAR_SET[t.intValue()]); + } + StringBuffer sb = new StringBuffer(); + for (String c : al) { + sb.append(c); + } + return sb.toString(); + } + + /** + * 字符串反转 + * @param str + * @return + */ + private static String pivotStr(String str) { + StringBuilder sb = new StringBuilder(); + char[] charArray = str.toCharArray(); + for (int i = charArray.length; i-- > 0; ) { + sb.append(charArray[i]); + } + return sb.toString(); + } +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/SequenceUtil.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/SequenceUtil.java new file mode 100644 index 0000000..358e066 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/SequenceUtil.java @@ -0,0 +1,58 @@ +package cn.iocoder.yudao.module.qms.core.code; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.stereotype.Component; + +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.system.api.sequence.SequenceApi; +import lombok.RequiredArgsConstructor; + +/** + * SequenceUtil + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月9日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月9日 + */ +@Component +@RequiredArgsConstructor +public class SequenceUtil { + + private final SequenceApi sequenceApi; + + private final CodeGenUtil codeGenUtil; + + /** + * 样品编号生成 + * @param sequenceCode 序列号编码 + * @return + */ + public String genCode(String sequenceCode) { + if (sequenceApi == null) { + throw new ServiceException(500, "序列号服务为空"); + } + String circulationValue = null; + List inputStrs = null; + + if (sequenceCode.lastIndexOf("_CFY") > 0) { + circulationValue = codeGenUtil.getFinancialYearAndMonth("yyyyMM"); + inputStrs = new ArrayList<>(); + inputStrs.add(circulationValue); + } + + CommonResult result = sequenceApi.getNextSequence(sequenceCode, circulationValue, inputStrs); + if (result != null && result.isSuccess() && result.getData() != null) { + return result.getData(); + } + throw new ServiceException(500, "调用远程服务获取序列号异常"); + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/CacheConstant.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/CacheConstant.java new file mode 100644 index 0000000..b55f953 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/CacheConstant.java @@ -0,0 +1,8 @@ +package cn.iocoder.yudao.module.qms.core.constant; + +public class CacheConstant { + + public static final String QMS_DICT_BIZ_CACHE = "qms:cache:dict"; + public static final String QMS_DICT_TABLE_CACHE = "qms:cache:dictTable"; + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/CommonConstant.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/CommonConstant.java new file mode 100644 index 0000000..8127cdc --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/CommonConstant.java @@ -0,0 +1,78 @@ +package cn.iocoder.yudao.module.qms.core.constant; + +public class CommonConstant { + + + /** + * 删除标志 + */ + public static final Integer DEL_FLAG_1 = 1; + + /** + * 未删除 + */ + public static final Integer DEL_FLAG_0 = 0; + + /** + * 是否禁用-1-是 + */ + public static final Integer CANCEL_FLAG_1 = 1; + + /** + * 是否禁用-1-否 + */ + public static final Integer CANCEL_FLAG_0 = 0; + + /** + * 是否用户已被冻结 1正常(解冻) 2冻结 3离职 + */ + public static final Integer USER_UNFREEZE = 1; + public static final Integer USER_FREEZE = 2; + public static final Integer USER_QUIT = 3; + + /** + * 用户来源(1、平台管理创建,2、租户自建,3、 iwork同步) + */ + public static final Integer USER_SOURCE_PLATFORM = 1; + public static final Integer USER_SOURCE_TENANT = 2; + public static final Integer USER_SOURCE_IWORK = 3; + + /** + * 字典翻译文本后缀 + */ + public static final String DICT_TEXT_SUFFIX = "_dictText"; + + /** + * 未知的 + */ + public static final String UNKNOWN = "unknown"; + + /** + * String 类型的空值 + */ + public static final String STRING_NULL = "null"; + + /** + * 部门表唯一key,id + */ + public static final String DEPART_KEY_ID = "id"; + /** + * 部门表唯一key,orgCode + */ + public static final String DEPART_KEY_ORG_CODE = "orgCode"; + + /** + * 不是叶子节点 + */ + public static final Integer NOT_LEAF = 0; + + /** + * 是叶子节点 + */ + public static final Integer IS_LEAF = 1; + + + //================数据库常量====================== + public static final String SQL_WHERE = "where"; + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/DataTypeConstant.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/DataTypeConstant.java new file mode 100644 index 0000000..62bb4d1 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/DataTypeConstant.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.qms.core.constant; + +/* +* 简单常量定义 +* 数据类型 +* */ +public class DataTypeConstant { + + //分类与数据 + public static final String DATA_TYPE_CATEGORY = "category"; + public static final String DATA_TYPE_DATA = "data"; + + + /* + * 字典注解-字典值类型。默认key,可选id + * */ + public static final String DICT_ANNOTATION_KEY_TYPE_KEY = "key"; + public static final String DICT_ANNOTATION_KEY_TYPE_ID = "id"; + public static final String DICT_ANNOTATION_SPLIT = "#-#"; + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/SymbolConstant.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/SymbolConstant.java new file mode 100644 index 0000000..aa01d1e --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/SymbolConstant.java @@ -0,0 +1,114 @@ +package cn.iocoder.yudao.module.qms.core.constant; + +public class SymbolConstant { + + /** + * 符号:点 + */ + public static final String SPOT = "."; + + /** + * 符号:双斜杠 + */ + public static final String DOUBLE_BACKSLASH = "\\"; + + /** + * 符号:冒号 + */ + public static final String COLON = ":"; + + /** + * 符号:逗号 + */ + public static final String COMMA = ","; + + /** + * 符号:左花括号 } + */ + public static final String LEFT_CURLY_BRACKET = "{"; + + /** + * 符号:右花括号 } + */ + public static final String RIGHT_CURLY_BRACKET = "}"; + + /** + * 符号:井号 # + */ + public static final String WELL_NUMBER = "#"; + + /** + * 符号:单斜杠 + */ + public static final String SINGLE_SLASH = "/"; + + /** + * 符号:双斜杠 + */ + public static final String DOUBLE_SLASH = "//"; + + /** + * 符号:感叹号 + */ + public static final String EXCLAMATORY_MARK = "!"; + + /** + * 符号:下划线 + */ + public static final String UNDERLINE = "_"; + + /** + * 符号:单引号 + */ + public static final String SINGLE_QUOTATION_MARK = "'"; + + /** + * 符号:星号 + */ + public static final String ASTERISK = "*"; + + /** + * 符号:百分号 + */ + public static final String PERCENT_SIGN = "%"; + + /** + * 符号:美元 $ + */ + public static final String DOLLAR = "$"; + + /** + * 符号:和 & + */ + public static final String AND = "&"; + + /** + * 符号:../ + */ + public static final String SPOT_SINGLE_SLASH = "../"; + + /** + * 符号:..\\ + */ + public static final String SPOT_DOUBLE_BACKSLASH = "..\\"; + + /** + * 系统变量前缀 #{ + */ + public static final String SYS_VAR_PREFIX = "#{"; + + /** + * 符号 {{ + */ + public static final String DOUBLE_LEFT_CURLY_BRACKET = "{{"; + + /** + * 符号:[ + */ + public static final String SQUARE_BRACKETS_LEFT = "["; + /** + * 符号:] + */ + public static final String SQUARE_BRACKETS_RIGHT = "]"; + +} \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/LegendApi.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/LegendApi.java new file mode 100644 index 0000000..3349a60 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/LegendApi.java @@ -0,0 +1,83 @@ +package cn.iocoder.yudao.module.qms.core.legend; + +import cn.iocoder.yudao.module.qms.common.dic.service.DictionaryBusinessService; +import cn.iocoder.yudao.module.qms.core.legend.vo.DictModel; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +import static cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant.DICT_ANNOTATION_KEY_TYPE_KEY; +import static cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant.DICT_ANNOTATION_SPLIT; + +@Slf4j +@Service +public class LegendApi { + + @Resource + DictionaryBusinessService dictionaryBusinessService; + /** + * 普通字典的翻译,根据多个dictCode和多条数据,多个以逗号分割 + * @param dictCodes 例如:user_status,sex + * @param keys 例如:1,2,0 + * @return + */ + public Map> translateManyDict(String dictCodes, String keys){ + List dictCodeList = Arrays.asList(dictCodes.split(",")); + List values = Arrays.asList(keys.split(",")); + return dictionaryBusinessService.queryManyDict(dictCodeList, values); + } + + + /** + * 业务字典的翻译,根据多个dictCode和多条数据,多个以逗号分割 + * @param dictCodes 例如:user_status,sex + * @param keys 例如:1,2,0 + * @return + */ + public Map> translateManyDictBiz(String dictCodes, String keys) { + List dictCodeList = Arrays.asList(dictCodes.split(",")); + List values = Arrays.asList(keys.split(",")); +// if(DICT_ANNOTATION_KEY_TYPE_KEY.equals(keyOrId)) + return dictionaryBusinessService.queryManyDict(dictCodeList, values); +// return dictionaryBusinessService.queryManyDictByIDs(dictCodeList, values); + } + + /** + * 字典表的 翻译,可批量 + * @param table + * @param text + * @param code + * @param keys 多个用逗号分割 + * @return + */ + public List translateDictFromTableByKeys(String table, String text, String code, String keys) { + return dictionaryBusinessService.queryTableDictText(table, text, code, List.of(keys.split(","))); + } + + /** + * 字典表翻译 + * */ + public String translateDictFromTable(String table, String text, String code, String key) { + return dictionaryBusinessService.queryTableDictTextByKey(table, text, code, key); + } + + /** + * 普通字典翻译 + * */ + public String translateDict(String code, String key){ + String keyOrId = DICT_ANNOTATION_KEY_TYPE_KEY; + if(code.contains(DICT_ANNOTATION_SPLIT)){ + keyOrId = code.split(DICT_ANNOTATION_SPLIT)[1]; + code = code.split(DICT_ANNOTATION_SPLIT)[0]; + } + if(DICT_ANNOTATION_KEY_TYPE_KEY.equals(keyOrId)) + return dictionaryBusinessService.queryDictTextByKey(code, key); + return dictionaryBusinessService.queryDictTextByID(code, key); + } + + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/LegendConvertUtils.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/LegendConvertUtils.java new file mode 100644 index 0000000..dfec99d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/LegendConvertUtils.java @@ -0,0 +1,804 @@ +package cn.iocoder.yudao.module.qms.core.legend; + +import cn.iocoder.yudao.module.qms.core.constant.CommonConstant; +import cn.iocoder.yudao.module.qms.core.constant.SymbolConstant; +import com.alibaba.fastjson.JSONArray; +import jakarta.servlet.http.HttpServletRequest; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.springframework.beans.BeanUtils; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.net.SocketException; +import java.net.UnknownHostException; +import java.sql.Date; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +@Slf4j +public class LegendConvertUtils { + public static boolean isEmpty(Object object) { + if (object == null) { + return (true); + } + if ("".equals(object)) { + return (true); + } + if (CommonConstant.STRING_NULL.equals(object)) { + return (true); + } + return (false); + } + + public static boolean isNotEmpty(Object object) { + if (object != null && !"".equals(object) && !object.equals(CommonConstant.STRING_NULL)) { + return (true); + } + return (false); + } + + public static String decode(String strIn, String sourceCode, String targetCode) { + String temp = code2code(strIn, sourceCode, targetCode); + return temp; + } + + @SuppressWarnings("AlibabaLowerCamelCaseVariableNaming") + public static String StrToUTF(String strIn, String sourceCode, String targetCode) { + strIn = ""; + try { + strIn = new String(strIn.getBytes("ISO-8859-1"), "GBK"); + } catch (UnsupportedEncodingException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return strIn; + + } + + private static String code2code(String strIn, String sourceCode, String targetCode) { + String strOut = null; + if (strIn == null || "".equals(strIn.trim())) { + return strIn; + } + try { + byte[] b = strIn.getBytes(sourceCode); + for (int i = 0; i < b.length; i++) { + System.out.print(b[i] + " "); + } + strOut = new String(b, targetCode); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + return strOut; + } + + public static int getInt(String s, int defval) { + if (s == null || "".equals(s)) { + return (defval); + } + try { + return (Integer.parseInt(s)); + } catch (NumberFormatException e) { + return (defval); + } + } + + public static int getInt(String s) { + if (s == null || "".equals(s)) { + return 0; + } + try { + return (Integer.parseInt(s)); + } catch (NumberFormatException e) { + return 0; + } + } + + public static int getInt(String s, Integer df) { + if (s == null || "".equals(s)) { + return df; + } + try { + return (Integer.parseInt(s)); + } catch (NumberFormatException e) { + return 0; + } + } + + public static Integer[] getInts(String[] s) { + if (s == null) { + return null; + } + Integer[] integer = new Integer[s.length]; + for (int i = 0; i < s.length; i++) { + integer[i] = Integer.parseInt(s[i]); + } + return integer; + + } + + public static double getDouble(String s, double defval) { + if (s == null || "".equals(s)) { + return (defval); + } + try { + return (Double.parseDouble(s)); + } catch (NumberFormatException e) { + return (defval); + } + } + + public static double getDou(Double s, double defval) { + if (s == null) { + return (defval); + } + return s; + } + + /*public static Short getShort(String s) { + if (StringUtil.isNotEmpty(s)) { + return (Short.parseShort(s)); + } else { + return null; + } + }*/ + + public static int getInt(Object object, int defval) { + if (isEmpty(object)) { + return (defval); + } + try { + return (Integer.parseInt(object.toString())); + } catch (NumberFormatException e) { + return (defval); + } + } + + public static Integer getInt(Object object) { + if (isEmpty(object)) { + return null; + } + try { + return (Integer.parseInt(object.toString())); + } catch (NumberFormatException e) { + return null; + } + } + + public static int getInt(BigDecimal s, int defval) { + if (s == null) { + return (defval); + } + return s.intValue(); + } + + public static Integer[] getIntegerArry(String[] object) { + int len = object.length; + Integer[] result = new Integer[len]; + try { + for (int i = 0; i < len; i++) { + result[i] = Integer.valueOf(object[i].trim()); + } + return result; + } catch (NumberFormatException e) { + return null; + } + } + + public static String getString(String s) { + return (getString(s, "")); + } + + /** + * 转义成Unicode编码 + * @param s + * @return + */ + /*public static String escapeJava(Object s) { + return StringEscapeUtils.escapeJava(getString(s)); + }*/ + + public static String getString(Object object) { + if (isEmpty(object)) { + return ""; + } + return (object.toString().trim()); + } + + public static String getString(int i) { + return (String.valueOf(i)); + } + + public static String getString(float i) { + return (String.valueOf(i)); + } + + public static String getString(String s, String defval) { + if (isEmpty(s)) { + return (defval); + } + return (s.trim()); + } + + public static String getString(Object s, String defval) { + if (isEmpty(s)) { + return (defval); + } + return (s.toString().trim()); + } + + public static long stringToLong(String str) { + Long test = new Long(0); + try { + test = Long.valueOf(str); + } catch (Exception e) { + } + return test.longValue(); + } + + /** + * 获取本机IP + */ + public static String getIp() { + String ip = null; + try { + InetAddress address = InetAddress.getLocalHost(); + ip = address.getHostAddress(); + + } catch (UnknownHostException e) { + e.printStackTrace(); + } + return ip; + } + + /** + * 判断一个类是否为基本数据类型。 + * + * @param clazz + * 要判断的类。 + * @return true 表示为基本数据类型。 + */ + private static boolean isBaseDataType(Class clazz) throws Exception { + return (clazz.equals(String.class) || clazz.equals(Integer.class) || clazz.equals(Byte.class) || clazz.equals(Long.class) || clazz.equals(Double.class) || clazz.equals(Float.class) || clazz.equals(Character.class) || clazz.equals(Short.class) || clazz.equals(BigDecimal.class) || clazz.equals(BigInteger.class) || clazz.equals(Boolean.class) || clazz.equals(Date.class) || clazz.isPrimitive()); + } + + /** + * @param request + * IP + * @return IP Address + */ + public static String getIpAddrByRequest(HttpServletRequest request) { + String ip = request.getHeader("x-forwarded-for"); + if (ip == null || ip.length() == 0 || CommonConstant.UNKNOWN.equalsIgnoreCase(ip)) { + ip = request.getHeader("Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || CommonConstant.UNKNOWN.equalsIgnoreCase(ip)) { + ip = request.getHeader("WL-Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || CommonConstant.UNKNOWN.equalsIgnoreCase(ip)) { + ip = request.getRemoteAddr(); + } + return ip; + } + + /** + * @return 本机IP + * @throws SocketException + */ + public static String getRealIp() throws SocketException { + // 本地IP,如果没有配置外网IP则返回它 + String localip = null; + // 外网IP + String netip = null; + + Enumeration netInterfaces = NetworkInterface.getNetworkInterfaces(); + InetAddress ip = null; + // 是否找到外网IP + boolean finded = false; + while (netInterfaces.hasMoreElements() && !finded) { + NetworkInterface ni = netInterfaces.nextElement(); + Enumeration address = ni.getInetAddresses(); + while (address.hasMoreElements()) { + ip = address.nextElement(); + // 外网IP + if (!ip.isSiteLocalAddress() && !ip.isLoopbackAddress() && ip.getHostAddress().indexOf(":") == -1) { + netip = ip.getHostAddress(); + finded = true; + break; + } else if (ip.isSiteLocalAddress() && !ip.isLoopbackAddress() && ip.getHostAddress().indexOf(":") == -1) { + // 内网IP + localip = ip.getHostAddress(); + } + } + } + + if (netip != null && !"".equals(netip)) { + return netip; + } else { + return localip; + } + } + + /** + * java去除字符串中的空格、回车、换行符、制表符 + * + * @param str + * @return + */ + public static String replaceBlank(String str) { + String dest = ""; + if (str != null) { + String reg = "\\s*|\t|\r|\n"; + Pattern p = Pattern.compile(reg); + Matcher m = p.matcher(str); + dest = m.replaceAll(""); + } + return dest; + + } + + /** + * 判断元素是否在数组内 + * + * @param child + * @param all + * @return + */ + public static boolean isIn(String child, String[] all) { + if (all == null || all.length == 0) { + return false; + } + for (int i = 0; i < all.length; i++) { + String aSource = all[i]; + if (aSource.equals(child)) { + return true; + } + } + return false; + } + + /** + * 判断元素是否在数组内 + * + * @param childArray + * @param all + * @return + */ + public static boolean isArrayIn(String[] childArray, String[] all) { + if (all == null || all.length == 0) { + return false; + } + for (String v : childArray) { + if (!isIn(v, all)) { + return false; + } + } + return true; + } + + /** + * 判断元素是否在数组内 + * + * @param childArray + * @param all + * @return + */ + public static boolean isJsonArrayIn(JSONArray childArray, String[] all) { + if (all == null || all.length == 0) { + return false; + } + + String[] childs = childArray.toArray(new String[]{}); + for (String v : childs) { + if (!isIn(v, all)) { + return false; + } + } + return true; + } + + /** + * 获取Map对象 + */ + public static Map getHashMap() { + return new HashMap<>(5); + } + + /** + * SET转换MAP + * + * @param str + * @return + */ + public static Map setToMap(Set setobj) { + Map map = getHashMap(); + for (Iterator iterator = setobj.iterator(); iterator.hasNext();) { + Map.Entry entry = (Map.Entry) iterator.next(); + map.put(entry.getKey().toString(), entry.getValue() == null ? "" : entry.getValue().toString().trim()); + } + return map; + + } + + public static boolean isInnerIp(String ipAddress) { + boolean isInnerIp = false; + long ipNum = getIpNum(ipAddress); + /** + * 私有IP:A类 10.0.0.0-10.255.255.255 B类 172.16.0.0-172.31.255.255 C类 192.168.0.0-192.168.255.255 当然,还有127这个网段是环回地址 + **/ + long aBegin = getIpNum("10.0.0.0"); + long aEnd = getIpNum("10.255.255.255"); + long bBegin = getIpNum("172.16.0.0"); + long bEnd = getIpNum("172.31.255.255"); + long cBegin = getIpNum("192.168.0.0"); + long cEnd = getIpNum("192.168.255.255"); + String localIp = "127.0.0.1"; + isInnerIp = isInner(ipNum, aBegin, aEnd) || isInner(ipNum, bBegin, bEnd) || isInner(ipNum, cBegin, cEnd) || localIp.equals(ipAddress); + return isInnerIp; + } + + private static long getIpNum(String ipAddress) { + String[] ip = ipAddress.split("\\."); + long a = Integer.parseInt(ip[0]); + long b = Integer.parseInt(ip[1]); + long c = Integer.parseInt(ip[2]); + long d = Integer.parseInt(ip[3]); + + long ipNum = a * 256 * 256 * 256 + b * 256 * 256 + c * 256 + d; + return ipNum; + } + + private static boolean isInner(long userIp, long begin, long end) { + return (userIp >= begin) && (userIp <= end); + } + + /** + * 将下划线大写方式命名的字符串转换为驼峰式。 + * 如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。
+ * 例如:hello_world->helloWorld + * + * @param name + * 转换前的下划线大写方式命名的字符串 + * @return 转换后的驼峰式命名的字符串 + */ + public static String camelName(String name) { + StringBuilder result = new StringBuilder(); + // 快速检查 + if (name == null || name.isEmpty()) { + // 没必要转换 + return ""; + } else if (!name.contains(SymbolConstant.UNDERLINE)) { + // 不含下划线,仅将首字母小写 + //update-begin--Author:zhoujf Date:20180503 for:TASK #2500 【代码生成器】代码生成器开发一通用模板生成功能 + //update-begin--Author:zhoujf Date:20180503 for:TASK #2500 【代码生成器】代码生成器开发一通用模板生成功能 + return name.substring(0, 1).toLowerCase() + name.substring(1).toLowerCase(); + //update-end--Author:zhoujf Date:20180503 for:TASK #2500 【代码生成器】代码生成器开发一通用模板生成功能 + } + // 用下划线将原始字符串分割 + String[] camels = name.split("_"); + for (String camel : camels) { + // 跳过原始字符串中开头、结尾的下换线或双重下划线 + if (camel.isEmpty()) { + continue; + } + // 处理真正的驼峰片段 + if (result.length() == 0) { + // 第一个驼峰片段,全部字母都小写 + result.append(camel.toLowerCase()); + } else { + // 其他的驼峰片段,首字母大写 + result.append(camel.substring(0, 1).toUpperCase()); + result.append(camel.substring(1).toLowerCase()); + } + } + return result.toString(); + } + + /** + * 将下划线大写方式命名的字符串转换为驼峰式。 + * 如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。
+ * 例如:hello_world,test_id->helloWorld,testId + * + * @param name + * 转换前的下划线大写方式命名的字符串 + * @return 转换后的驼峰式命名的字符串 + */ + public static String camelNames(String names) { + if(names==null||"".equals(names)){ + return null; + } + StringBuffer sf = new StringBuffer(); + String[] fs = names.split(","); + for (String field : fs) { + field = camelName(field); + sf.append(field + ","); + } + String result = sf.toString(); + return result.substring(0, result.length() - 1); + } + + //update-begin--Author:zhoujf Date:20180503 for:TASK #2500 【代码生成器】代码生成器开发一通用模板生成功能 + /** + * 将下划线大写方式命名的字符串转换为驼峰式。(首字母写) + * 如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。
+ * 例如:hello_world->HelloWorld + * + * @param name + * 转换前的下划线大写方式命名的字符串 + * @return 转换后的驼峰式命名的字符串 + */ + public static String camelNameCapFirst(String name) { + StringBuilder result = new StringBuilder(); + // 快速检查 + if (name == null || name.isEmpty()) { + // 没必要转换 + return ""; + } else if (!name.contains(SymbolConstant.UNDERLINE)) { + // 不含下划线,仅将首字母小写 + return name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase(); + } + // 用下划线将原始字符串分割 + String[] camels = name.split("_"); + for (String camel : camels) { + // 跳过原始字符串中开头、结尾的下换线或双重下划线 + if (camel.isEmpty()) { + continue; + } + // 其他的驼峰片段,首字母大写 + result.append(camel.substring(0, 1).toUpperCase()); + result.append(camel.substring(1).toLowerCase()); + } + return result.toString(); + } + //update-end--Author:zhoujf Date:20180503 for:TASK #2500 【代码生成器】代码生成器开发一通用模板生成功能 + + /** + * 将驼峰命名转化成下划线 + * @param para + * @return + */ + public static String camelToUnderline(String para){ + int length = 3; + if(para.length() clazz = object.getClass(); + List fieldList = new ArrayList<>(); + while (clazz != null) { + fieldList.addAll(new ArrayList<>(Arrays.asList(clazz.getDeclaredFields()))); + clazz = clazz.getSuperclass(); + } + Field[] fields = new Field[fieldList.size()]; + fieldList.toArray(fields); + return fields; + } + + /** + * 将map的key全部转成小写 + * @param list + * @return + */ + public static List> toLowerCasePageList(List> list){ + List> select = new ArrayList<>(); + for (Map row : list) { + Map resultMap = new HashMap<>(5); + Set keySet = row.keySet(); + for (String key : keySet) { + String newKey = key.toLowerCase(); + resultMap.put(newKey, row.get(key)); + } + select.add(resultMap); + } + return select; + } + + /** + * 将entityList转换成modelList + * @param fromList + * @param tClass + * @param + * @param + * @return + */ + public static List entityListToModelList(List fromList, Class tClass){ + if(fromList == null || fromList.isEmpty()){ + return null; + } + List tList = new ArrayList<>(); + for(F f : fromList){ + T t = entityToModel(f, tClass); + tList.add(t); + } + return tList; + } + + public static T entityToModel(F entity, Class modelClass) { + log.debug("entityToModel : Entity属性的值赋值到Model"); + Object model = null; + if (entity == null || modelClass ==null) { + return null; + } + + try { + model = modelClass.newInstance(); + } catch (InstantiationException e) { + log.error("entityToModel : 实例化异常", e); + } catch (IllegalAccessException e) { + log.error("entityToModel : 安全权限异常", e); + } + BeanUtils.copyProperties(entity, model); + return (T)model; + } + + /** + * 判断 list 是否为空 + * + * @param list + * @return true or false + * list == null : true + * list.size() == 0 : true + */ + public static boolean listIsEmpty(Collection list) { + return (list == null || list.size() == 0); + } + + /** + * 判断旧值与新值 是否相等 + * + * @param oldVal + * @param newVal + * @return + */ + public static boolean isEqual(Object oldVal, Object newVal) { + if (oldVal != null && newVal != null) { + if (isArray(oldVal)) { + return equalityOfArrays((Object[]) oldVal, (Object[]) newVal); + }else if(oldVal instanceof JSONArray){ + return equalityOfJSONArray((JSONArray) oldVal, (JSONArray) newVal); + } + return oldVal.equals(newVal); + } else { + if (oldVal == null && newVal == null) { + return true; + } else { + return false; + } + } + } + + /** + * 方法描述 判断一个对象是否是一个数组 + * + * @param obj + * @return + * @author yaomy + * @date 2018年2月5日 下午5:03:00 + */ + public static boolean isArray(Object obj) { + if (obj == null) { + return false; + } + return obj.getClass().isArray(); + } + + /** + * 判断两个数组是否相等(数组元素不分顺序) + * + * @param oldVal + * @param newVal + * @return + */ + public static boolean equalityOfJSONArray(JSONArray oldVal, JSONArray newVal) { + if (oldVal != null && newVal != null) { + Object[] oldValArray = oldVal.toArray(); + Object[] newValArray = newVal.toArray(); + return equalityOfArrays(oldValArray,newValArray); + } else { + if (oldVal == null && newVal == null) { + return true; + } else { + return false; + } + } + } + + /** + * 判断两个数组是否相等(数组元素不分顺序) + * + * @param oldVal + * @param newVal + * @return + */ + public static boolean equalityOfArrays(Object[] oldVal, Object newVal[]) { + if (oldVal != null && newVal != null) { + Arrays.sort(oldVal); + Arrays.sort(newVal); + return Arrays.equals(oldVal, newVal); + } else { + if (oldVal == null && newVal == null) { + return true; + } else { + return false; + } + } + } + +// public static void main(String[] args) { +//// String[] a = new String[]{"1", "2"}; +//// String[] b = new String[]{"2", "1"}; +// Integer a = null; +// Integer b = 1; +// System.out.println(LegendConvertUtils.isEqual(a, b)); +// } + + /** + * 判断 list 是否不为空 + * + * @param list + * @return true or false + * list == null : false + * list.size() == 0 : false + */ + public static boolean listIsNotEmpty(Collection list) { + return !listIsEmpty(list); + } + + /** + * 读取静态文本内容 + * @param url + * @return + */ + public static String readStatic(String url) { + String json = ""; + try { + //换个写法,解决springboot读取jar包中文件的问题 + InputStream stream = LegendConvertUtils.class.getClassLoader().getResourceAsStream(url.replace("classpath:", "")); + json = IOUtils.toString(stream,"UTF-8"); + } catch (IOException e) { + log.error(e.getMessage(),e); + } + return json; + } +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/SqlInjectionUtil.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/SqlInjectionUtil.java new file mode 100644 index 0000000..3fedc6f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/SqlInjectionUtil.java @@ -0,0 +1,344 @@ +package cn.iocoder.yudao.module.qms.core.legend; + +import cn.iocoder.yudao.module.qms.core.constant.SymbolConstant; +import lombok.extern.slf4j.Slf4j; + +import java.lang.reflect.Field; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.SQL_INJECTION_EXCEPTION; + +/** + * sql注入处理工具类 + * + * @author zhoujf + */ +@Slf4j +public class SqlInjectionUtil { + /** + * sign 用于表字典加签的盐值【SQL漏洞】 + * (上线修改值 20200501,同步修改前端的盐值) + */ + private final static String TABLE_DICT_SIGN_SALT = "20200501"; + private final static String XSS_STR = "and |extractvalue|updatexml|geohash|gtid_subset|gtid_subtract|exec |insert |select |delete |update |drop |count |chr |mid |master |truncate |char |declare |;|or |+|user()"; + + /** + * 正则 user() 匹配更严谨 + */ + private final static String REGULAR_EXPRE_USER = "user[\\s]*\\([\\s]*\\)"; + /**正则 show tables*/ + private final static String SHOW_TABLES = "show\\s+tables"; + + /** + * sleep函数 + */ + private final static Pattern FUN_SLEEP = Pattern.compile("sleep\\(.*\\)", Pattern.CASE_INSENSITIVE); + + /** + * sql注释的正则 + */ + private final static Pattern SQL_ANNOTATION = Pattern.compile("/\\*[\\s\\S]*\\*/"); + + + + /** + * 返回查询表名 + *

+ * sql注入过滤处理,遇到注入关键字抛异常 + * + * @param table + */ + private static Pattern tableNamePattern = Pattern.compile("^[a-zA-Z][a-zA-Z0-9_]{0,63}$"); + public static String getSqlInjectTableName(String table) { + table = table.trim(); + /** + * 检验表名是否合法 + * + * 表名只能由字母、数字和下划线组成。 + * 表名必须以字母开头。 + * 表名长度通常有限制,例如最多为 64 个字符。 + */ + boolean isValidTableName = tableNamePattern.matcher(table).matches(); + if (!isValidTableName) { + throw exception(SQL_INJECTION_EXCEPTION); + } + + //进一步验证是否存在SQL注入风险 + filterContent(table); + return table; + } + + + /** + * 返回查询字段 + *

+ * sql注入过滤处理,遇到注入关键字抛异常 + * + * @param field + */ + static final Pattern fieldPattern = Pattern.compile("^[a-zA-Z0-9_]+$"); + public static String getSqlInjectField(String field) { + if(LegendConvertUtils.isEmpty(field)){ + return null; + } + field = field.trim(); + + if (field.contains(SymbolConstant.COMMA)) { + return getSqlInjectField(field.split(SymbolConstant.COMMA)); + } + + /** + * 校验表字段是否有效 + * + * 字段定义只能是是字母 数字 下划线的组合(不允许有空格、转义字符串等) + */ + boolean isValidField = fieldPattern.matcher(field).matches(); + if (!isValidField) { + throw exception(SQL_INJECTION_EXCEPTION); + } + + //进一步验证是否存在SQL注入风险 + filterContent(field); + return field; + } + + public static String getSqlInjectField(String... fields) { + for (String s : fields) { + getSqlInjectField(s); + } + return String.join(SymbolConstant.COMMA, fields); + } + + /** + * sql注入过滤处理,遇到注入关键字抛异常 + * + * @param value + * @return + */ + public static void filterContent(String value, String customXssString) { + if (value == null || "".equals(value)) { + return; + } + // 校验sql注释 不允许有sql注释 + checkSqlAnnotation(value); + // 统一转为小写 + value = value.toLowerCase(); + //SQL注入检测存在绕过风险 https://gitee.com/jeecg/jeecg-boot/issues/I4NZGE + //value = value.replaceAll("/\\*.*\\*/",""); + + String[] xssArr = XSS_STR.split("\\|"); + for (int i = 0; i < xssArr.length; i++) { + if (value.indexOf(xssArr[i]) > -1) { + log.error("请注意,存在SQL注入关键词---> {}", xssArr[i]); + log.error("请注意,值可能存在SQL注入风险!---> {}", value); + throw exception(SQL_INJECTION_EXCEPTION); + } + } + //update-begin-author:taoyan date:2022-7-13 for: 除了XSS_STR这些提前设置好的,还需要额外的校验比如 单引号 + if (customXssString != null) { + String[] xssArr2 = customXssString.split("\\|"); + for (int i = 0; i < xssArr2.length; i++) { + if (value.indexOf(xssArr2[i]) > -1) { + log.error("请注意,存在SQL注入关键词---> {}", xssArr2[i]); + log.error("请注意,值可能存在SQL注入风险!---> {}", value); + throw exception(SQL_INJECTION_EXCEPTION); + } + } + } + //update-end-author:taoyan date:2022-7-13 for: 除了XSS_STR这些提前设置好的,还需要额外的校验比如 单引号 + if(Pattern.matches(SHOW_TABLES, value) || Pattern.matches(REGULAR_EXPRE_USER, value)){ + throw exception(SQL_INJECTION_EXCEPTION); + } + return; + } + + /** + * sql注入过滤处理,遇到注入关键字抛异常 + * @param values + */ + public static void filterContent(String... values) { + filterContent(values, null); + } + + /** + * sql注入过滤处理,遇到注入关键字抛异常 + * + * @param values + * @return + */ + public static void filterContent(String[] values, String customXssString) { + String[] xssArr = XSS_STR.split("\\|"); + for (String value : values) { + if (value == null || "".equals(value)) { + return; + } + // 校验sql注释 不允许有sql注释 + checkSqlAnnotation(value); + // 统一转为小写 + value = value.toLowerCase(); + //SQL注入检测存在绕过风险 https://gitee.com/jeecg/jeecg-boot/issues/I4NZGE + //value = value.replaceAll("/\\*.*\\*/",""); + + for (int i = 0; i < xssArr.length; i++) { + if (value.indexOf(xssArr[i]) > -1) { + log.error("请注意,存在SQL注入关键词---> {}", xssArr[i]); + log.error("请注意,值可能存在SQL注入风险!---> {}", value); + throw exception(SQL_INJECTION_EXCEPTION); + } + } + //update-begin-author:taoyan date:2022-7-13 for: 除了XSS_STR这些提前设置好的,还需要额外的校验比如 单引号 + if (customXssString != null) { + String[] xssArr2 = customXssString.split("\\|"); + for (int i = 0; i < xssArr2.length; i++) { + if (value.indexOf(xssArr2[i]) > -1) { + log.error("请注意,存在SQL注入关键词---> {}", xssArr2[i]); + log.error("请注意,值可能存在SQL注入风险!---> {}", value); + throw exception(SQL_INJECTION_EXCEPTION); + } + } + } + //update-end-author:taoyan date:2022-7-13 for: 除了XSS_STR这些提前设置好的,还需要额外的校验比如 单引号 + if(Pattern.matches(SHOW_TABLES, value) || Pattern.matches(REGULAR_EXPRE_USER, value)){ + throw exception(SQL_INJECTION_EXCEPTION); + } + } + return; + } + + /** + * 【提醒:不通用】 + * 仅用于字典条件SQL参数,注入过滤 + * + * @param value + * @return + */ + //@Deprecated + public static void specialFilterContentForDictSql(String value) { + String specialXssStr = " exec |extractvalue|updatexml|geohash|gtid_subset|gtid_subtract| insert | select | delete | update | drop | count | chr | mid | master | truncate | char | declare |;|+|user()"; + String[] xssArr = specialXssStr.split("\\|"); + if (value == null || "".equals(value)) { + return; + } + // 校验sql注释 不允许有sql注释 + checkSqlAnnotation(value); + // 统一转为小写 + value = value.toLowerCase(); + //SQL注入检测存在绕过风险 https://gitee.com/jeecg/jeecg-boot/issues/I4NZGE + //value = value.replaceAll("/\\*.*\\*/",""); + + for (int i = 0; i < xssArr.length; i++) { + if (value.indexOf(xssArr[i]) > -1 || value.startsWith(xssArr[i].trim())) { + log.error("请注意,存在SQL注入关键词---> {}", xssArr[i]); + log.error("请注意,值可能存在SQL注入风险!---> {}", value); + throw exception(SQL_INJECTION_EXCEPTION); + } + } + if(Pattern.matches(SHOW_TABLES, value) || Pattern.matches(REGULAR_EXPRE_USER, value)){ + throw exception(SQL_INJECTION_EXCEPTION); + } + return; + } + + + /** + * 【提醒:不通用】 + * 仅用于Online报表SQL解析,注入过滤 + * @param value + * @return + */ + //@Deprecated + public static void specialFilterContentForOnlineReport(String value) { + String specialXssStr = " exec |extractvalue|updatexml|geohash|gtid_subset|gtid_subtract| insert | delete | update | drop | chr | mid | master | truncate | char | declare |user()"; + String[] xssArr = specialXssStr.split("\\|"); + if (value == null || "".equals(value)) { + return; + } + // 校验sql注释 不允许有sql注释 + checkSqlAnnotation(value); + // 统一转为小写 + value = value.toLowerCase(); + //SQL注入检测存在绕过风险 https://gitee.com/jeecg/jeecg-boot/issues/I4NZGE + //value = value.replaceAll("/\\*.*\\*/"," "); + + for (int i = 0; i < xssArr.length; i++) { + if (value.indexOf(xssArr[i]) > -1 || value.startsWith(xssArr[i].trim())) { + log.error("请注意,存在SQL注入关键词---> {}", xssArr[i]); + log.error("请注意,值可能存在SQL注入风险!---> {}", value); + throw exception(SQL_INJECTION_EXCEPTION); + } + } + + if(Pattern.matches(SHOW_TABLES, value) || Pattern.matches(REGULAR_EXPRE_USER, value)){ + throw exception(SQL_INJECTION_EXCEPTION); + } + return; + } + + + /** + * 判断给定的字段是不是类中的属性 + * @param field 字段名 + * @param clazz 类对象 + * @return + */ + public static boolean isClassField(String field, Class clazz){ + Field[] fields = clazz.getDeclaredFields(); + for(int i=0;i fieldSet, Class clazz){ + Field[] fields = clazz.getDeclaredFields(); + for(String field: fieldSet){ + boolean exist = false; + for(int i=0;i ruleMap = new HashMap<>(); + + /** + * 以下字符不能出现在表名中或是字段名中 + */ + public static final Pattern ILLEGAL_NAME_REG = Pattern.compile("[-]{2,}"); + + static { + ruleMap.put("sys_user", "password,salt"); + } + + + /** + * 根据 sql语句 获取表和字段信息,需要到具体的实现类重写此方法- + * 不同的场景 处理可能不太一样 需要自定义,但是返回值确定 + * @param sql + * @return + */ + protected abstract List getQueryTableInfo(String sql); + + + /** + * 校验sql语句 成功返回true + * @param sql + * @return + */ + public boolean isPass(String sql) { + List list = null; + //【jeecg-boot/issues/4040】在线报表不支持子查询,解析报错 #4040 + try { + list = this.getQueryTableInfo(sql.toLowerCase()); + } catch (Exception e) { + log.warn("校验sql语句,解析报错:{}",e.getMessage()); + } + + if(list==null){ + return true; + } + log.info(" 获取sql信息 :{} ", list.toString()); + boolean flag = checkTableAndFieldsName(list); + if(flag == false){ + return false; + } + for (QueryTable table : list) { + String name = table.getName(); + String fieldRule = ruleMap.get(name); + // 有没有配置这张表 + if (fieldRule != null) { + if ("*".equals(fieldRule) || table.isAll()) { + flag = false; + log.warn("sql黑名单校验,表【"+name+"】禁止查询"); + break; + } else if (table.existSameField(fieldRule)) { + flag = false; + break; + } + + } + } + + // 返回黑名单校验结果(不合法直接抛出异常) + if(!flag){ + log.error(this.getError()); + throw exception(SQL_INJECTION_EXCEPTION); + } + return flag; + } + + /** + * 校验表名和字段名是否有效,或是是否会带些特殊的字符串进行sql注入 + * issues/4983 SQL Injection in 3.5.1 #4983 + * @return + */ + private boolean checkTableAndFieldsName(List list){ + boolean flag = true; + for(QueryTable queryTable: list){ + String tableName = queryTable.getName(); + if(hasSpecialString(tableName)){ + flag = false; + log.warn("sql黑名单校验,表名【"+tableName+"】包含特殊字符"); + break; + } + Set fields = queryTable.getFields(); + for(String name: fields){ + if(hasSpecialString(name)){ + flag = false; + log.warn("sql黑名单校验,字段名【"+name+"】包含特殊字符"); + break; + } + } + } + return flag; + } + + /** + * 是否包含特殊的字符串 + * @param name + * @return + */ + private boolean hasSpecialString(String name){ + Matcher m = ILLEGAL_NAME_REG.matcher(name); + if (m.find()) { + return true; + } + return false; + } + + + /** + * 查询的表的信息 + */ + protected class QueryTable { + //表名 + private String name; + //表的别名 + private String alias; + // 字段名集合 + private Set fields; + // 是否查询所有字段 + private boolean all; + + public QueryTable() { + } + + public QueryTable(String name, String alias) { + this.name = name; + this.alias = alias; + this.all = false; + this.fields = new HashSet<>(); + } + + public void addField(String field) { + this.fields.add(field); + } + + public String getName() { + return name; + } + + public Set getFields() { + return new HashSet<>(fields); + } + + public void setName(String name) { + this.name = name; + } + + public void setFields(Set fields) { + this.fields = fields; + } + + public String getAlias() { + return alias; + } + + public void setAlias(String alias) { + this.alias = alias; + } + + public boolean isAll() { + return all; + } + + public void setAll(boolean all) { + this.all = all; + } + + /** + * 判断是否有相同字段 + * + * @param fieldString + * @return + */ + public boolean existSameField(String fieldString) { + String[] controlFields = fieldString.split(","); + for (String sqlField : fields) { + for (String controlField : controlFields) { + if (sqlField.equals(controlField)) { + // 非常明确的列直接比较 + log.warn("sql黑名单校验,表【"+name+"】中字段【"+controlField+"】禁止查询"); + return true; + } else { + // 使用表达式的列 只能判读字符串包含了 + String aliasColumn = controlField; + if (StringUtils.isNotBlank(alias)) { + aliasColumn = alias + "." + controlField; + } + if (sqlField.indexOf(aliasColumn) != -1) { + log.warn("sql黑名单校验,表【"+name+"】中字段【"+controlField+"】禁止查询"); + return true; + } + } + } + } + return false; + } + + @Override + public String toString() { + return "QueryTable{" + + "name='" + name + '\'' + + ", alias='" + alias + '\'' + + ", fields=" + fields + + ", all=" + all + + '}'; + } + } + + public String getError(){ + // TODO + return "系统设置了安全规则,敏感表和敏感字段禁止查询,联系管理员授权!"; + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/security/DictQueryBlackListHandler.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/security/DictQueryBlackListHandler.java new file mode 100644 index 0000000..3421b99 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/security/DictQueryBlackListHandler.java @@ -0,0 +1,80 @@ +package cn.iocoder.yudao.module.qms.core.legend.security; + +import cn.iocoder.yudao.module.qms.core.constant.SymbolConstant; +import cn.iocoder.yudao.module.qms.core.legend.LegendConvertUtils; +import org.springframework.stereotype.Component; + +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import java.util.ArrayList; +import java.util.List; + +/** + * 字典组件 执行sql前校验 只校验表字典 + * dictCodeString格式如: + * table,text,code + * table where xxx,text,code + * table,text,code, where xxx + * + * @Author taoYan + * @Date 2022/3/23 21:10 + **/ +@Component("dictQueryBlackListHandler") +public class DictQueryBlackListHandler extends AbstractQueryBlackListHandler { + + @Override + protected List getQueryTableInfo(String dictCodeString) { + //针对转义字符进行解码 + try { + if (dictCodeString.contains("%")) { + dictCodeString = URLDecoder.decode(dictCodeString, "UTF-8"); + } + } catch (UnsupportedEncodingException e) { + //e.printStackTrace(); + } + dictCodeString = dictCodeString.trim(); + + // 无论什么场景 第二、三个元素一定是表的字段,直接add + if (dictCodeString != null && dictCodeString.indexOf(SymbolConstant.COMMA) > 0) { + String[] arr = dictCodeString.split(SymbolConstant.COMMA); + if (arr.length != 3 && arr.length != 4) { + return null; + } + String tableName = getTableName(arr[0]); + QueryTable table = new QueryTable(tableName, ""); + // 无论什么场景 第二、三个元素一定是表的字段,直接add + table.addField(arr[1].trim()); + String filed = arr[2].trim(); + if (LegendConvertUtils.isNotEmpty(filed)) { + table.addField(filed); + } + List list = new ArrayList<>(); + list.add(table); + return list; + } + return null; + } + + /** + * 取where前面的为:table name + * + * @param str + * @return + */ + private String getTableName(String str) { + String[] arr = str.split("\\s+(?i)where\\s+"); + String tableName = arr[0].trim(); + //【20230814】解决使用参数tableName=sys_user t&复测,漏洞仍然存在 + if (tableName.contains(".")) { + tableName = tableName.substring(tableName.indexOf(".")+1, tableName.length()).trim(); + } + if (tableName.contains(" ")) { + tableName = tableName.substring(0, tableName.indexOf(" ")).trim(); + } + + //【issues/4393】 sys_user , (sys_user), sys_user%20, %60sys_user%60 + String reg = "\\s+|\\(|\\)|`"; + return tableName.replaceAll(reg, ""); + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/vo/DictModel.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/vo/DictModel.java new file mode 100644 index 0000000..de00ca5 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/vo/DictModel.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.core.legend.vo; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@JsonIgnoreProperties(ignoreUnknown = true) +public class DictModel implements Serializable { + private static final long serialVersionUID = 1L; + + public DictModel() { + } + + public DictModel(String value, String text) { + this.value = value; + this.text = text; + } + + /** + * 字典值 + */ + private String value; + /** + * 字典文本 + */ + private String text; + + public String getTitle() { + return this.text; + } + + public String getLabel() { + return this.text; + } +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/vo/DictModelMany.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/vo/DictModelMany.java new file mode 100644 index 0000000..a89576a --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/vo/DictModelMany.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.qms.core.legend.vo; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +public class DictModelMany extends DictModel{ + + /** + * 字典code,根据多个字段code查询时才用到,用于区分不同的字典选项 + */ + private String dictCode; + + public DictModelMany(String dictCode, String value, String text) { + super(value, text); + this.dictCode = dictCode; + } +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/cmp/DefaultNoHandleCmp.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/cmp/DefaultNoHandleCmp.java new file mode 100644 index 0000000..f508dc8 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/cmp/DefaultNoHandleCmp.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.qms.core.liteflow.cmp; + +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +/** + * DefaultNoHandleCmp + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月6日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月6日 + */ +@LiteflowComponent(id = "defaultNoHandleCmp", name = "默认不处理组件") +public class DefaultNoHandleCmp extends NodeComponent { + + @Override + public void process() throws Exception { + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/constant/QmsXmlFlowElParserConstant.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/constant/QmsXmlFlowElParserConstant.java new file mode 100644 index 0000000..797c045 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/constant/QmsXmlFlowElParserConstant.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.qms.core.liteflow.constant; + +public interface QmsXmlFlowElParserConstant { + + public static final String CHAIN_XML_PATTERN = "{}"; + + public static final String CHAIN_WITH_ROUTE_XML_PATTERN = ""; + + public static final String NODE_XML_PATTERN = "{}"; + + public static final String NODE_ITEM_XML_PATTERN = ""; + + public static final String NODE_ITEM_WITH_LANGUAGE_XML_PATTERN = ""; + + public static final String XML_PATTERN = "{}{}"; +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/handler/LoderLiteFlowHandler.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/handler/LoderLiteFlowHandler.java new file mode 100644 index 0000000..6f8afda --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/handler/LoderLiteFlowHandler.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.qms.core.liteflow.handler; + +import org.springframework.stereotype.Component; + +import com.yomahub.liteflow.core.FlowExecutor; + +import cn.iocoder.yudao.framework.mq.redis.core.pubsub.AbstractRedisChannelMessageListener; +import jakarta.annotation.Resource; + +/** + * LoderLiteFlowHandler + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月8日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月8日 + */ +@Component +public class LoderLiteFlowHandler extends AbstractRedisChannelMessageListener { + + @Resource + private FlowExecutor flowExecutor; + + @Override + public void onMessage(RedisLiteFlowMessage message) { + flowExecutor.reloadRule(); + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/handler/RedisLiteFlowMessage.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/handler/RedisLiteFlowMessage.java new file mode 100644 index 0000000..3572640 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/handler/RedisLiteFlowMessage.java @@ -0,0 +1,23 @@ +package cn.iocoder.yudao.module.qms.core.liteflow.handler; + +import cn.iocoder.yudao.framework.mq.redis.core.pubsub.AbstractRedisChannelMessage; +import lombok.Data; + +/** + * RedisLiteFlowMessage + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月9日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月9日 + */ +@Data +public class RedisLiteFlowMessage extends AbstractRedisChannelMessage { + + private Long id; + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/parser/QmsXmlFlowELParser.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/parser/QmsXmlFlowELParser.java new file mode 100644 index 0000000..7d3fa01 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/parser/QmsXmlFlowELParser.java @@ -0,0 +1,80 @@ +package cn.iocoder.yudao.module.qms.core.liteflow.parser; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; + +import com.yomahub.liteflow.parser.el.ClassXmlFlowELParser; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.core.util.XmlUtil; +import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowCodeDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowRuleDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSimpleFlowCodeService; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSimpleFlowRuleService; +import cn.iocoder.yudao.module.qms.core.liteflow.constant.QmsXmlFlowElParserConstant; + + +public class QmsXmlFlowELParser extends ClassXmlFlowELParser { + + private ConfigSimpleFlowRuleService configSimpleFlowRuleService; + + private ConfigSimpleFlowCodeService configSimpleFlowCodeService; + + public QmsXmlFlowELParser(ConfigSimpleFlowRuleService configSimpleFlowRuleService, ConfigSimpleFlowCodeService configSimpleFlowCodeService) { + this.configSimpleFlowRuleService = configSimpleFlowRuleService; + this.configSimpleFlowCodeService = configSimpleFlowCodeService; + } + + @Override + public String parseCustom() { + String content = TenantUtils.executeIgnore(() -> { + List liteflowScriptList = configSimpleFlowCodeService.getConfigSimpleFlowCodeList(); + List scriptResult = new ArrayList<>(); + String nodesContent = StrUtil.EMPTY; + if (scriptResult != null && scriptResult.size() >= 0) { + for (ConfigSimpleFlowCodeDO liteflowScript : liteflowScriptList) { + String id = liteflowScript.getCodeNo(); + String data = liteflowScript.getCodeData(); + String name = liteflowScript.getCodeName(); + String type = liteflowScript.getCodeType(); + String language = liteflowScript.getCodeLanguage(); + if (StringUtils.isNotBlank(language)) { + scriptResult.add(StrUtil.format(QmsXmlFlowElParserConstant.NODE_ITEM_WITH_LANGUAGE_XML_PATTERN, XmlUtil.escape(id), XmlUtil.escape(name), type, language, data)); + } else { + scriptResult.add(StrUtil.format(QmsXmlFlowElParserConstant.NODE_ITEM_XML_PATTERN, XmlUtil.escape(id), XmlUtil.escape(name), type, data)); + } + } + nodesContent = StrUtil.format(QmsXmlFlowElParserConstant.NODE_XML_PATTERN, CollUtil.join(scriptResult, StrUtil.EMPTY)); + } + + List liteflowChainList = configSimpleFlowRuleService.getConfigSimpleFlowRuleList(); + List chainResult = new ArrayList<>(); + for (ConfigSimpleFlowRuleDO liteflowChain : liteflowChainList) { + String chainName = liteflowChain.getName() + liteflowChain.getTenantId(); + String elData = liteflowChain.getData(); + String route = liteflowChain.getRoute(); + String namespace = liteflowChain.getGroupName(); + if (StringUtils.isNotBlank(route)) {//决策路由 + chainResult.add(StrUtil.format(QmsXmlFlowElParserConstant.CHAIN_WITH_ROUTE_XML_PATTERN, XmlUtil.escape(chainName), StrUtil.emptyIfNull(namespace), StrUtil.emptyIfNull(route), elData)); + } else { + chainResult.add(StrUtil.format(QmsXmlFlowElParserConstant.CHAIN_XML_PATTERN, XmlUtil.escape(chainName), elData)); + } + + } + //当还未配置时,添加一个默认的规则,否则启动会报错 + if (chainResult.size() <= 0) { + chainResult.add(StrUtil.format(QmsXmlFlowElParserConstant.CHAIN_XML_PATTERN, "default-demo", "SER()")); + } + String chainsContent = CollUtil.join(chainResult, StrUtil.EMPTY); + + return StrUtil.format(QmsXmlFlowElParserConstant.XML_PATTERN, nodesContent, chainsContent); + }); + return content; + } + + + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/sampleflow/SampleFlowDefinition.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/sampleflow/SampleFlowDefinition.java new file mode 100644 index 0000000..a3e0da0 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/sampleflow/SampleFlowDefinition.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.qms.core.sampleflow; + +import java.io.Serializable; +import java.util.List; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * SampleFlowDefinition + * 样品流程定义 + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月8日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月8日 + */ +@Data +@Accessors(chain = true) +public class SampleFlowDefinition implements Serializable { + + private static final long serialVersionUID = 3152663586263529674L; + + private String flowKey; + + private String flowName; + + private List flowNodeList; + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/sampleflow/SampleFlowNode.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/sampleflow/SampleFlowNode.java new file mode 100644 index 0000000..e671e8e --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/sampleflow/SampleFlowNode.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.qms.core.sampleflow; + +import java.io.Serializable; +import java.util.List; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * SampleFlowNode + *

+ * 更新历史: + *

 版本         更新时间            更新者        更新内容
+ * V1.0 2025年9月8日 wxr Add
+ * Copyright (C) 云南志者竟成科技有限公司 + *

+ * @author 王兴荣 + * @version V1.0 + * @since 2025年9月8日 + */ +@Data +@Accessors(chain = true) +public class SampleFlowNode implements Serializable { + + private static final long serialVersionUID = 7600634660596892065L; + + /** 当前流程节点key **/ + private String nodeKey; + + /** 当前流程节点名称 **/ + private String nodeName; + + /** 是否默认流程 **/ + private Boolean isDefault; + + /** 下级流程节点 **/ + private List nextFlowNodeList; +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/GridReport.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/GridReport.java new file mode 100644 index 0000000..bf1e676 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/GridReport.java @@ -0,0 +1,188 @@ +package cn.iocoder.yudao.module.qms.framework.gridreport; + +import java.io.Serializable; +import java.util.Map; + +import cn.iocoder.yudao.module.qms.framework.gridreport.exception.GridReportException; +import gridreport.jni.BinaryObject; +import gridreport.jni.E2IMGOption; +import gridreport.jni.ExportImageType; +import gridreport.jni.ExportOption; +import gridreport.jni.ExportType; +import gridreport.jni.Report; +import lombok.extern.slf4j.Slf4j; + +/** + * GridReport + *

更新历史:

+ *
 版本         更新时间            更新者        更新内容
+ * V1.0      2022-2-25          王兴荣         Add
+ * Copyright (C) 云南志者竟成科技有限公司 + * @author 王兴荣 <xingrong_wang@will-way.cn> + * @version V1.0 + * @since 2022-2-25 + */ +@Slf4j +public class GridReport implements Serializable { + + private static final long serialVersionUID = -8308393930858342837L; + + private String gridReportOutPath; + + public GridReport() {} + + public GridReport(String gridReportOutPath) { + this.gridReportOutPath = gridReportOutPath; + } + + /** + * 输出目录 + * @return + */ + public String getGridReportOutPath() { + return gridReportOutPath; + } + + /** + * 获取报表对象 + * @return + * @throws Exception + */ + public Report getReport() throws Exception { + if (!"amd64".equalsIgnoreCase(System.getProperty("os.arch"))) { + log.error("锐浪报表SDK不支持当前" + System.getProperty("os.arch") + "平台!"); + } + Report report = new Report(); + if (report.getNativeHandle() == 0) { + throw new Exception("Report Create failed."); + } + return report; + } + + /** + * 导出报表二进制数据 + * @param reportTemplate 报表模板json数据 + * @param reportData 报表json数据 + * @param reportParams 报表参数 + * @param type 报表类型 + * @return + * @throws Exception + */ + public BinaryObject genReport(String reportTemplate, String reportData, Map reportParams, ExportType type) throws Exception { + Report report = new Report(); + boolean success = report.LoadFromStr(reportTemplate); + if (!success) { + log.error("加载报表模板数据失败!"); + throw new GridReportException("加载报表模板数据失败!"); + } + success = report.LoadDataFromXML(reportData); + if (!success) { + log.error("加载报表数据失败!"); + throw new GridReportException("加载报表数据失败!"); + } + //处理报表参数 + for (Map.Entry param : reportParams.entrySet()) { + if (report.ParameterByName(param.getKey()) != null) { + report.ParameterByName(param.getKey()).setAsString(param.getValue()); + } + } + BinaryObject bo = report.ExportDirectToBinaryObject(type); + if (bo == null || bo.getNativeHandle() == 0) { + log.error("导出二进制数据失败!"); + throw new GridReportException("导出二进制数据失败!"); + } + return bo; + } + + /** + * 导出报表二进制数据 + * @param reportTemplate 报表模板json数据 + * @param reportData 报表json数据 + * @param reportParams 报表参数 + * @param type 报表类型 + * @param imgType 指定生成的图像数据格式,仅当生成图像数据时需要,可选[png|bmp|jpg|tif] + * @param imgDpi 指定导出图像的分辨率DPI,默认为96。打印的化需要根据打印机来具体设置 + * @return + * @throws Exception + */ + public BinaryObject genReport(String reportTemplate, String reportData, Map reportParams, ExportType type, ExportImageType imgType, Integer imgDPI) throws Exception { + Report report = new Report(); + boolean success = report.LoadFromStr(reportTemplate); + if (!success) { + log.error("加载报表模板数据失败!"); + throw new GridReportException("加载报表模板数据失败!"); + } + success = report.LoadDataFromXML(reportData); + if (!success) { + log.error("加载报表数据失败!"); + throw new GridReportException("加载报表数据失败!"); + } + //处理报表参数 + for (Map.Entry param : reportParams.entrySet()) { + if (report.ParameterByName(param.getKey()) != null) { + report.ParameterByName(param.getKey()).setAsString(param.getValue()); + } + } + //准备进行数据导出,指定要导出的文件类型。 + //在调用Export方法之前一定要调用本方法,在其后一定要调用UnprepareExport方法。本方法返回的选项对象的接口引用可以用来设定选项值。 + ExportOption exportOption = report.PrepareExport(type); + if (type.equals(ExportType.IMG)) {//如果为图片格式 + //获取将本对象转换为导出图像文件选项对象的接口引用。 + E2IMGOption e2imgOption = exportOption.getAsE2IMGOption(); + //设置图片格式 + e2imgOption.setImageType(imgType); + //所有页产生在一个图像文件中 + e2imgOption.setAllInOne(true); + e2imgOption.setDPI(imgDPI); + } + //执行数据导出 + BinaryObject bo = report.ExportToBinaryObject(); + //数据导出完成之后,进行一些内部释放任务。 + report.UnprepareExport(); + if (bo == null || bo.getNativeHandle() == 0) { + log.error("导出二进制数据失败!"); + throw new GridReportException("导出二进制数据失败!"); + } + return bo; + + } + + /** + * 生成报表并保存 + * @param reportName 报表名称 + * @param reportTemplate 报表模板json + * @param reportData 报表数据json + * @param reportParams 报表参数 + * @param type 报表类型 + * @return 报表保存路径 + * @throws Exception + */ + public String genReportAndSave(String reportName, String reportTemplate, String reportData, Map reportParams, ExportType type) throws Exception { + Report report = new Report(); + boolean success = report.LoadFromStr(reportTemplate); + if (!success) { + log.error("加载报表模板数据失败!"); + throw new GridReportException("加载报表模板数据失败!"); + } + success = report.LoadDataFromXML(reportData); + if (!success) { + log.error("加载报表数据失败!"); + throw new GridReportException("加载报表数据失败!"); + } + //处理报表参数 + for (Map.Entry param : reportParams.entrySet()) { + if (report.ParameterByName(param.getKey()) != null) { + report.ParameterByName(param.getKey()).setAsString(param.getValue()); + } + } + BinaryObject bo = report.ExportDirectToBinaryObject(type); + if (bo == null || bo.getNativeHandle() == 0) { + log.error("导出二进制数据失败!"); + throw new GridReportException("导出二进制数据失败!"); + } + String exportPathFile = this.gridReportOutPath + reportName + "." + type.toString().toLowerCase(); + bo.SaveToFile(exportPathFile); + report.Release(); + return exportPathFile; + } +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/PdfHelper.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/PdfHelper.java new file mode 100644 index 0000000..f8dffa0 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/PdfHelper.java @@ -0,0 +1,144 @@ +package cn.iocoder.yudao.module.qms.framework.gridreport; + +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import javax.imageio.ImageIO; + +import org.apache.commons.lang3.StringUtils; +import org.apache.pdfbox.pdmodel.PDDocument; +import org.apache.pdfbox.pdmodel.PDDocumentInformation; +import com.spire.pdf.PdfDocument; +import com.spire.pdf.graphics.PdfImageType; + +import lombok.extern.slf4j.Slf4j; + +/** + * PdfHelper + *

更新历史:

+ *
 版本         更新时间            更新者        更新内容
+ * V1.0      2022-2-28          王兴荣         Add
+ * Copyright (C) 云南志者竟成科技有限公司 + * @author 王兴荣 <xingrong_wang@will-way.cn> + * @version V1.0 + * @since 2022-2-28 + */ +@Slf4j +public class PdfHelper { + + /** + * 修改pdf属性 + * @param pdfBytes pdf + * @param author 作者 + * @return + */ + public static byte[] modifyDocInfo(byte[] pdfBytes) { + return modifyDocInfo(pdfBytes, null, null, null, null, null, null); + } + + /** + * 修改pdf属性 + * @param pdfBytes pdf + * @param author 作者 + * @return + */ + public static byte[] modifyDocInfo(byte[] pdfBytes, String author) { + return modifyDocInfo(pdfBytes, null, author, null, null, null, null); + } + + /** + * 修改pdf属性 + * @param pdfBytes pdf + * @param author 作者 + * @param subject 主题 + * @return + */ + public static byte[] modifyDocInfo(byte[] pdfBytes, String author, String subject) { + return modifyDocInfo(pdfBytes, null, author, subject, null, null, null); + } + + /** + * 修改pdf属性 + * @param pdfBytes pdf + * @param title 标题 + * @param author 作者 + * @param subject 主题 + * @param keywords 关键字 + * @param creator 应用程序 + * @param producer 制作程序 + * @return + */ + public static byte[] modifyDocInfo(byte[] pdfBytes, String title, String author, String subject, String keywords, String creator, String producer) { + //加载PDF文件 + try (PDDocument pdfDocument = PDDocument.load(pdfBytes); ByteArrayOutputStream baos = new ByteArrayOutputStream();) { + //属性信息 + PDDocumentInformation info = pdfDocument.getDocumentInformation(); + //标题 + if (StringUtils.isNotBlank(title)) { + info.setTitle(title); + } + + //作者 + if (StringUtils.isNotBlank(author)) { + info.setAuthor(author); + } else { + info.setAuthor("王兴荣"); + } + + //主题 + if (StringUtils.isNotBlank(subject)) { + info.setSubject(subject); + } else { + info.setSubject("志者竟成报告系统"); + } + + //关键字 + if (StringUtils.isNotBlank(keywords)) { + info.setKeywords(keywords); + } + + //应用程序 + if (StringUtils.isNotBlank(creator)) { + info.setCreator(creator); + } else { + info.setCreator("志者竟成报告系统"); + } + + //pdf制作程序 + if (StringUtils.isNotBlank(producer)) { + info.setProducer(producer); + } else { + info.setProducer("志者竟成报告系统V1.0"); + } + //将修改后的PDF保存 + pdfDocument.save(baos); + return baos.toByteArray(); + } catch (Exception e) { + log.error("处理pdf出错!"); + } + return null; + } + + /** + * pdf转png图片 + * @param pdfBytes pdf + * @param dpi DPI + * @return + */ + public static byte[] pdfToPng(byte[] pdfBytes, int dpi) { + long startTime = System.nanoTime(); + //加载PDF文件 + PdfDocument pdfDocument = new PdfDocument(); + pdfDocument.loadFromBytes(pdfBytes); + try ( ByteArrayOutputStream baos = new ByteArrayOutputStream();) { + BufferedImage bufferedImage = pdfDocument.saveAsImage(0, PdfImageType.Bitmap, dpi, dpi); + ImageIO.write(bufferedImage, "PNG", baos); + long endTime = System.nanoTime(); + log.info("png转换用时:{}ms", (endTime - startTime)/1000000); + return baos.toByteArray(); + } catch (Exception e) { + log.error("处理pdf出错!"); + } + return null; + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/config/GridReportConfig.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/config/GridReportConfig.java new file mode 100644 index 0000000..e28abc9 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/config/GridReportConfig.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.qms.framework.gridreport.config; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import cn.iocoder.yudao.module.qms.framework.gridreport.GridReport; +import gridreport.jni.Report; + +@Configuration +public class GridReportConfig { + + /** gridreport服务器安装地址,详见锐浪报表帮助文档,Java报表服务器开发起步-web报表服务器(JAVA) **/ + @Value("${yudao.report.gridreport.server.path:/usr/local/grsvr6}") + private String gridReportPath; + + /** 文档输出目录 **/ + @Value("${yudao.report.gridreport.file.out-path:/appdata/data/pdf}") + private String gridReportOutPath; + + @Bean + public GridReport gridReport() { + //初始化报表模块路径 + Report.ConfigModulePath(gridReportPath); + return new GridReport(gridReportOutPath); + } +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/exception/GridReportException.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/exception/GridReportException.java new file mode 100644 index 0000000..417ef5b --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/gridreport/exception/GridReportException.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.qms.framework.gridreport.exception; + +/** + * GridReportException + *

更新历史:

+ *
 版本         更新时间            更新者        更新内容
+ * V1.0      2022-2-27          王兴荣         Add
+ * Copyright (C) 云南志者竟成科技有限公司 + * @author 王兴荣 <xingrong_wang@will-way.cn> + * @version V1.0 + * @since 2022-2-27 + */ +public class GridReportException extends Exception { + + private static final long serialVersionUID = 3767718880859242703L; + + public GridReportException() { + super(); + } + + public GridReportException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } + + public GridReportException(String message, Throwable cause) { + super(message, cause); + } + + public GridReportException(String message) { + super(message); + } + + public GridReportException(Throwable cause) { + super(cause); + } + +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/rpc/config/RpcConfiguration.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/rpc/config/RpcConfiguration.java new file mode 100644 index 0000000..aca6a87 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/rpc/config/RpcConfiguration.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.qms.framework.rpc.config; + +import cn.iocoder.yudao.module.infra.api.file.FileApi; +import cn.iocoder.yudao.module.system.api.sequence.SequenceApi; + +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Configuration; + +@Configuration(value = "qmsRpcConfiguration", proxyBeanMethods = false) +@EnableFeignClients(clients = {FileApi.class, SequenceApi.class}) +public class RpcConfiguration { +} diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/rpc/package-info.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/rpc/package-info.java new file mode 100644 index 0000000..8e76bab --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/rpc/package-info.java @@ -0,0 +1,4 @@ +/** + * 占位 + */ +package cn.iocoder.yudao.module.qms.framework.rpc; diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/framework/security/config/SecurityConfiguration.java b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/security/config/SecurityConfiguration.java similarity index 91% rename from yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/framework/security/config/SecurityConfiguration.java rename to qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/security/config/SecurityConfiguration.java index 702ec27..6a8e0ee 100644 --- a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/framework/security/config/SecurityConfiguration.java +++ b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/security/config/SecurityConfiguration.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.jyiot.framework.security.config; +package cn.iocoder.yudao.module.qms.framework.security.config; import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer; import cn.iocoder.yudao.module.infra.enums.ApiConstants; @@ -9,9 +9,9 @@ import org.springframework.security.config.annotation.web.configurers.AuthorizeH /** - * Template 模块的 Security 配置 + * qms 模块的 Security 配置 */ -@Configuration("jyIotSecurityConfiguration") +@Configuration(proxyBeanMethods = false) public class SecurityConfiguration { @Bean diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/manage/deleteme b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/manage/deleteme new file mode 100644 index 0000000..e69de29 diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/office/deleteme b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/office/deleteme new file mode 100644 index 0000000..e69de29 diff --git a/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/resource/deleteme b/qms-server/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/resource/deleteme new file mode 100644 index 0000000..e69de29 diff --git a/qms-server/yudao-module-qms-server/src/main/resources/application-dev.yaml b/qms-server/yudao-module-qms-server/src/main/resources/application-dev.yaml new file mode 100644 index 0000000..9a3ac0f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/application-dev.yaml @@ -0,0 +1,176 @@ +--- #################### 数据库相关配置 #################### +spring: + # 数据源配置项 + autoconfigure: + exclude: + datasource: + druid: # Druid 【监控】相关的全局配置 + web-stat-filter: + enabled: true + stat-view-servlet: + enabled: true + allow: # 设置白名单,不填则允许所有访问 + url-pattern: /druid/* + login-username: # 控制台管理用户名和密码 + login-password: + filter: + stat: + enabled: true + log-slow-sql: true # 慢 SQL 记录 + slow-sql-millis: 100 + merge-sql: true + wall: + config: + multi-statement-allow: true + dynamic: # 多数据源配置 + druid: # Druid 【连接池】相关的全局配置 + initial-size: 5 # 初始连接数 + min-idle: 10 # 最小连接池数量 + max-active: 20 # 最大连接池数量 + max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 + time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 + min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 + max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 + validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 + test-while-idle: true + test-on-borrow: false + test-on-return: false + primary: master + datasource: + master: + url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO + username: SYSDBA + password: pgbsci6ddJ6Sqj@e + slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 + lazy: true # 开启懒加载,保证启动速度 + url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO + username: SYSDBA + password: pgbsci6ddJ6Sqj@e + + # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 + data: + redis: + host: nacos-redis # 地址 + port: 6379 # 端口 + database: 1 # 数据库索引 +# password: 123456 # 密码,建议生产环境开启 + +--- #################### MQ 消息队列相关配置 #################### + +# rocketmq 配置项,对应 RocketMQProperties 配置类 +rocketmq: + name-server: 172.16.46.63:30876 # RocketMQ Namesrv + + +--- #################### 定时任务相关配置 #################### +xxl: + job: + admin: + addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址 + +--- #################### 服务保障相关配置 #################### + +# Lock4j 配置项 +lock4j: + acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 + expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 + +--- #################### 监控相关配置 #################### + +# Actuator 监控端点的配置项 +management: + endpoints: + web: + base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator + exposure: + include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 + +# Spring Boot Admin 配置项 +spring: + boot: + admin: + # Spring Boot Admin Client 客户端的相关配置 + client: + instance: + service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME] + # Spring Boot Admin Server 服务端的相关配置 + context-path: /admin # 配置 Spring + +# 日志文件配置 +logging: + file: + name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 +--- #################### 芋道相关配置 #################### + +# 芋道配置项,设置当前项目所有自定义的配置 +yudao: + env: # 多环境的配置项 + tag: ${HOSTNAME} + security: + mock-enable: true + access-log: # 访问日志的配置项 + enable: true + report: + gridreport: + server: + path: + file: + out-path: C:\AppData\Data\ReportFile + +--- #################### liteflow相关配置 #################### +liteflow: + #规则文件路径 + rule-source: el_xml:cn.iocoder.yudao.module.qms.core.liteflow.parser.QmsXmlFlowELParser + #-----------------以下非必须----------------- + #liteflow是否开启,默认为true + enable: true + #liteflow的banner打印是否开启,默认为true + print-banner: true + #上下文的初始数量槽,默认值为1024,这个值不用刻意配置,这个值会自动扩容 + slot-size: 1024 + #FlowExecutor的execute2Future的线程数,默认为64 + main-executor-works: 64 + #FlowExecutor的execute2Future的自定义线程池Builder,LiteFlow提供了默认的Builder + main-executor-class: com.yomahub.liteflow.thread.LiteFlowDefaultMainExecutorBuilder + #自定义请求ID的生成类,LiteFlow提供了默认的生成类 + request-id-generator-class: com.yomahub.liteflow.flow.id.DefaultRequestIdGenerator + #全局异步节点线程池大小,默认为64 + global-thread-pool-size: 64 + #全局异步节点线程池队列大小,默认为512 + global-thread-pool-queue-size: 512 + #全局异步节点线程池自定义Builder,LiteFlow提供了默认的线程池Builder + global-thread-pool-executor-class: com.yomahub.liteflow.thread.LiteFlowDefaultGlobalExecutorBuilder + #异步线程最长的等待时间(只用于when),默认值为15000 + when-max-wait-time: 15000 + #异步线程最长的等待时间(只用于when),默认值为MILLISECONDS,毫秒 + when-max-wait-time-unit: MILLISECONDS + #每个WHEN是否用单独的线程池 + when-thread-pool-isolate: false + #设置解析模式,一共有三种模式,PARSE_ALL_ON_START | PARSE_ALL_ON_FIRST_EXEC | PARSE_ONE_ON_FIRST_EXEC + parse-mode: PARSE_ONE_ON_FIRST_EXEC + #全局重试次数,默认为0 + retry-count: 0 + #是否支持不同类型的加载方式混用,默认为false + support-multiple-type: false + #全局默认节点执行器 + node-executor-class: com.yomahub.liteflow.flow.executor.DefaultNodeExecutor + #是否打印执行中过程中的日志,默认为true + print-execution-log: true + #是否开启本地文件监听,默认为false + enable-monitor-file: false + #是否开启快速解析模式,默认为false + fast-load: false + #是否开启Node节点实例ID持久化,默认为false + enable-node-instance-id: false + #是否开启虚拟线程(只在JDK21+环境有效),默认为true + enable-virtual-thread: true + #简易监控配置选项 + monitor: + #监控是否开启,默认不开启 + enable-log: false + #监控队列存储大小,默认值为200 + queue-limit: 200 + #监控一开始延迟多少执行,默认值为300000毫秒,也就是5分钟 + delay: 300000 + #监控日志打印每过多少时间执行一次,默认值为300000毫秒,也就是5分钟 + period: 300000 diff --git a/qms-server/yudao-module-qms-server/src/main/resources/application-local.yaml b/qms-server/yudao-module-qms-server/src/main/resources/application-local.yaml new file mode 100644 index 0000000..fd75d8c --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/application-local.yaml @@ -0,0 +1,208 @@ +--- #################### 数据库相关配置 #################### +spring: + # 数据源配置项 + autoconfigure: + exclude: + datasource: + druid: # Druid 【监控】相关的全局配置 + web-stat-filter: + enabled: true + stat-view-servlet: + enabled: true + allow: # 设置白名单,不填则允许所有访问 + url-pattern: /druid/* + login-username: # 控制台管理用户名和密码 + login-password: + filter: + stat: + enabled: true + log-slow-sql: true # 慢 SQL 记录 + slow-sql-millis: 100 + merge-sql: true + wall: + config: + multi-statement-allow: true + dynamic: # 多数据源配置 + druid: # Druid 【连接池】相关的全局配置 + initial-size: 5 # 初始连接数 + min-idle: 10 # 最小连接池数量 + max-active: 20 # 最大连接池数量 + max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 + time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 + min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 + max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 + validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 + test-while-idle: true + test-on-borrow: false + test-on-return: false + primary: master + datasource: + master: + # 中铜-dev + # url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO + # username: SYSDBA + # password: pgbsci6ddJ6Sqj@e4 + + # 公司 + url: jdbc:dm://192.168.26.116:5236?schema=ZGTY-QMS-DEV + username: SYSDBA + password: zzjc@2019 + + # 本机 +# url: jdbc:dm://127.0.0.1:5236?schema=ZGTY-QMS-DEV +# username: SYSDBA +# password: 123456789 + + + slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 + lazy: true # 开启懒加载,保证启动速度 + # 中铜-dev + # url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO + # username: SYSDBA + # password: pgbsci6ddJ6Sqj@e + + # 公司 + url: jdbc:dm://192.168.26.116:5236?schema=ZGTY-QMS-DEV + username: SYSDBA + password: zzjc@2019 + + # 本机 +# url: jdbc:dm://127.0.0.1:5236?schema=ZGTY-QMS-DEV +# username: SYSDBA +# password: 123456789 + + # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 + data: + redis: + # host: yudao-redis # 地址 + host: 127.0.0.1 # 地址 + port: 6379 # 端口 + database: 7 # 数据库索引 + password: ZIb2Y8MKc6OyHv1r + +--- #################### MQ 消息队列相关配置 #################### + +# rocketmq 配置项,对应 RocketMQProperties 配置类 +rocketmq: + # name-server: rocketmq-namesrv:9876 # RocketMQ Namesrv + name-server: 127.0.0.1:9876 # RocketMQ Namesrv + + +--- #################### 定时任务相关配置 #################### +xxl: + job: + enabled: false # 是否开启调度中心,默认为 true 开启 + admin: + addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址 + +--- #################### 服务保障相关配置 #################### + +# Lock4j 配置项 +lock4j: + acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 + expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 + +--- #################### 监控相关配置 #################### + +# Actuator 监控端点的配置项 +management: + endpoints: + web: + base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator + exposure: + include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 + +# Spring Boot Admin 配置项 +spring: + boot: + admin: + # Spring Boot Admin Client 客户端的相关配置 + client: + instance: + service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME] + # Spring Boot Admin Server 服务端的相关配置 + context-path: /admin # 配置 Spring + +# 日志文件配置 cn.iocoder.yudao.module.qms.common.data.dal.mapper +logging: + level: + cn.iocoder.yudao.module.qms.business.config.dal.mapper: DEBUG + file: + name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 + +--- #################### 芋道相关配置 #################### + +# 芋道配置项,设置当前项目所有自定义的配置 +yudao: + env: # 多环境的配置项 + tag: ${HOSTNAME} + security: + mock-enable: true + access-log: # 访问日志的配置项 + enable: true + report: + gridreport: + server: + path: + file: + out-path: C:\AppData\Data\ReportFile + +--- #################### liteflow相关配置 #################### +liteflow: + #规则文件路径 + rule-source: el_xml:cn.iocoder.yudao.module.qms.core.liteflow.parser.QmsXmlFlowELParser + #-----------------以下非必须----------------- + #liteflow是否开启,默认为true + enable: true + #liteflow的banner打印是否开启,默认为true + print-banner: true + #上下文的初始数量槽,默认值为1024,这个值不用刻意配置,这个值会自动扩容 + slot-size: 1024 + #FlowExecutor的execute2Future的线程数,默认为64 + main-executor-works: 64 + #FlowExecutor的execute2Future的自定义线程池Builder,LiteFlow提供了默认的Builder + main-executor-class: com.yomahub.liteflow.thread.LiteFlowDefaultMainExecutorBuilder + #自定义请求ID的生成类,LiteFlow提供了默认的生成类 + request-id-generator-class: com.yomahub.liteflow.flow.id.DefaultRequestIdGenerator + #全局异步节点线程池大小,默认为64 + global-thread-pool-size: 64 + #全局异步节点线程池队列大小,默认为512 + global-thread-pool-queue-size: 512 + #全局异步节点线程池自定义Builder,LiteFlow提供了默认的线程池Builder + global-thread-pool-executor-class: com.yomahub.liteflow.thread.LiteFlowDefaultGlobalExecutorBuilder + #异步线程最长的等待时间(只用于when),默认值为15000 + when-max-wait-time: 15000 + #异步线程最长的等待时间(只用于when),默认值为MILLISECONDS,毫秒 + when-max-wait-time-unit: MILLISECONDS + #每个WHEN是否用单独的线程池 + when-thread-pool-isolate: false + #设置解析模式,一共有三种模式,PARSE_ALL_ON_START | PARSE_ALL_ON_FIRST_EXEC | PARSE_ONE_ON_FIRST_EXEC + parse-mode: PARSE_ONE_ON_FIRST_EXEC + #全局重试次数,默认为0 + retry-count: 0 + #是否支持不同类型的加载方式混用,默认为false + support-multiple-type: false + #全局默认节点执行器 + node-executor-class: com.yomahub.liteflow.flow.executor.DefaultNodeExecutor + #是否打印执行中过程中的日志,默认为true + print-execution-log: true + #是否开启本地文件监听,默认为false + enable-monitor-file: false + #是否开启快速解析模式,默认为false + fast-load: false + #是否开启Node节点实例ID持久化,默认为false + enable-node-instance-id: false + #是否开启虚拟线程(只在JDK21+环境有效),默认为true + enable-virtual-thread: true + #简易监控配置选项 + monitor: + #监控是否开启,默认不开启 + enable-log: false + #监控队列存储大小,默认值为200 + queue-limit: 200 + #监控一开始延迟多少执行,默认值为300000毫秒,也就是5分钟 + delay: 300000 + #监控日志打印每过多少时间执行一次,默认值为300000毫秒,也就是5分钟 + period: 300000 + + diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application.yml b/qms-server/yudao-module-qms-server/src/main/resources/application.yaml similarity index 66% rename from yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application.yml rename to qms-server/yudao-module-qms-server/src/main/resources/application.yaml index e7041b6..edca293 100644 --- a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application.yml +++ b/qms-server/yudao-module-qms-server/src/main/resources/application.yaml @@ -1,6 +1,6 @@ spring: application: - name: jy-manage-server + name: qms-server profiles: active: ${env.name} @@ -18,6 +18,7 @@ spring: config: # 【注册中心】配置项 namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换 group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP + main: allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。 allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务 @@ -50,12 +51,14 @@ spring: time-to-live: 1h # 设置过期时间为 1 小时 server: - port: 48120 + port: 49200 logging: file: name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 +--- #################### 接口文档配置 #################### + springdoc: api-docs: enabled: true # 1. 是否开启 Swagger 接文档的元数据 @@ -66,7 +69,7 @@ springdoc: default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档 knife4j: - enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面 + enable: false # TODO 芋艿:需要关闭增强,具体原因见:https://github.com/xiaoymin/knife4j/issues/874 setting: language: zh_cn @@ -83,16 +86,53 @@ mybatis-plus: logic-delete-value: 1 # 逻辑已删除值(默认为 1) logic-not-delete-value: 0 # 逻辑未删除值(默认为 0) banner: false # 关闭控制台的 Banner 打印 - type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject + type-aliases-package: ${yudao.info.base-package}.dal.dataobject encryptor: password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成 mybatis-plus-join: banner: false # 关闭控制台的 Banner 打印 +# Spring Data Redis 配置 +spring: + data: + redis: + repositories: + enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度 + # VO 转换(数据翻译)相关 easy-trans: - is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口 + is-enable-global: true # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口 + +--- #################### RPC 远程调用相关配置 #################### + +--- #################### 消息队列相关 #################### + +# rocketmq 配置项,对应 RocketMQProperties 配置类 +rocketmq: + # Producer 配置项 + producer: + group: ${spring.application.name}_PRODUCER # 生产者分组 + +spring: + # Kafka 配置项,对应 KafkaProperties 配置类 + kafka: + # Kafka Producer 配置项 + producer: + acks: 1 # 0-不应答。1-leader 应答。all-所有 leader 和 follower 应答。 + retries: 3 # 发送失败时,重试发送的次数 + value-serializer: org.springframework.kafka.support.serializer.JsonSerializer # 消息的 value 的序列化 + # Kafka Consumer 配置项 + consumer: + auto-offset-reset: earliest # 设置消费者分组最初的消费进度为 earliest 。可参考博客 https://blog.csdn.net/lishuangzhe7047/article/details/74530417 理解 + value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer + properties: + spring.json.trusted.packages: '*' + # Kafka Consumer Listener 监听器配置 + listener: + missing-topics-fatal: false # 消费监听接口监听的主题不存在时,默认会报错。所以通过设置为 false ,解决报错 + +--- #################### 定时任务相关配置 #################### xxl: job: @@ -101,17 +141,18 @@ xxl: logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径 accessToken: default_token # 执行器通讯TOKEN +--- #################### 芋道相关配置 #################### + yudao: info: version: 1.0.0 - base-package: cn.iocoder.yudao.module.jymanage + base-package: cn.iocoder.yudao.module.qms web: admin-ui: url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址 xss: enable: false - exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系 - - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求 + exclude-urls: # 如下 url,仅仅是为了演示,去掉配置也没关系 - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求 swagger: title: 管理后台 diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessBaseSampleMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessBaseSampleMapper.xml new file mode 100644 index 0000000..83d1051 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessBaseSampleMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessHandoverRecordSubMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessHandoverRecordSubMapper.xml new file mode 100644 index 0000000..4faaac3 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessHandoverRecordSubMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleAssayResultMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleAssayResultMapper.xml new file mode 100644 index 0000000..41219f0 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleAssayResultMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.xml new file mode 100644 index 0000000..387ebb7 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustProjectMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustProjectMapper.xml new file mode 100644 index 0000000..f5e26a3 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustProjectMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustRegistrationMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustRegistrationMapper.xml new file mode 100644 index 0000000..877d9e8 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustRegistrationMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubParentSampleMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubParentSampleMapper.xml new file mode 100644 index 0000000..ca56c29 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubParentSampleMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleMapper.xml new file mode 100644 index 0000000..866c321 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/BaseSampleMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/BaseSampleMapper.xml new file mode 100644 index 0000000..1809e62 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/BaseSampleMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodMapper.xml new file mode 100644 index 0000000..c6d2fd2 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectMapper.xml new file mode 100644 index 0000000..c3bafe6 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectParameterMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectParameterMapper.xml new file mode 100644 index 0000000..b6c1728 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectParameterMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigBaseSampleMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigBaseSampleMapper.xml new file mode 100644 index 0000000..7706010 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigBaseSampleMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigDocumentTypeMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigDocumentTypeMapper.xml new file mode 100644 index 0000000..b23c3e0 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigDocumentTypeMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.xml new file mode 100644 index 0000000..03d51b2 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigProjectMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigProjectMapper.xml new file mode 100644 index 0000000..00ea3cc --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigProjectMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportFieldMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportFieldMapper.xml new file mode 100644 index 0000000..a2c41eb --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportFieldMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTemplateMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTemplateMapper.xml new file mode 100644 index 0000000..eb1efea --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTemplateMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTypeMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTypeMapper.xml new file mode 100644 index 0000000..637fa56 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTypeMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleFlowMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleFlowMapper.xml new file mode 100644 index 0000000..a8bf02d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleFlowMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleReportMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleReportMapper.xml new file mode 100644 index 0000000..6546ffa --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleReportMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowCodeMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowCodeMapper.xml new file mode 100644 index 0000000..5474b11 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowCodeMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowRuleMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowRuleMapper.xml new file mode 100644 index 0000000..5f56bd6 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowRuleMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleProjectMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleProjectMapper.xml new file mode 100644 index 0000000..da8a147 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleProjectMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleTypeMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleTypeMapper.xml new file mode 100644 index 0000000..55f4275 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleTypeMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMapper.xml new file mode 100644 index 0000000..6937812 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMethodMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMethodMapper.xml new file mode 100644 index 0000000..6448270 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMethodMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleParentMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleParentMapper.xml new file mode 100644 index 0000000..9122f3d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleParentMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigWarehouseLocationInfomationMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigWarehouseLocationInfomationMapper.xml new file mode 100644 index 0000000..5197c7b --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigWarehouseLocationInfomationMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardDetailMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardDetailMapper.xml new file mode 100644 index 0000000..0cadd2d --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardDetailMapper.xml @@ -0,0 +1,52 @@ + + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMapper.xml new file mode 100644 index 0000000..8957934 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMapper.xml @@ -0,0 +1,39 @@ + + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.xml new file mode 100644 index 0000000..5251fbe --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryParameterMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryParameterMapper.xml new file mode 100644 index 0000000..de23dc8 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryParameterMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryProjectMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryProjectMapper.xml new file mode 100644 index 0000000..69e4fd8 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryProjectMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleFlowNodeMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleFlowNodeMapper.xml new file mode 100644 index 0000000..49a7928 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleFlowNodeMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleTypeMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleTypeMapper.xml new file mode 100644 index 0000000..2d057af --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleTypeMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionFieldMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionFieldMapper.xml new file mode 100644 index 0000000..8dd7328 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionFieldMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionMapper.xml new file mode 100644 index 0000000..b0126f5 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/dic/dal/mapper/DictionaryBusinessMapper.xml b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/dic/dal/mapper/DictionaryBusinessMapper.xml new file mode 100644 index 0000000..9acf8b1 --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/dic/dal/mapper/DictionaryBusinessMapper.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/manage/deleteme b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/manage/deleteme new file mode 100644 index 0000000..e69de29 diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/office/deleteme b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/office/deleteme new file mode 100644 index 0000000..e69de29 diff --git a/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/resource/deleteme b/qms-server/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/resource/deleteme new file mode 100644 index 0000000..e69de29 diff --git a/qms-server/yudao-module-qms-server/src/main/resources/logback-spring.xml b/qms-server/yudao-module-qms-server/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..b1b9f3f --- /dev/null +++ b/qms-server/yudao-module-qms-server/src/main/resources/logback-spring.xml @@ -0,0 +1,76 @@ + + + + + + + + + +       + + + ${PATTERN_DEFAULT} + + + + + + + + + + ${PATTERN_DEFAULT} + + + + ${LOG_FILE} + + + ${LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN:-${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz} + + ${LOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START:-false} + + ${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-10MB} + + ${LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP:-0} + + ${LOGBACK_ROLLINGPOLICY_MAX_HISTORY:-30} + + + + + + 0 + + 256 + + + + + + + + ${PATTERN_DEFAULT} + + + + + + + + + + + + + + + + + + + + + + diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml new file mode 100644 index 0000000..a15e1e3 --- /dev/null +++ b/yudao-dependencies/pom.xml @@ -0,0 +1,734 @@ + + + 4.0.0 + + + + ZT + 中铜 ZStack 私服 + http://172.16.46.63:30708/repository/maven-hosted/ + + + + + + + + cn.iocoder.cloud + yudao-dependencies + ${revision} + pom + + ${project.artifactId} + 基础 bom 文件,管理整个项目的依赖版本 + https://github.com/YunaiV/ruoyi-vue-pro + + + 3.0.1 + 1.6.0 + + 3.4.5 + 2024.0.1 + 2023.0.3.2 + + 2.8.3 + 4.6.0 + + 1.2.24 + 3.5.19 + 3.5.10.1 + 4.3.1 + 1.4.13 + 3.0.6 + 3.41.0 + 8.1.3.140 + 8.6.0 + 5.1.0 + 3.3.3 + + 2.3.2 + + + + 2.4.0 + + 2.2.7 + + 9.0.0 + 3.4.5 + 0.33.0 + + 8.0.2.RELEASE + 1.1.4 + 5.2.0 + + 7.0.1 + + 1.4.0 + 1.18.1 + 1.18.36 + 1.6.3 + 5.8.35 + 6.0.0-M19 + 4.0.3 + 2.4.1 + 1.2.83 + 33.4.8-jre + 2.14.5 + 3.11.1 + 0.1.55 + 3.1.0 + 2.7.0 + 3.0.6 + 0.10.2 + 4.1.116.Final + 1.2.5 + 0.9.0 + 4.5.13 + + 2.17.0 + 1.27.1 + 2.30.14 + 1.16.7 + 1.4.0 + 1.9.4 + 4.7.5.B + + + + + + + io.netty + netty-bom + ${netty.version} + pom + import + + + org.springframework.boot + spring-boot-dependencies + ${spring.boot.version} + pom + import + + + org.springframework.cloud + spring-cloud-dependencies + ${spring.cloud.version} + pom + import + + + com.alibaba.cloud + spring-cloud-alibaba-dependencies + ${spring.cloud.alibaba.version} + pom + import + + + + + io.github.mouzt + bizlog-sdk + ${bizlog-sdk.version} + + + org.springframework.boot + spring-boot-starter + + + + + cn.iocoder.cloud + yudao-spring-boot-starter-biz-tenant + ${revision} + + + cn.iocoder.cloud + yudao-spring-boot-starter-biz-data-permission + ${revision} + + + cn.iocoder.cloud + yudao-spring-boot-starter-biz-ip + ${revision} + + + + + + org.springframework.boot + spring-boot-configuration-processor + ${spring.boot.version} + + + + cn.iocoder.cloud + yudao-spring-boot-starter-env + ${revision} + + + + + cn.iocoder.cloud + yudao-spring-boot-starter-web + ${revision} + + + + cn.iocoder.cloud + yudao-spring-boot-starter-security + ${revision} + + + + cn.iocoder.cloud + yudao-spring-boot-starter-websocket + ${revision} + + + + com.github.xingfudeshi + knife4j-openapi3-jakarta-spring-boot-starter + ${knife4j.version} + + + org.springdoc + springdoc-openapi-starter-webmvc-api + ${springdoc.version} + + + com.github.xiaoymin + knife4j-gateway-spring-boot-starter + 4.5.0 + + + + + cn.iocoder.cloud + yudao-spring-boot-starter-mybatis + ${revision} + + + + com.alibaba + druid-spring-boot-3-starter + ${druid.version} + + + + org.mybatis + mybatis + ${mybatis.version} + + + com.baomidou + mybatis-plus-spring-boot3-starter + ${mybatis-plus.version} + + + com.baomidou + mybatis-plus-jsqlparser + ${mybatis-plus.version} + + + com.baomidou + mybatis-plus-generator + ${mybatis-plus.version} + + + com.baomidou + dynamic-datasource-spring-boot3-starter + ${dynamic-datasource.version} + + + com.github.yulichang + mybatis-plus-join-boot-starter + ${mybatis-plus-join.version} + + + + com.fhs-opensource + easy-trans-spring-boot-starter + ${easy-trans.version} + + + org.springframework + spring-context + + + org.springframework.cloud + spring-cloud-commons + + + + + com.fhs-opensource + easy-trans-mybatis-plus-extend + ${easy-trans.version} + + + com.fhs-opensource + easy-trans-anno + ${easy-trans.version} + + + + cn.iocoder.cloud + yudao-spring-boot-starter-redis + ${revision} + + + + org.redisson + redisson-spring-boot-starter + ${redisson.version} + + + + com.dameng + DmJdbcDriver18 + ${dm8.jdbc.version} + + + + org.opengauss + opengauss-jdbc + ${opengauss.jdbc.version} + + + + cn.com.kingbase + kingbase8 + ${kingbase.jdbc.version} + + + + com.taosdata.jdbc + taos-jdbcdriver + ${taos.version} + + + + + cn.iocoder.cloud + yudao-spring-boot-starter-rpc + ${revision} + + + + + + + + + com.xuxueli + xxl-job-core + ${xxl-job.version} + + + cn.iocoder.cloud + yudao-spring-boot-starter-job + ${revision} + + + + + cn.iocoder.cloud + yudao-spring-boot-starter-mq + ${revision} + + + + org.apache.rocketmq + rocketmq-spring-boot-starter + ${rocketmq-spring.version} + + + + + cn.iocoder.cloud + yudao-spring-boot-starter-protection + ${revision} + + + + com.baomidou + lock4j-redisson-spring-boot-starter + ${lock4j.version} + + + redisson-spring-boot-starter + org.redisson + + + + + + + cn.iocoder.cloud + yudao-spring-boot-starter-monitor + ${revision} + + + + org.apache.skywalking + apm-toolkit-trace + ${skywalking.version} + + + org.apache.skywalking + apm-toolkit-logback-1.x + ${skywalking.version} + + + org.apache.skywalking + apm-toolkit-opentracing + ${skywalking.version} + + + + + + + + + + + + + io.opentracing + opentracing-api + ${opentracing.version} + + + io.opentracing + opentracing-util + ${opentracing.version} + + + io.opentracing + opentracing-noop + ${opentracing.version} + + + + de.codecentric + spring-boot-admin-starter-server + ${spring-boot-admin.version} + + + de.codecentric + spring-boot-admin-starter-client + ${spring-boot-admin.version} + + + + + cn.iocoder.cloud + yudao-spring-boot-starter-test + ${revision} + test + + + + org.mockito + mockito-inline + ${mockito-inline.version} + + + + org.springframework.boot + spring-boot-starter-test + ${spring.boot.version} + + + asm + org.ow2.asm + + + org.mockito + mockito-core + + + + + + com.github.fppt + jedis-mock + ${jedis-mock.version} + + + + uk.co.jemos.podam + podam + ${podam.version} + + + + + org.flowable + flowable-spring-boot-starter-process + ${flowable.version} + + + org.flowable + flowable-spring-boot-starter-actuator + ${flowable.version} + + + + + + cn.iocoder.cloud + yudao-common + ${revision} + + + + cn.iocoder.cloud + yudao-spring-boot-starter-excel + ${revision} + + + + org.projectlombok + lombok + ${lombok.version} + + + + org.mapstruct + mapstruct + ${mapstruct.version} + + + org.mapstruct + mapstruct-jdk8 + ${mapstruct.version} + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + + + + cn.hutool + hutool-all + ${hutool-5.version} + + + org.dromara.hutool + hutool-extra + ${hutool-6.version} + + + + com.alibaba + easyexcel + ${easyexcel.version} + + + + commons-io + commons-io + ${commons-io.version} + + + org.apache.commons + commons-compress + ${commons-compress.version} + + + + org.apache.tika + tika-core + ${tika-core.version} + + + + org.apache.velocity + velocity-engine-core + ${velocity.version} + + + + com.alibaba + fastjson + ${fastjson.version} + + + + com.google.guava + guava + ${guava.version} + + + + com.alibaba + transmittable-thread-local + ${transmittable-thread-local.version} + + + + commons-net + commons-net + ${commons-net.version} + + + com.jcraft + jsch + ${jsch.version} + + + + com.anji-plus + captcha-spring-boot-starter + ${anji-plus-captcha.version} + + + + org.lionsoul + ip2region + ${ip2region.version} + + + + org.jsoup + jsoup + ${jsoup.version} + + + + org.reflections + reflections + ${reflections.version} + + + + + software.amazon.awssdk + s3 + ${awssdk.version} + + + + com.github.binarywang + weixin-java-pay + ${weixin-java.version} + + + com.github.binarywang + wx-java-mp-spring-boot-starter + ${weixin-java.version} + + + com.github.binarywang + wx-java-miniapp-spring-boot-starter + ${weixin-java.version} + + + + me.zhyd.oauth + JustAuth + ${justauth.version} + + + com.xkcoding.justauth + justauth-spring-boot-starter + ${justauth-starter.version} + + + + + org.jeecgframework.jimureport + jimureport-spring-boot3-starter-fastjson2 + ${jimureport.version} + + + org.jeecgframework.jimureport + jimubi-spring-boot3-starter + ${jimureport.version} + + + com.github.jsqlparser + jsqlparser + + + + + + + org.pf4j + pf4j-spring + ${pf4j-spring.version} + + + org.slf4j + slf4j-log4j12 + + + + + + + io.vertx + vertx-core + ${vertx.version} + + + io.vertx + vertx-web + ${vertx.version} + + + io.vertx + vertx-mqtt + ${vertx.version} + + + + + org.eclipse.paho + org.eclipse.paho.client.mqttv3 + ${mqtt.version} + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + ${flatten-maven-plugin.version} + + bom + true + + + + + flatten + + flatten + process-resources + + + + clean + + flatten.clean + clean + + + + + + + diff --git a/yudao-module-jy-business/pom.xml b/yudao-module-jy-business/pom.xml deleted file mode 100644 index a51e913..0000000 --- a/yudao-module-jy-business/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - dsc-qms - cn.iocoder.cloud - ${revision} - - - yudao-module-jy-business-api - yudao-module-jy-business-server - - 4.0.0 - - yudao-module-jy-business - pom - - ${project.artifactId} - - JyBusiness 模块。 - - - diff --git a/yudao-module-jy-business/yudao-module-jy-business-api/pom.xml b/yudao-module-jy-business/yudao-module-jy-business-api/pom.xml deleted file mode 100644 index f3e8cef..0000000 --- a/yudao-module-jy-business/yudao-module-jy-business-api/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - yudao-module-jy-business - cn.iocoder.cloud - ${revision} - - 4.0.0 - yudao-module-jy-business-api - jar - - ${project.artifactId} - - 暴露给其它模块调用 - - - - - cn.iocoder.cloud - yudao-common - - - - org.springdoc - springdoc-openapi-starter-webmvc-api - provided - - - - - org.springframework.boot - spring-boot-starter-validation - true - - - - - org.springframework.cloud - spring-cloud-starter-openfeign - true - - - - diff --git a/yudao-module-jy-business/yudao-module-jy-business-api/src/main/java/cn/iocoder/yudao/module/jybusiness/enums/ErrorCodeConstants.java b/yudao-module-jy-business/yudao-module-jy-business-api/src/main/java/cn/iocoder/yudao/module/jybusiness/enums/ErrorCodeConstants.java deleted file mode 100644 index 11c856e..0000000 --- a/yudao-module-jy-business/yudao-module-jy-business-api/src/main/java/cn/iocoder/yudao/module/jybusiness/enums/ErrorCodeConstants.java +++ /dev/null @@ -1,17 +0,0 @@ -package cn.iocoder.yudao.module.jybusiness.enums; - -import cn.iocoder.yudao.framework.common.exception.ErrorCode; - -/** - * jy-business 错误码枚举类 - * - * jy-business 系统,使用 1-xxx-xxx-xxx 段 - * - * @author ZT - */ -public interface ErrorCodeConstants { - - // ========== 示例模块 1-001-000-000 ========== - ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在"); - -} diff --git a/yudao-module-jy-business/yudao-module-jy-business-server/pom.xml b/yudao-module-jy-business/yudao-module-jy-business-server/pom.xml deleted file mode 100644 index cabac2d..0000000 --- a/yudao-module-jy-business/yudao-module-jy-business-server/pom.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - yudao-module-jy-business - cn.iocoder.cloud - ${revision} - - 4.0.0 - jar - - yudao-module-jy-business-server - - ${project.artifactId} - - JyBusiness 模块。 - - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-env - - - - - cn.iocoder.cloud - yudao-module-system-api - ${revision} - - - cn.iocoder.cloud - yudao-module-infra-api - ${revision} - - - - cn.iocoder.cloud - yudao-module-jy-business-api - ${revision} - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-biz-data-permission - - - cn.iocoder.cloud - yudao-spring-boot-starter-biz-tenant - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-web - - - - cn.iocoder.cloud - yudao-spring-boot-starter-security - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-mybatis - - - - cn.iocoder.cloud - yudao-spring-boot-starter-redis - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-rpc - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-discovery - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-config - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-job - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-mq - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-test - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-excel - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-monitor - - - cn.iocoder.cloud - yudao-spring-boot-starter-biz-business - ${revision} - - - - - - ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - - - - diff --git a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/JyBusinessServerApplication.java b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/JyBusinessServerApplication.java deleted file mode 100644 index 8af808d..0000000 --- a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/JyBusinessServerApplication.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.yudao.module.jybusiness; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * JyBusiness 模块的启动类 - * - * @author ZT - */ -//@SpringBootApplication -public class JyBusinessServerApplication { - - public static void main(String[] args) { - SpringApplication.run(JyBusinessServerApplication.class, args); - } - -} diff --git a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/controller/admin/jybusiness/JyBusinessController.java b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/controller/admin/jybusiness/JyBusinessController.java deleted file mode 100644 index ebafc19..0000000 --- a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/controller/admin/jybusiness/JyBusinessController.java +++ /dev/null @@ -1,29 +0,0 @@ -package cn.iocoder.yudao.module.jybusiness.controller.admin.jybusiness; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -/** - * JyBusiness 控制器 - * - * @author ZT - */ -@Tag(name = "管理后台 - JyBusiness") -@RestController -@RequestMapping("/admin/jy-business/jy-business") -public class JyBusinessController { - - @GetMapping("/hello") - @Operation(summary = "Hello JyBusiness") - public CommonResult hello() { - return success("Hello, JyBusiness!"); - } - -} diff --git a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/rpc/config/RpcConfiguration.java b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/rpc/config/RpcConfiguration.java deleted file mode 100644 index 384c6f1..0000000 --- a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/rpc/config/RpcConfiguration.java +++ /dev/null @@ -1,10 +0,0 @@ -package cn.iocoder.yudao.module.jybusiness.framework.rpc.config; - -import cn.iocoder.yudao.module.system.api.dept.DeptApi; -import org.springframework.cloud.openfeign.EnableFeignClients; -import org.springframework.context.annotation.Configuration; - -@Configuration(value = "jybusinessRpcConfiguration", proxyBeanMethods = false) -@EnableFeignClients(clients = {DeptApi.class}) -public class RpcConfiguration { -} diff --git a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/security/config/SecurityConfiguration.java b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/security/config/SecurityConfiguration.java deleted file mode 100644 index cf7ee96..0000000 --- a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/security/config/SecurityConfiguration.java +++ /dev/null @@ -1,40 +0,0 @@ -package cn.iocoder.yudao.module.jybusiness.framework.security.config; - -import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer; -import cn.iocoder.yudao.module.infra.enums.ApiConstants; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer; - - -/** - * Template 模块的 Security 配置 - */ -@Configuration("jyBusinessSecurityConfiguration") -public class SecurityConfiguration { - - @Bean - public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() { - return new AuthorizeRequestsCustomizer() { - - @Override - public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) { - // Swagger 接口文档 - registry.requestMatchers("/v3/api-docs/**").permitAll() - .requestMatchers("/webjars/**").permitAll() - .requestMatchers("/swagger-ui").permitAll() - .requestMatchers("/swagger-ui/**").permitAll(); - // Druid 监控 - registry.requestMatchers("/druid/**").permitAll(); - // Spring Boot Actuator 的安全配置 - registry.requestMatchers("/actuator").permitAll() - .requestMatchers("/actuator/**").permitAll(); - // RPC 服务的安全配置 - registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll(); - } - - }; - } - -} diff --git a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application-dev.yml b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application-dev.yml deleted file mode 100644 index 30abeec..0000000 --- a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application-dev.yml +++ /dev/null @@ -1,107 +0,0 @@ -spring: - # 数据源配置项 - autoconfigure: - exclude: - datasource: - druid: # Druid 【监控】相关的全局配置 - web-stat-filter: - enabled: true - stat-view-servlet: - enabled: true - allow: # 设置白名单,不填则允许所有访问 - url-pattern: /druid/* - login-username: # 控制台管理用户名和密码 - login-password: - filter: - stat: - enabled: true - log-slow-sql: true # 慢 SQL 记录 - slow-sql-millis: 100 - merge-sql: true - wall: - config: - multi-statement-allow: true - dynamic: # 多数据源配置 - druid: # Druid 【连接池】相关的全局配置 - initial-size: 5 # 初始连接数 - min-idle: 10 # 最小连接池数量 - max-active: 20 # 最大连接池数量 - max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 - time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 - min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 - max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 - validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 - test-while-idle: true - test-on-borrow: false - test-on-return: false - primary: master - datasource: - master: - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - lazy: true # 开启懒加载,保证启动速度 - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 - data: - redis: - host: 172.16.46.63 # 地址 - port: 30379 # 端口 - database: 0 # 数据库索引 -# password: 123456 # 密码,建议生产环境开启 - -xxl: - job: - admin: - addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址 - -# Lock4j 配置项 -lock4j: - acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 - expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 - -# Actuator 监控端点的配置项 -management: - endpoints: - web: - base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator - exposure: - include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 - -# 日志文件配置 -logging: - file: - name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 - - -justauth: - enabled: true - type: - DINGTALK: # 钉钉 - client-id: dingvrnreaje3yqvzhxg - client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI - ignore-check-redirect-uri: true - WECHAT_ENTERPRISE: # 企业微信 - client-id: wwd411c69a39ad2e54 - client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw - agent-id: 1000004 - ignore-check-redirect-uri: true - # noinspection SpringBootApplicationYaml - WECHAT_MINI_PROGRAM: # 微信小程序 - client-id: ${dollar}{wx.miniapp.appid} - client-secret: ${dollar}{wx.miniapp.secret} - ignore-check-redirect-uri: true - ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验 - WECHAT_MP: # 微信公众号 - client-id: ${dollar}{wx.mp.app-id} - client-secret: ${dollar}{wx.mp.secret} - ignore-check-redirect-uri: true - cache: - type: REDIS - prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: - timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 - diff --git a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application-local.yml b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application-local.yml deleted file mode 100644 index e9bd62e..0000000 --- a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application-local.yml +++ /dev/null @@ -1,97 +0,0 @@ -spring: - # 数据源配置项 - autoconfigure: - # noinspection SpringBootApplicationYaml - exclude: - - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源 - datasource: - druid: # Druid 【监控】相关的全局配置 - web-stat-filter: - enabled: true - stat-view-servlet: - enabled: true - allow: # 设置白名单,不填则允许所有访问 - url-pattern: /druid/* - login-username: # 控制台管理用户名和密码 - login-password: - filter: - stat: - enabled: true - log-slow-sql: true # 慢 SQL 记录 - slow-sql-millis: 100 - merge-sql: true - wall: - config: - multi-statement-allow: true - dynamic: # 多数据源配置 - druid: # Druid 【连接池】相关的全局配置 - initial-size: 1 # 初始连接数 - min-idle: 1 # 最小连接池数量 - max-active: 20 # 最大连接池数量 - max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 - time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 - min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 - max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 - validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 - test-while-idle: true - test-on-borrow: false - test-on-return: false - primary: master - datasource: - master: - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - lazy: true # 开启懒加载,保证启动速度 - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 - data: - redis: - host: 172.16.46.63 # 地址 - port: 30379 # 端口 - database: 0 # 数据库索引 -# password: 123456 # 密码,建议生产环境开启 - -xxl: - job: - admin: - addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址 - -# Lock4j 配置项 -lock4j: - acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 - expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 - -# Actuator 监控端点的配置项 -management: - endpoints: - web: - base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator - exposure: - include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 - -# 日志文件配置 -logging: - level: - # 配置自己写的 MyBatis Mapper 打印日志 - cn.iocoder.yudao.module.jybusiness.dal.mysql: debug - org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR - -mybatis-plus: - configuration: - log-impl: org.apache.ibatis.logging.stdout.StdOutImpl - - -# 芋道配置项,设置当前项目所有自定义的配置 -yudao: - env: # 多环境的配置项 - tag: ${HOSTNAME} - security: - mock-enable: true - access-log: # 访问日志的配置项 - enable: true - diff --git a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application.yml b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application.yml deleted file mode 100644 index 6a7b616..0000000 --- a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application.yml +++ /dev/null @@ -1,123 +0,0 @@ -spring: - application: - name: jy-business-server - - profiles: - active: ${env.name} - #统一nacos配置,使用 profile 管理 - cloud: - nacos: - server-addr: ${config.server-addr} # Nacos 服务器地址 - username: ${config.username} # Nacos 账号 - password: ${config.password} # Nacos 密码 - discovery: # 【配置中心】配置项 - namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换 - group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP - metadata: - version: 1.0.0 # 服务实例的版本号,可用于灰度发布 - config: # 【注册中心】配置项 - namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换 - group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP - main: - allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。 - allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务 - - config: - import: - - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置 - - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置 - - # Servlet 配置 - servlet: - # 文件上传相关配置项 - multipart: - max-file-size: 16MB # 单个文件大小 - max-request-size: 32MB # 设置总上传的文件大小 - - # Jackson 配置项 - jackson: - serialization: - write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳 - write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401 - write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳 - fail-on-empty-beans: false # 允许序列化无属性的 Bean - time-zone: Asia/Shanghai - - # Cache 配置项 - cache: - type: REDIS - redis: - time-to-live: 1h # 设置过期时间为 1 小时 - -server: - port: 48119 - -logging: - file: - name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 - -springdoc: - api-docs: - enabled: true # 1. 是否开启 Swagger 接文档的元数据 - path: /v3/api-docs - swagger-ui: - enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面 - path: /swagger-ui.html - default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档 - -knife4j: - enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面 - setting: - language: zh_cn - -# MyBatis Plus 的配置项 -mybatis-plus: - configuration: - map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 - global-config: - db-config: - id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。 - # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库 - # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库 - # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解 - logic-delete-value: 1 # 逻辑已删除值(默认为 1) - logic-not-delete-value: 0 # 逻辑未删除值(默认为 0) - banner: false # 关闭控制台的 Banner 打印 - type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject - encryptor: - password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成 - -mybatis-plus-join: - banner: false # 关闭控制台的 Banner 打印 - -# VO 转换(数据翻译)相关 -easy-trans: - is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口 - -xxl: - job: - executor: - appname: ${spring.application.name} # 执行器 AppName - logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径 - accessToken: default_token # 执行器通讯TOKEN - -yudao: - info: - version: 1.0.0 - base-package: cn.iocoder.yudao - web: - admin-ui: - url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址 - xss: - enable: false - exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系 - - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求 - - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求 - swagger: - title: 管理后台 - description: 提供管理员管理的所有功能 - version: ${yudao.info.version} - tenant: # 多租户相关配置项 - enable: true - -debug: false diff --git a/yudao-module-jy-iot/pom.xml b/yudao-module-jy-iot/pom.xml deleted file mode 100644 index 33da05c..0000000 --- a/yudao-module-jy-iot/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - dsc-qms - cn.iocoder.cloud - ${revision} - - - yudao-module-jy-iot-api - yudao-module-jy-iot-server - - 4.0.0 - - yudao-module-jy-iot - pom - - ${project.artifactId} - - JyIot 模块。 - - - diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-api/src/main/java/cn/iocoder/yudao/module/jyiot/enums/ErrorCodeConstants.java b/yudao-module-jy-iot/yudao-module-jy-iot-api/src/main/java/cn/iocoder/yudao/module/jyiot/enums/ErrorCodeConstants.java deleted file mode 100644 index 33de621..0000000 --- a/yudao-module-jy-iot/yudao-module-jy-iot-api/src/main/java/cn/iocoder/yudao/module/jyiot/enums/ErrorCodeConstants.java +++ /dev/null @@ -1,17 +0,0 @@ -package cn.iocoder.yudao.module.jyiot.enums; - -import cn.iocoder.yudao.framework.common.exception.ErrorCode; - -/** - * jy-iot 错误码枚举类 - * - * jy-iot 系统,使用 1-xxx-xxx-xxx 段 - * - * @author ZT - */ -public interface ErrorCodeConstants { - - // ========== 示例模块 1-001-000-000 ========== - ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在"); - -} diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-server/pom.xml b/yudao-module-jy-iot/yudao-module-jy-iot-server/pom.xml deleted file mode 100644 index f002282..0000000 --- a/yudao-module-jy-iot/yudao-module-jy-iot-server/pom.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - yudao-module-jy-iot - cn.iocoder.cloud - ${revision} - - 4.0.0 - jar - - yudao-module-jy-iot-server - - ${project.artifactId} - - JyIot 模块。 - - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-env - - - - - cn.iocoder.cloud - yudao-module-system-api - ${revision} - - - cn.iocoder.cloud - yudao-module-infra-api - ${revision} - - - - cn.iocoder.cloud - yudao-module-jy-iot-api - ${revision} - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-biz-data-permission - - - cn.iocoder.cloud - yudao-spring-boot-starter-biz-tenant - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-web - - - - cn.iocoder.cloud - yudao-spring-boot-starter-security - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-mybatis - - - - cn.iocoder.cloud - yudao-spring-boot-starter-redis - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-rpc - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-discovery - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-config - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-job - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-mq - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-test - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-excel - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-monitor - - - cn.iocoder.cloud - yudao-spring-boot-starter-biz-business - ${revision} - - - - - - ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - - - - diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/JyIotServerApplication.java b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/JyIotServerApplication.java deleted file mode 100644 index 34dfbe6..0000000 --- a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/JyIotServerApplication.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.yudao.module.jyiot; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * JyIot 模块的启动类 - * - * @author ZT - */ -//@SpringBootApplication -public class JyIotServerApplication { - - public static void main(String[] args) { - SpringApplication.run(JyIotServerApplication.class, args); - } - -} diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/controller/admin/jyiot/JyIotController.java b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/controller/admin/jyiot/JyIotController.java deleted file mode 100644 index c0fd36b..0000000 --- a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/controller/admin/jyiot/JyIotController.java +++ /dev/null @@ -1,29 +0,0 @@ -package cn.iocoder.yudao.module.jyiot.controller.admin.jyiot; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -/** - * JyIot 控制器 - * - * @author ZT - */ -@Tag(name = "管理后台 - JyIot") -@RestController -@RequestMapping("/admin/jy-iot/jy-iot") -public class JyIotController { - - @GetMapping("/hello") - @Operation(summary = "Hello JyIot") - public CommonResult hello() { - return success("Hello, JyIot!"); - } - -} diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/framework/rpc/config/RpcConfiguration.java b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/framework/rpc/config/RpcConfiguration.java deleted file mode 100644 index 31c1e7b..0000000 --- a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/framework/rpc/config/RpcConfiguration.java +++ /dev/null @@ -1,10 +0,0 @@ -package cn.iocoder.yudao.module.jyiot.framework.rpc.config; - -import cn.iocoder.yudao.module.system.api.dept.DeptApi; -import org.springframework.cloud.openfeign.EnableFeignClients; -import org.springframework.context.annotation.Configuration; - -@Configuration(value = "jyiotRpcConfiguration", proxyBeanMethods = false) -@EnableFeignClients(clients = {DeptApi.class}) -public class RpcConfiguration { -} diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application-dev.yml b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application-dev.yml deleted file mode 100644 index 30abeec..0000000 --- a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application-dev.yml +++ /dev/null @@ -1,107 +0,0 @@ -spring: - # 数据源配置项 - autoconfigure: - exclude: - datasource: - druid: # Druid 【监控】相关的全局配置 - web-stat-filter: - enabled: true - stat-view-servlet: - enabled: true - allow: # 设置白名单,不填则允许所有访问 - url-pattern: /druid/* - login-username: # 控制台管理用户名和密码 - login-password: - filter: - stat: - enabled: true - log-slow-sql: true # 慢 SQL 记录 - slow-sql-millis: 100 - merge-sql: true - wall: - config: - multi-statement-allow: true - dynamic: # 多数据源配置 - druid: # Druid 【连接池】相关的全局配置 - initial-size: 5 # 初始连接数 - min-idle: 10 # 最小连接池数量 - max-active: 20 # 最大连接池数量 - max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 - time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 - min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 - max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 - validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 - test-while-idle: true - test-on-borrow: false - test-on-return: false - primary: master - datasource: - master: - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - lazy: true # 开启懒加载,保证启动速度 - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 - data: - redis: - host: 172.16.46.63 # 地址 - port: 30379 # 端口 - database: 0 # 数据库索引 -# password: 123456 # 密码,建议生产环境开启 - -xxl: - job: - admin: - addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址 - -# Lock4j 配置项 -lock4j: - acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 - expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 - -# Actuator 监控端点的配置项 -management: - endpoints: - web: - base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator - exposure: - include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 - -# 日志文件配置 -logging: - file: - name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 - - -justauth: - enabled: true - type: - DINGTALK: # 钉钉 - client-id: dingvrnreaje3yqvzhxg - client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI - ignore-check-redirect-uri: true - WECHAT_ENTERPRISE: # 企业微信 - client-id: wwd411c69a39ad2e54 - client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw - agent-id: 1000004 - ignore-check-redirect-uri: true - # noinspection SpringBootApplicationYaml - WECHAT_MINI_PROGRAM: # 微信小程序 - client-id: ${dollar}{wx.miniapp.appid} - client-secret: ${dollar}{wx.miniapp.secret} - ignore-check-redirect-uri: true - ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验 - WECHAT_MP: # 微信公众号 - client-id: ${dollar}{wx.mp.app-id} - client-secret: ${dollar}{wx.mp.secret} - ignore-check-redirect-uri: true - cache: - type: REDIS - prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: - timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 - diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application-local.yml b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application-local.yml deleted file mode 100644 index 7aab50c..0000000 --- a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application-local.yml +++ /dev/null @@ -1,97 +0,0 @@ -spring: - # 数据源配置项 - autoconfigure: - # noinspection SpringBootApplicationYaml - exclude: - - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源 - datasource: - druid: # Druid 【监控】相关的全局配置 - web-stat-filter: - enabled: true - stat-view-servlet: - enabled: true - allow: # 设置白名单,不填则允许所有访问 - url-pattern: /druid/* - login-username: # 控制台管理用户名和密码 - login-password: - filter: - stat: - enabled: true - log-slow-sql: true # 慢 SQL 记录 - slow-sql-millis: 100 - merge-sql: true - wall: - config: - multi-statement-allow: true - dynamic: # 多数据源配置 - druid: # Druid 【连接池】相关的全局配置 - initial-size: 1 # 初始连接数 - min-idle: 1 # 最小连接池数量 - max-active: 20 # 最大连接池数量 - max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 - time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 - min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 - max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 - validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 - test-while-idle: true - test-on-borrow: false - test-on-return: false - primary: master - datasource: - master: - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - lazy: true # 开启懒加载,保证启动速度 - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 - data: - redis: - host: 172.16.46.63 # 地址 - port: 30379 # 端口 - database: 0 # 数据库索引 -# password: 123456 # 密码,建议生产环境开启 - -xxl: - job: - admin: - addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址 - -# Lock4j 配置项 -lock4j: - acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 - expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 - -# Actuator 监控端点的配置项 -management: - endpoints: - web: - base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator - exposure: - include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 - -# 日志文件配置 -logging: - level: - # 配置自己写的 MyBatis Mapper 打印日志 - cn.iocoder.yudao.module.jyiot.dal.mysql: debug - org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR - -mybatis-plus: - configuration: - log-impl: org.apache.ibatis.logging.stdout.StdOutImpl - - -# 芋道配置项,设置当前项目所有自定义的配置 -yudao: - env: # 多环境的配置项 - tag: ${HOSTNAME} - security: - mock-enable: true - access-log: # 访问日志的配置项 - enable: true - diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application.yml b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application.yml deleted file mode 100644 index 608e36a..0000000 --- a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application.yml +++ /dev/null @@ -1,123 +0,0 @@ -spring: - application: - name: jy-iot-server - - profiles: - active: ${env.name} - #统一nacos配置,使用 profile 管理 - cloud: - nacos: - server-addr: ${config.server-addr} # Nacos 服务器地址 - username: ${config.username} # Nacos 账号 - password: ${config.password} # Nacos 密码 - discovery: # 【配置中心】配置项 - namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换 - group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP - metadata: - version: 1.0.0 # 服务实例的版本号,可用于灰度发布 - config: # 【注册中心】配置项 - namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换 - group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP - main: - allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。 - allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务 - - config: - import: - - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置 - - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置 - - # Servlet 配置 - servlet: - # 文件上传相关配置项 - multipart: - max-file-size: 16MB # 单个文件大小 - max-request-size: 32MB # 设置总上传的文件大小 - - # Jackson 配置项 - jackson: - serialization: - write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳 - write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401 - write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳 - fail-on-empty-beans: false # 允许序列化无属性的 Bean - time-zone: Asia/Shanghai - - # Cache 配置项 - cache: - type: REDIS - redis: - time-to-live: 1h # 设置过期时间为 1 小时 - -server: - port: 48124 - -logging: - file: - name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 - -springdoc: - api-docs: - enabled: true # 1. 是否开启 Swagger 接文档的元数据 - path: /v3/api-docs - swagger-ui: - enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面 - path: /swagger-ui.html - default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档 - -knife4j: - enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面 - setting: - language: zh_cn - -# MyBatis Plus 的配置项 -mybatis-plus: - configuration: - map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 - global-config: - db-config: - id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。 - # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库 - # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库 - # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解 - logic-delete-value: 1 # 逻辑已删除值(默认为 1) - logic-not-delete-value: 0 # 逻辑未删除值(默认为 0) - banner: false # 关闭控制台的 Banner 打印 - type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject - encryptor: - password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成 - -mybatis-plus-join: - banner: false # 关闭控制台的 Banner 打印 - -# VO 转换(数据翻译)相关 -easy-trans: - is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口 - -xxl: - job: - executor: - appname: ${spring.application.name} # 执行器 AppName - logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径 - accessToken: default_token # 执行器通讯TOKEN - -yudao: - info: - version: 1.0.0 - base-package: cn.iocoder.yudao.module.jyiot - web: - admin-ui: - url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址 - xss: - enable: false - exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系 - - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求 - - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求 - swagger: - title: 管理后台 - description: 提供管理员管理的所有功能 - version: ${yudao.info.version} - tenant: # 多租户相关配置项 - enable: true - -debug: false diff --git a/yudao-module-jy-manage/pom.xml b/yudao-module-jy-manage/pom.xml deleted file mode 100644 index bcad065..0000000 --- a/yudao-module-jy-manage/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - dsc-qms - cn.iocoder.cloud - ${revision} - - - yudao-module-jy-manage-api - yudao-module-jy-manage-server - - 4.0.0 - - yudao-module-jy-manage - pom - - ${project.artifactId} - - JyManage 模块。 - - - diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-api/pom.xml b/yudao-module-jy-manage/yudao-module-jy-manage-api/pom.xml deleted file mode 100644 index 672a9f4..0000000 --- a/yudao-module-jy-manage/yudao-module-jy-manage-api/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - yudao-module-jy-manage - cn.iocoder.cloud - ${revision} - - 4.0.0 - yudao-module-jy-manage-api - jar - - ${project.artifactId} - - 暴露给其它模块调用 - - - - - cn.iocoder.cloud - yudao-common - - - - org.springdoc - springdoc-openapi-starter-webmvc-api - provided - - - - - org.springframework.boot - spring-boot-starter-validation - true - - - - - org.springframework.cloud - spring-cloud-starter-openfeign - true - - - - diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-api/src/main/java/cn/iocoder/yudao/module/jymanage/enums/ErrorCodeConstants.java b/yudao-module-jy-manage/yudao-module-jy-manage-api/src/main/java/cn/iocoder/yudao/module/jymanage/enums/ErrorCodeConstants.java deleted file mode 100644 index c67e135..0000000 --- a/yudao-module-jy-manage/yudao-module-jy-manage-api/src/main/java/cn/iocoder/yudao/module/jymanage/enums/ErrorCodeConstants.java +++ /dev/null @@ -1,17 +0,0 @@ -package cn.iocoder.yudao.module.jymanage.enums; - -import cn.iocoder.yudao.framework.common.exception.ErrorCode; - -/** - * jy-manage 错误码枚举类 - * - * jy-manage 系统,使用 1-xxx-xxx-xxx 段 - * - * @author ZT - */ -public interface ErrorCodeConstants { - - // ========== 示例模块 1-001-000-000 ========== - ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在"); - -} diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-server/pom.xml b/yudao-module-jy-manage/yudao-module-jy-manage-server/pom.xml deleted file mode 100644 index b9dbd1f..0000000 --- a/yudao-module-jy-manage/yudao-module-jy-manage-server/pom.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - yudao-module-jy-manage - cn.iocoder.cloud - ${revision} - - 4.0.0 - jar - - yudao-module-jy-manage-server - - ${project.artifactId} - - JyManage 模块。 - - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-env - - - - - cn.iocoder.cloud - yudao-module-system-api - ${revision} - - - cn.iocoder.cloud - yudao-module-infra-api - ${revision} - - - - cn.iocoder.cloud - yudao-module-jy-manage-api - ${revision} - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-biz-data-permission - - - cn.iocoder.cloud - yudao-spring-boot-starter-biz-tenant - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-web - - - - cn.iocoder.cloud - yudao-spring-boot-starter-security - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-mybatis - - - - cn.iocoder.cloud - yudao-spring-boot-starter-redis - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-rpc - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-discovery - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-config - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-job - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-mq - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-test - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-excel - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-monitor - - - cn.iocoder.cloud - yudao-spring-boot-starter-biz-business - ${revision} - - - - - - ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - - - - diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/JyManageServerApplication.java b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/JyManageServerApplication.java deleted file mode 100644 index 6aebf13..0000000 --- a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/JyManageServerApplication.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.yudao.module.jymanage; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * JyManage 模块的启动类 - * - * @author ZT - */ -//@SpringBootApplication -public class JyManageServerApplication { - - public static void main(String[] args) { - SpringApplication.run(JyManageServerApplication.class, args); - } - -} diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/controller/admin/jymanage/JyManageController.java b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/controller/admin/jymanage/JyManageController.java deleted file mode 100644 index 32ad306..0000000 --- a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/controller/admin/jymanage/JyManageController.java +++ /dev/null @@ -1,29 +0,0 @@ -package cn.iocoder.yudao.module.jymanage.controller.admin.jymanage; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -/** - * JyManage 控制器 - * - * @author ZT - */ -@Tag(name = "管理后台 - JyManage") -@RestController -@RequestMapping("/admin/jy-manage/jy-manage") -public class JyManageController { - - @GetMapping("/hello") - @Operation(summary = "Hello JyManage") - public CommonResult hello() { - return success("Hello, JyManage!"); - } - -} diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/framework/rpc/config/RpcConfiguration.java b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/framework/rpc/config/RpcConfiguration.java deleted file mode 100644 index e0bb4d3..0000000 --- a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/framework/rpc/config/RpcConfiguration.java +++ /dev/null @@ -1,10 +0,0 @@ -package cn.iocoder.yudao.module.jymanage.framework.rpc.config; - -import cn.iocoder.yudao.module.system.api.dept.DeptApi; -import org.springframework.cloud.openfeign.EnableFeignClients; -import org.springframework.context.annotation.Configuration; - -@Configuration(value = "jymanageRpcConfiguration", proxyBeanMethods = false) -@EnableFeignClients(clients = {DeptApi.class}) -public class RpcConfiguration { -} diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/framework/security/config/SecurityConfiguration.java b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/framework/security/config/SecurityConfiguration.java deleted file mode 100644 index 06c4a8f..0000000 --- a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/framework/security/config/SecurityConfiguration.java +++ /dev/null @@ -1,40 +0,0 @@ -package cn.iocoder.yudao.module.jymanage.framework.security.config; - -import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer; -import cn.iocoder.yudao.module.infra.enums.ApiConstants; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer; - - -/** - * Template 模块的 Security 配置 - */ -@Configuration("jyManageSecurityConfiguration") -public class SecurityConfiguration { - - @Bean - public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() { - return new AuthorizeRequestsCustomizer() { - - @Override - public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) { - // Swagger 接口文档 - registry.requestMatchers("/v3/api-docs/**").permitAll() - .requestMatchers("/webjars/**").permitAll() - .requestMatchers("/swagger-ui").permitAll() - .requestMatchers("/swagger-ui/**").permitAll(); - // Druid 监控 - registry.requestMatchers("/druid/**").permitAll(); - // Spring Boot Actuator 的安全配置 - registry.requestMatchers("/actuator").permitAll() - .requestMatchers("/actuator/**").permitAll(); - // RPC 服务的安全配置 - registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll(); - } - - }; - } - -} diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application-dev.yml b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application-dev.yml deleted file mode 100644 index 30abeec..0000000 --- a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application-dev.yml +++ /dev/null @@ -1,107 +0,0 @@ -spring: - # 数据源配置项 - autoconfigure: - exclude: - datasource: - druid: # Druid 【监控】相关的全局配置 - web-stat-filter: - enabled: true - stat-view-servlet: - enabled: true - allow: # 设置白名单,不填则允许所有访问 - url-pattern: /druid/* - login-username: # 控制台管理用户名和密码 - login-password: - filter: - stat: - enabled: true - log-slow-sql: true # 慢 SQL 记录 - slow-sql-millis: 100 - merge-sql: true - wall: - config: - multi-statement-allow: true - dynamic: # 多数据源配置 - druid: # Druid 【连接池】相关的全局配置 - initial-size: 5 # 初始连接数 - min-idle: 10 # 最小连接池数量 - max-active: 20 # 最大连接池数量 - max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 - time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 - min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 - max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 - validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 - test-while-idle: true - test-on-borrow: false - test-on-return: false - primary: master - datasource: - master: - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - lazy: true # 开启懒加载,保证启动速度 - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 - data: - redis: - host: 172.16.46.63 # 地址 - port: 30379 # 端口 - database: 0 # 数据库索引 -# password: 123456 # 密码,建议生产环境开启 - -xxl: - job: - admin: - addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址 - -# Lock4j 配置项 -lock4j: - acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 - expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 - -# Actuator 监控端点的配置项 -management: - endpoints: - web: - base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator - exposure: - include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 - -# 日志文件配置 -logging: - file: - name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 - - -justauth: - enabled: true - type: - DINGTALK: # 钉钉 - client-id: dingvrnreaje3yqvzhxg - client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI - ignore-check-redirect-uri: true - WECHAT_ENTERPRISE: # 企业微信 - client-id: wwd411c69a39ad2e54 - client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw - agent-id: 1000004 - ignore-check-redirect-uri: true - # noinspection SpringBootApplicationYaml - WECHAT_MINI_PROGRAM: # 微信小程序 - client-id: ${dollar}{wx.miniapp.appid} - client-secret: ${dollar}{wx.miniapp.secret} - ignore-check-redirect-uri: true - ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验 - WECHAT_MP: # 微信公众号 - client-id: ${dollar}{wx.mp.app-id} - client-secret: ${dollar}{wx.mp.secret} - ignore-check-redirect-uri: true - cache: - type: REDIS - prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: - timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 - diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application-local.yml b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application-local.yml deleted file mode 100644 index 6d1d3b6..0000000 --- a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application-local.yml +++ /dev/null @@ -1,97 +0,0 @@ -spring: - # 数据源配置项 - autoconfigure: - # noinspection SpringBootApplicationYaml - exclude: - - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源 - datasource: - druid: # Druid 【监控】相关的全局配置 - web-stat-filter: - enabled: true - stat-view-servlet: - enabled: true - allow: # 设置白名单,不填则允许所有访问 - url-pattern: /druid/* - login-username: # 控制台管理用户名和密码 - login-password: - filter: - stat: - enabled: true - log-slow-sql: true # 慢 SQL 记录 - slow-sql-millis: 100 - merge-sql: true - wall: - config: - multi-statement-allow: true - dynamic: # 多数据源配置 - druid: # Druid 【连接池】相关的全局配置 - initial-size: 1 # 初始连接数 - min-idle: 1 # 最小连接池数量 - max-active: 20 # 最大连接池数量 - max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 - time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 - min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 - max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 - validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 - test-while-idle: true - test-on-borrow: false - test-on-return: false - primary: master - datasource: - master: - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - lazy: true # 开启懒加载,保证启动速度 - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 - data: - redis: - host: 172.16.46.63 # 地址 - port: 30379 # 端口 - database: 0 # 数据库索引 -# password: 123456 # 密码,建议生产环境开启 - -xxl: - job: - admin: - addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址 - -# Lock4j 配置项 -lock4j: - acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 - expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 - -# Actuator 监控端点的配置项 -management: - endpoints: - web: - base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator - exposure: - include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 - -# 日志文件配置 -logging: - level: - # 配置自己写的 MyBatis Mapper 打印日志 - cn.iocoder.yudao.module.jymanage.dal.mysql: debug - org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR - -mybatis-plus: - configuration: - log-impl: org.apache.ibatis.logging.stdout.StdOutImpl - - -# 芋道配置项,设置当前项目所有自定义的配置 -yudao: - env: # 多环境的配置项 - tag: ${HOSTNAME} - security: - mock-enable: true - access-log: # 访问日志的配置项 - enable: true - diff --git a/yudao-module-jy-office/pom.xml b/yudao-module-jy-office/pom.xml deleted file mode 100644 index bb71952..0000000 --- a/yudao-module-jy-office/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - dsc-qms - cn.iocoder.cloud - ${revision} - - - yudao-module-jy-office-api - yudao-module-jy-office-server - - 4.0.0 - - yudao-module-jy-office - pom - - ${project.artifactId} - - JyOffice 模块。 - - - diff --git a/yudao-module-jy-office/yudao-module-jy-office-api/pom.xml b/yudao-module-jy-office/yudao-module-jy-office-api/pom.xml deleted file mode 100644 index 6387ecd..0000000 --- a/yudao-module-jy-office/yudao-module-jy-office-api/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - yudao-module-jy-office - cn.iocoder.cloud - ${revision} - - 4.0.0 - yudao-module-jy-office-api - jar - - ${project.artifactId} - - 暴露给其它模块调用 - - - - - cn.iocoder.cloud - yudao-common - - - - org.springdoc - springdoc-openapi-starter-webmvc-api - provided - - - - - org.springframework.boot - spring-boot-starter-validation - true - - - - - org.springframework.cloud - spring-cloud-starter-openfeign - true - - - - diff --git a/yudao-module-jy-office/yudao-module-jy-office-api/src/main/java/cn/iocoder/yudao/module/jyoffice/enums/ErrorCodeConstants.java b/yudao-module-jy-office/yudao-module-jy-office-api/src/main/java/cn/iocoder/yudao/module/jyoffice/enums/ErrorCodeConstants.java deleted file mode 100644 index 71ab6ff..0000000 --- a/yudao-module-jy-office/yudao-module-jy-office-api/src/main/java/cn/iocoder/yudao/module/jyoffice/enums/ErrorCodeConstants.java +++ /dev/null @@ -1,17 +0,0 @@ -package cn.iocoder.yudao.module.jyoffice.enums; - -import cn.iocoder.yudao.framework.common.exception.ErrorCode; - -/** - * jy-office 错误码枚举类 - * - * jy-office 系统,使用 1-xxx-xxx-xxx 段 - * - * @author ZT - */ -public interface ErrorCodeConstants { - - // ========== 示例模块 1-001-000-000 ========== - ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在"); - -} diff --git a/yudao-module-jy-office/yudao-module-jy-office-server/pom.xml b/yudao-module-jy-office/yudao-module-jy-office-server/pom.xml deleted file mode 100644 index 99b7dd2..0000000 --- a/yudao-module-jy-office/yudao-module-jy-office-server/pom.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - yudao-module-jy-office - cn.iocoder.cloud - ${revision} - - 4.0.0 - jar - - yudao-module-jy-office-server - - ${project.artifactId} - - JyOffice 模块。 - - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-env - - - - - cn.iocoder.cloud - yudao-module-system-api - ${revision} - - - cn.iocoder.cloud - yudao-module-infra-api - ${revision} - - - - cn.iocoder.cloud - yudao-module-jy-office-api - ${revision} - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-biz-data-permission - - - cn.iocoder.cloud - yudao-spring-boot-starter-biz-tenant - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-web - - - - cn.iocoder.cloud - yudao-spring-boot-starter-security - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-mybatis - - - - cn.iocoder.cloud - yudao-spring-boot-starter-redis - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-rpc - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-discovery - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-config - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-job - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-mq - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-test - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-excel - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-monitor - - - cn.iocoder.cloud - yudao-spring-boot-starter-biz-business - ${revision} - - - - - - ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - - - - diff --git a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/JyOfficeServerApplication.java b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/JyOfficeServerApplication.java deleted file mode 100644 index bd9e0e5..0000000 --- a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/JyOfficeServerApplication.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.yudao.module.jyoffice; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * JyOffice 模块的启动类 - * - * @author ZT - */ -//@SpringBootApplication -public class JyOfficeServerApplication { - - public static void main(String[] args) { - SpringApplication.run(JyOfficeServerApplication.class, args); - } - -} diff --git a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/controller/admin/jyoffice/JyOfficeController.java b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/controller/admin/jyoffice/JyOfficeController.java deleted file mode 100644 index d74a07c..0000000 --- a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/controller/admin/jyoffice/JyOfficeController.java +++ /dev/null @@ -1,29 +0,0 @@ -package cn.iocoder.yudao.module.jyoffice.controller.admin.jyoffice; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -/** - * JyOffice 控制器 - * - * @author ZT - */ -@Tag(name = "管理后台 - JyOffice") -@RestController -@RequestMapping("/admin/jy-office/jy-office") -public class JyOfficeController { - - @GetMapping("/hello") - @Operation(summary = "Hello JyOffice") - public CommonResult hello() { - return success("Hello, JyOffice!"); - } - -} diff --git a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/framework/rpc/config/RpcConfiguration.java b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/framework/rpc/config/RpcConfiguration.java deleted file mode 100644 index 71221bf..0000000 --- a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/framework/rpc/config/RpcConfiguration.java +++ /dev/null @@ -1,10 +0,0 @@ -package cn.iocoder.yudao.module.jyoffice.framework.rpc.config; - -import cn.iocoder.yudao.module.system.api.dept.DeptApi; -import org.springframework.cloud.openfeign.EnableFeignClients; -import org.springframework.context.annotation.Configuration; - -@Configuration(value = "jyofficeRpcConfiguration", proxyBeanMethods = false) -@EnableFeignClients(clients = {DeptApi.class}) -public class RpcConfiguration { -} diff --git a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/framework/security/config/SecurityConfiguration.java b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/framework/security/config/SecurityConfiguration.java deleted file mode 100644 index 0d9f73e..0000000 --- a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/framework/security/config/SecurityConfiguration.java +++ /dev/null @@ -1,40 +0,0 @@ -package cn.iocoder.yudao.module.jyoffice.framework.security.config; - -import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer; -import cn.iocoder.yudao.module.infra.enums.ApiConstants; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer; - - -/** - * Template 模块的 Security 配置 - */ -@Configuration("jyOfficeSecurityConfiguration") -public class SecurityConfiguration { - - @Bean - public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() { - return new AuthorizeRequestsCustomizer() { - - @Override - public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) { - // Swagger 接口文档 - registry.requestMatchers("/v3/api-docs/**").permitAll() - .requestMatchers("/webjars/**").permitAll() - .requestMatchers("/swagger-ui").permitAll() - .requestMatchers("/swagger-ui/**").permitAll(); - // Druid 监控 - registry.requestMatchers("/druid/**").permitAll(); - // Spring Boot Actuator 的安全配置 - registry.requestMatchers("/actuator").permitAll() - .requestMatchers("/actuator/**").permitAll(); - // RPC 服务的安全配置 - registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll(); - } - - }; - } - -} diff --git a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application-dev.yml b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application-dev.yml deleted file mode 100644 index 30abeec..0000000 --- a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application-dev.yml +++ /dev/null @@ -1,107 +0,0 @@ -spring: - # 数据源配置项 - autoconfigure: - exclude: - datasource: - druid: # Druid 【监控】相关的全局配置 - web-stat-filter: - enabled: true - stat-view-servlet: - enabled: true - allow: # 设置白名单,不填则允许所有访问 - url-pattern: /druid/* - login-username: # 控制台管理用户名和密码 - login-password: - filter: - stat: - enabled: true - log-slow-sql: true # 慢 SQL 记录 - slow-sql-millis: 100 - merge-sql: true - wall: - config: - multi-statement-allow: true - dynamic: # 多数据源配置 - druid: # Druid 【连接池】相关的全局配置 - initial-size: 5 # 初始连接数 - min-idle: 10 # 最小连接池数量 - max-active: 20 # 最大连接池数量 - max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 - time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 - min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 - max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 - validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 - test-while-idle: true - test-on-borrow: false - test-on-return: false - primary: master - datasource: - master: - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - lazy: true # 开启懒加载,保证启动速度 - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 - data: - redis: - host: 172.16.46.63 # 地址 - port: 30379 # 端口 - database: 0 # 数据库索引 -# password: 123456 # 密码,建议生产环境开启 - -xxl: - job: - admin: - addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址 - -# Lock4j 配置项 -lock4j: - acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 - expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 - -# Actuator 监控端点的配置项 -management: - endpoints: - web: - base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator - exposure: - include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 - -# 日志文件配置 -logging: - file: - name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 - - -justauth: - enabled: true - type: - DINGTALK: # 钉钉 - client-id: dingvrnreaje3yqvzhxg - client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI - ignore-check-redirect-uri: true - WECHAT_ENTERPRISE: # 企业微信 - client-id: wwd411c69a39ad2e54 - client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw - agent-id: 1000004 - ignore-check-redirect-uri: true - # noinspection SpringBootApplicationYaml - WECHAT_MINI_PROGRAM: # 微信小程序 - client-id: ${dollar}{wx.miniapp.appid} - client-secret: ${dollar}{wx.miniapp.secret} - ignore-check-redirect-uri: true - ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验 - WECHAT_MP: # 微信公众号 - client-id: ${dollar}{wx.mp.app-id} - client-secret: ${dollar}{wx.mp.secret} - ignore-check-redirect-uri: true - cache: - type: REDIS - prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: - timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 - diff --git a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application-local.yml b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application-local.yml deleted file mode 100644 index c706b0c..0000000 --- a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application-local.yml +++ /dev/null @@ -1,97 +0,0 @@ -spring: - # 数据源配置项 - autoconfigure: - # noinspection SpringBootApplicationYaml - exclude: - - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源 - datasource: - druid: # Druid 【监控】相关的全局配置 - web-stat-filter: - enabled: true - stat-view-servlet: - enabled: true - allow: # 设置白名单,不填则允许所有访问 - url-pattern: /druid/* - login-username: # 控制台管理用户名和密码 - login-password: - filter: - stat: - enabled: true - log-slow-sql: true # 慢 SQL 记录 - slow-sql-millis: 100 - merge-sql: true - wall: - config: - multi-statement-allow: true - dynamic: # 多数据源配置 - druid: # Druid 【连接池】相关的全局配置 - initial-size: 1 # 初始连接数 - min-idle: 1 # 最小连接池数量 - max-active: 20 # 最大连接池数量 - max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 - time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 - min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 - max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 - validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 - test-while-idle: true - test-on-borrow: false - test-on-return: false - primary: master - datasource: - master: - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - lazy: true # 开启懒加载,保证启动速度 - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 - data: - redis: - host: 172.16.46.63 # 地址 - port: 30379 # 端口 - database: 0 # 数据库索引 -# password: 123456 # 密码,建议生产环境开启 - -xxl: - job: - admin: - addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址 - -# Lock4j 配置项 -lock4j: - acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 - expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 - -# Actuator 监控端点的配置项 -management: - endpoints: - web: - base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator - exposure: - include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 - -# 日志文件配置 -logging: - level: - # 配置自己写的 MyBatis Mapper 打印日志 - cn.iocoder.yudao.module.jyoffice.dal.mysql: debug - org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR - -mybatis-plus: - configuration: - log-impl: org.apache.ibatis.logging.stdout.StdOutImpl - - -# 芋道配置项,设置当前项目所有自定义的配置 -yudao: - env: # 多环境的配置项 - tag: ${HOSTNAME} - security: - mock-enable: true - access-log: # 访问日志的配置项 - enable: true - diff --git a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application.yml b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application.yml deleted file mode 100644 index 9223dee..0000000 --- a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application.yml +++ /dev/null @@ -1,123 +0,0 @@ -spring: - application: - name: jy-office-server - - profiles: - active: ${env.name} - #统一nacos配置,使用 profile 管理 - cloud: - nacos: - server-addr: ${config.server-addr} # Nacos 服务器地址 - username: ${config.username} # Nacos 账号 - password: ${config.password} # Nacos 密码 - discovery: # 【配置中心】配置项 - namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换 - group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP - metadata: - version: 1.0.0 # 服务实例的版本号,可用于灰度发布 - config: # 【注册中心】配置项 - namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换 - group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP - main: - allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。 - allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务 - - config: - import: - - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置 - - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置 - - # Servlet 配置 - servlet: - # 文件上传相关配置项 - multipart: - max-file-size: 16MB # 单个文件大小 - max-request-size: 32MB # 设置总上传的文件大小 - - # Jackson 配置项 - jackson: - serialization: - write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳 - write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401 - write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳 - fail-on-empty-beans: false # 允许序列化无属性的 Bean - time-zone: Asia/Shanghai - - # Cache 配置项 - cache: - type: REDIS - redis: - time-to-live: 1h # 设置过期时间为 1 小时 - -server: - port: 48122 - -logging: - file: - name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 - -springdoc: - api-docs: - enabled: true # 1. 是否开启 Swagger 接文档的元数据 - path: /v3/api-docs - swagger-ui: - enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面 - path: /swagger-ui.html - default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档 - -knife4j: - enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面 - setting: - language: zh_cn - -# MyBatis Plus 的配置项 -mybatis-plus: - configuration: - map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 - global-config: - db-config: - id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。 - # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库 - # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库 - # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解 - logic-delete-value: 1 # 逻辑已删除值(默认为 1) - logic-not-delete-value: 0 # 逻辑未删除值(默认为 0) - banner: false # 关闭控制台的 Banner 打印 - type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject - encryptor: - password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成 - -mybatis-plus-join: - banner: false # 关闭控制台的 Banner 打印 - -# VO 转换(数据翻译)相关 -easy-trans: - is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口 - -xxl: - job: - executor: - appname: ${spring.application.name} # 执行器 AppName - logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径 - accessToken: default_token # 执行器通讯TOKEN - -yudao: - info: - version: 1.0.0 - base-package: cn.iocoder.yudao.module.jyoffice - web: - admin-ui: - url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址 - xss: - enable: false - exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系 - - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求 - - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求 - swagger: - title: 管理后台 - description: 提供管理员管理的所有功能 - version: ${yudao.info.version} - tenant: # 多租户相关配置项 - enable: true - -debug: false diff --git a/yudao-module-jy-report/pom.xml b/yudao-module-jy-report/pom.xml deleted file mode 100644 index 18a285a..0000000 --- a/yudao-module-jy-report/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - dsc-qms - cn.iocoder.cloud - ${revision} - - - yudao-module-jy-report-api - yudao-module-jy-report-server - - 4.0.0 - - yudao-module-jy-report - pom - - ${project.artifactId} - - JyReport 模块。 - - - diff --git a/yudao-module-jy-report/yudao-module-jy-report-api/pom.xml b/yudao-module-jy-report/yudao-module-jy-report-api/pom.xml deleted file mode 100644 index 52e1ffd..0000000 --- a/yudao-module-jy-report/yudao-module-jy-report-api/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - yudao-module-jy-report - cn.iocoder.cloud - ${revision} - - 4.0.0 - yudao-module-jy-report-api - jar - - ${project.artifactId} - - 暴露给其它模块调用 - - - - - cn.iocoder.cloud - yudao-common - - - - org.springdoc - springdoc-openapi-starter-webmvc-api - provided - - - - - org.springframework.boot - spring-boot-starter-validation - true - - - - - org.springframework.cloud - spring-cloud-starter-openfeign - true - - - - diff --git a/yudao-module-jy-report/yudao-module-jy-report-api/src/main/java/cn/iocoder/yudao/module/jyreport/enums/ErrorCodeConstants.java b/yudao-module-jy-report/yudao-module-jy-report-api/src/main/java/cn/iocoder/yudao/module/jyreport/enums/ErrorCodeConstants.java deleted file mode 100644 index b38f378..0000000 --- a/yudao-module-jy-report/yudao-module-jy-report-api/src/main/java/cn/iocoder/yudao/module/jyreport/enums/ErrorCodeConstants.java +++ /dev/null @@ -1,17 +0,0 @@ -package cn.iocoder.yudao.module.jyreport.enums; - -import cn.iocoder.yudao.framework.common.exception.ErrorCode; - -/** - * jy-report 错误码枚举类 - * - * jy-report 系统,使用 1-xxx-xxx-xxx 段 - * - * @author ZT - */ -public interface ErrorCodeConstants { - - // ========== 示例模块 1-001-000-000 ========== - ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在"); - -} diff --git a/yudao-module-jy-report/yudao-module-jy-report-server/pom.xml b/yudao-module-jy-report/yudao-module-jy-report-server/pom.xml deleted file mode 100644 index a69da22..0000000 --- a/yudao-module-jy-report/yudao-module-jy-report-server/pom.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - yudao-module-jy-report - cn.iocoder.cloud - ${revision} - - 4.0.0 - jar - - yudao-module-jy-report-server - - ${project.artifactId} - - JyReport 模块。 - - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-env - - - - - cn.iocoder.cloud - yudao-module-system-api - ${revision} - - - cn.iocoder.cloud - yudao-module-infra-api - ${revision} - - - - cn.iocoder.cloud - yudao-module-jy-report-api - ${revision} - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-biz-data-permission - - - cn.iocoder.cloud - yudao-spring-boot-starter-biz-tenant - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-web - - - - cn.iocoder.cloud - yudao-spring-boot-starter-security - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-mybatis - - - - cn.iocoder.cloud - yudao-spring-boot-starter-redis - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-rpc - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-discovery - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-config - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-job - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-mq - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-test - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-excel - - - - - cn.iocoder.cloud - yudao-spring-boot-starter-monitor - - - cn.iocoder.cloud - yudao-spring-boot-starter-biz-business - ${revision} - - - - - - ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - - - - diff --git a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/JyReportServerApplication.java b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/JyReportServerApplication.java deleted file mode 100644 index 5c4d4dd..0000000 --- a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/JyReportServerApplication.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.yudao.module.jyreport; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * JyReport 模块的启动类 - * - * @author ZT - */ -//@SpringBootApplication -public class JyReportServerApplication { - - public static void main(String[] args) { - SpringApplication.run(JyReportServerApplication.class, args); - } - -} diff --git a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/controller/admin/jyreport/JyReportController.java b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/controller/admin/jyreport/JyReportController.java deleted file mode 100644 index 93712b1..0000000 --- a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/controller/admin/jyreport/JyReportController.java +++ /dev/null @@ -1,29 +0,0 @@ -package cn.iocoder.yudao.module.jyreport.controller.admin.jyreport; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -/** - * JyReport 控制器 - * - * @author ZT - */ -@Tag(name = "管理后台 - JyReport") -@RestController -@RequestMapping("/admin/jy-report/jy-report") -public class JyReportController { - - @GetMapping("/hello") - @Operation(summary = "Hello JyReport") - public CommonResult hello() { - return success("Hello, JyReport!"); - } - -} diff --git a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/framework/rpc/config/RpcConfiguration.java b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/framework/rpc/config/RpcConfiguration.java deleted file mode 100644 index a588f42..0000000 --- a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/framework/rpc/config/RpcConfiguration.java +++ /dev/null @@ -1,10 +0,0 @@ -package cn.iocoder.yudao.module.jyreport.framework.rpc.config; - -import cn.iocoder.yudao.module.system.api.dept.DeptApi; -import org.springframework.cloud.openfeign.EnableFeignClients; -import org.springframework.context.annotation.Configuration; - -@Configuration(value = "jyreportRpcConfiguration", proxyBeanMethods = false) -@EnableFeignClients(clients = {DeptApi.class}) -public class RpcConfiguration { -} diff --git a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/framework/security/config/SecurityConfiguration.java b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/framework/security/config/SecurityConfiguration.java deleted file mode 100644 index ac26840..0000000 --- a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/framework/security/config/SecurityConfiguration.java +++ /dev/null @@ -1,40 +0,0 @@ -package cn.iocoder.yudao.module.jyreport.framework.security.config; - -import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer; -import cn.iocoder.yudao.module.infra.enums.ApiConstants; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer; - - -/** - * Template 模块的 Security 配置 - */ -@Configuration("jyReportSecurityConfiguration") -public class SecurityConfiguration { - - @Bean - public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() { - return new AuthorizeRequestsCustomizer() { - - @Override - public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) { - // Swagger 接口文档 - registry.requestMatchers("/v3/api-docs/**").permitAll() - .requestMatchers("/webjars/**").permitAll() - .requestMatchers("/swagger-ui").permitAll() - .requestMatchers("/swagger-ui/**").permitAll(); - // Druid 监控 - registry.requestMatchers("/druid/**").permitAll(); - // Spring Boot Actuator 的安全配置 - registry.requestMatchers("/actuator").permitAll() - .requestMatchers("/actuator/**").permitAll(); - // RPC 服务的安全配置 - registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll(); - } - - }; - } - -} diff --git a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application-dev.yml b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application-dev.yml deleted file mode 100644 index 30abeec..0000000 --- a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application-dev.yml +++ /dev/null @@ -1,107 +0,0 @@ -spring: - # 数据源配置项 - autoconfigure: - exclude: - datasource: - druid: # Druid 【监控】相关的全局配置 - web-stat-filter: - enabled: true - stat-view-servlet: - enabled: true - allow: # 设置白名单,不填则允许所有访问 - url-pattern: /druid/* - login-username: # 控制台管理用户名和密码 - login-password: - filter: - stat: - enabled: true - log-slow-sql: true # 慢 SQL 记录 - slow-sql-millis: 100 - merge-sql: true - wall: - config: - multi-statement-allow: true - dynamic: # 多数据源配置 - druid: # Druid 【连接池】相关的全局配置 - initial-size: 5 # 初始连接数 - min-idle: 10 # 最小连接池数量 - max-active: 20 # 最大连接池数量 - max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 - time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 - min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 - max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 - validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 - test-while-idle: true - test-on-borrow: false - test-on-return: false - primary: master - datasource: - master: - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - lazy: true # 开启懒加载,保证启动速度 - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 - data: - redis: - host: 172.16.46.63 # 地址 - port: 30379 # 端口 - database: 0 # 数据库索引 -# password: 123456 # 密码,建议生产环境开启 - -xxl: - job: - admin: - addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址 - -# Lock4j 配置项 -lock4j: - acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 - expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 - -# Actuator 监控端点的配置项 -management: - endpoints: - web: - base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator - exposure: - include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 - -# 日志文件配置 -logging: - file: - name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 - - -justauth: - enabled: true - type: - DINGTALK: # 钉钉 - client-id: dingvrnreaje3yqvzhxg - client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI - ignore-check-redirect-uri: true - WECHAT_ENTERPRISE: # 企业微信 - client-id: wwd411c69a39ad2e54 - client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw - agent-id: 1000004 - ignore-check-redirect-uri: true - # noinspection SpringBootApplicationYaml - WECHAT_MINI_PROGRAM: # 微信小程序 - client-id: ${dollar}{wx.miniapp.appid} - client-secret: ${dollar}{wx.miniapp.secret} - ignore-check-redirect-uri: true - ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验 - WECHAT_MP: # 微信公众号 - client-id: ${dollar}{wx.mp.app-id} - client-secret: ${dollar}{wx.mp.secret} - ignore-check-redirect-uri: true - cache: - type: REDIS - prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: - timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 - diff --git a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application-local.yml b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application-local.yml deleted file mode 100644 index 0e77e59..0000000 --- a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application-local.yml +++ /dev/null @@ -1,97 +0,0 @@ -spring: - # 数据源配置项 - autoconfigure: - # noinspection SpringBootApplicationYaml - exclude: - - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源 - datasource: - druid: # Druid 【监控】相关的全局配置 - web-stat-filter: - enabled: true - stat-view-servlet: - enabled: true - allow: # 设置白名单,不填则允许所有访问 - url-pattern: /druid/* - login-username: # 控制台管理用户名和密码 - login-password: - filter: - stat: - enabled: true - log-slow-sql: true # 慢 SQL 记录 - slow-sql-millis: 100 - merge-sql: true - wall: - config: - multi-statement-allow: true - dynamic: # 多数据源配置 - druid: # Druid 【连接池】相关的全局配置 - initial-size: 1 # 初始连接数 - min-idle: 1 # 最小连接池数量 - max-active: 20 # 最大连接池数量 - max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 - time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 - min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 - max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 - validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 - test-while-idle: true - test-on-borrow: false - test-on-return: false - primary: master - datasource: - master: - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - lazy: true # 开启懒加载,保证启动速度 - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 - data: - redis: - host: 172.16.46.63 # 地址 - port: 30379 # 端口 - database: 0 # 数据库索引 -# password: 123456 # 密码,建议生产环境开启 - -xxl: - job: - admin: - addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址 - -# Lock4j 配置项 -lock4j: - acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 - expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 - -# Actuator 监控端点的配置项 -management: - endpoints: - web: - base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator - exposure: - include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 - -# 日志文件配置 -logging: - level: - # 配置自己写的 MyBatis Mapper 打印日志 - cn.iocoder.yudao.module.jyreport.dal.mysql: debug - org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR - -mybatis-plus: - configuration: - log-impl: org.apache.ibatis.logging.stdout.StdOutImpl - - -# 芋道配置项,设置当前项目所有自定义的配置 -yudao: - env: # 多环境的配置项 - tag: ${HOSTNAME} - security: - mock-enable: true - access-log: # 访问日志的配置项 - enable: true - diff --git a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application.yml b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application.yml deleted file mode 100644 index 3774471..0000000 --- a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application.yml +++ /dev/null @@ -1,123 +0,0 @@ -spring: - application: - name: jy-report-server - - profiles: - active: ${env.name} - #统一nacos配置,使用 profile 管理 - cloud: - nacos: - server-addr: ${config.server-addr} # Nacos 服务器地址 - username: ${config.username} # Nacos 账号 - password: ${config.password} # Nacos 密码 - discovery: # 【配置中心】配置项 - namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换 - group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP - metadata: - version: 1.0.0 # 服务实例的版本号,可用于灰度发布 - config: # 【注册中心】配置项 - namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换 - group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP - main: - allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。 - allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务 - - config: - import: - - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置 - - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置 - - # Servlet 配置 - servlet: - # 文件上传相关配置项 - multipart: - max-file-size: 16MB # 单个文件大小 - max-request-size: 32MB # 设置总上传的文件大小 - - # Jackson 配置项 - jackson: - serialization: - write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳 - write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401 - write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳 - fail-on-empty-beans: false # 允许序列化无属性的 Bean - time-zone: Asia/Shanghai - - # Cache 配置项 - cache: - type: REDIS - redis: - time-to-live: 1h # 设置过期时间为 1 小时 - -server: - port: 48123 - -logging: - file: - name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 - -springdoc: - api-docs: - enabled: true # 1. 是否开启 Swagger 接文档的元数据 - path: /v3/api-docs - swagger-ui: - enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面 - path: /swagger-ui.html - default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档 - -knife4j: - enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面 - setting: - language: zh_cn - -# MyBatis Plus 的配置项 -mybatis-plus: - configuration: - map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 - global-config: - db-config: - id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。 - # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库 - # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库 - # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解 - logic-delete-value: 1 # 逻辑已删除值(默认为 1) - logic-not-delete-value: 0 # 逻辑未删除值(默认为 0) - banner: false # 关闭控制台的 Banner 打印 - type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject - encryptor: - password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成 - -mybatis-plus-join: - banner: false # 关闭控制台的 Banner 打印 - -# VO 转换(数据翻译)相关 -easy-trans: - is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口 - -xxl: - job: - executor: - appname: ${spring.application.name} # 执行器 AppName - logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径 - accessToken: default_token # 执行器通讯TOKEN - -yudao: - info: - version: 1.0.0 - base-package: cn.iocoder.yudao.module.jyreport - web: - admin-ui: - url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址 - xss: - enable: false - exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系 - - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求 - - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求 - swagger: - title: 管理后台 - description: 提供管理员管理的所有功能 - version: ${yudao.info.version} - tenant: # 多租户相关配置项 - enable: true - -debug: false diff --git a/yudao-module-jy-resource/pom.xml b/yudao-module-jy-resource/pom.xml deleted file mode 100644 index 17d649c..0000000 --- a/yudao-module-jy-resource/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - dsc-qms - cn.iocoder.cloud - ${revision} - - - yudao-module-jy-resource-api - yudao-module-jy-resource-server - - 4.0.0 - - yudao-module-jy-resource - pom - - ${project.artifactId} - - JyResource 模块。 - - - diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-api/pom.xml b/yudao-module-jy-resource/yudao-module-jy-resource-api/pom.xml deleted file mode 100644 index 631b02a..0000000 --- a/yudao-module-jy-resource/yudao-module-jy-resource-api/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - yudao-module-jy-resource - cn.iocoder.cloud - ${revision} - - 4.0.0 - yudao-module-jy-resource-api - jar - - ${project.artifactId} - - 暴露给其它模块调用 - - - - - cn.iocoder.cloud - yudao-common - - - - org.springdoc - springdoc-openapi-starter-webmvc-api - provided - - - - - org.springframework.boot - spring-boot-starter-validation - true - - - - - org.springframework.cloud - spring-cloud-starter-openfeign - true - - - - diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-api/src/main/java/cn/iocoder/yudao/module/jyresource/enums/ErrorCodeConstants.java b/yudao-module-jy-resource/yudao-module-jy-resource-api/src/main/java/cn/iocoder/yudao/module/jyresource/enums/ErrorCodeConstants.java deleted file mode 100644 index 6018684..0000000 --- a/yudao-module-jy-resource/yudao-module-jy-resource-api/src/main/java/cn/iocoder/yudao/module/jyresource/enums/ErrorCodeConstants.java +++ /dev/null @@ -1,17 +0,0 @@ -package cn.iocoder.yudao.module.jyresource.enums; - -import cn.iocoder.yudao.framework.common.exception.ErrorCode; - -/** - * jy-resource 错误码枚举类 - * - * jy-resource 系统,使用 1-xxx-xxx-xxx 段 - * - * @author ZT - */ -public interface ErrorCodeConstants { - - // ========== 示例模块 1-001-000-000 ========== - ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在"); - -} diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/JyResourceServerApplication.java b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/JyResourceServerApplication.java deleted file mode 100644 index 5f320c4..0000000 --- a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/JyResourceServerApplication.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.yudao.module.jyresource; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * JyResource 模块的启动类 - * - * @author ZT - */ -//@SpringBootApplication -public class JyResourceServerApplication { - - public static void main(String[] args) { - SpringApplication.run(JyResourceServerApplication.class, args); - } - -} diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/controller/admin/jyresource/JyResourceController.java b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/controller/admin/jyresource/JyResourceController.java deleted file mode 100644 index 6078948..0000000 --- a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/controller/admin/jyresource/JyResourceController.java +++ /dev/null @@ -1,29 +0,0 @@ -package cn.iocoder.yudao.module.jyresource.controller.admin.jyresource; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -/** - * JyResource 控制器 - * - * @author ZT - */ -@Tag(name = "管理后台 - JyResource") -@RestController -@RequestMapping("/admin/jy-resource/jy-resource") -public class JyResourceController { - - @GetMapping("/hello") - @Operation(summary = "Hello JyResource") - public CommonResult hello() { - return success("Hello, JyResource!"); - } - -} diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/framework/rpc/config/RpcConfiguration.java b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/framework/rpc/config/RpcConfiguration.java deleted file mode 100644 index 24ba68d..0000000 --- a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/framework/rpc/config/RpcConfiguration.java +++ /dev/null @@ -1,10 +0,0 @@ -package cn.iocoder.yudao.module.jyresource.framework.rpc.config; - -import cn.iocoder.yudao.module.system.api.dept.DeptApi; -import org.springframework.cloud.openfeign.EnableFeignClients; -import org.springframework.context.annotation.Configuration; - -@Configuration(value = "jyresourceRpcConfiguration", proxyBeanMethods = false) -@EnableFeignClients(clients = {DeptApi.class}) -public class RpcConfiguration { -} diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/framework/security/config/SecurityConfiguration.java b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/framework/security/config/SecurityConfiguration.java deleted file mode 100644 index c376519..0000000 --- a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/framework/security/config/SecurityConfiguration.java +++ /dev/null @@ -1,40 +0,0 @@ -package cn.iocoder.yudao.module.jyresource.framework.security.config; - -import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer; -import cn.iocoder.yudao.module.infra.enums.ApiConstants; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer; - - -/** - * Template 模块的 Security 配置 - */ -@Configuration("jyResourceSecurityConfiguration") -public class SecurityConfiguration { - - @Bean - public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() { - return new AuthorizeRequestsCustomizer() { - - @Override - public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) { - // Swagger 接口文档 - registry.requestMatchers("/v3/api-docs/**").permitAll() - .requestMatchers("/webjars/**").permitAll() - .requestMatchers("/swagger-ui").permitAll() - .requestMatchers("/swagger-ui/**").permitAll(); - // Druid 监控 - registry.requestMatchers("/druid/**").permitAll(); - // Spring Boot Actuator 的安全配置 - registry.requestMatchers("/actuator").permitAll() - .requestMatchers("/actuator/**").permitAll(); - // RPC 服务的安全配置 - registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll(); - } - - }; - } - -} diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application-dev.yml b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application-dev.yml deleted file mode 100644 index 30abeec..0000000 --- a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application-dev.yml +++ /dev/null @@ -1,107 +0,0 @@ -spring: - # 数据源配置项 - autoconfigure: - exclude: - datasource: - druid: # Druid 【监控】相关的全局配置 - web-stat-filter: - enabled: true - stat-view-servlet: - enabled: true - allow: # 设置白名单,不填则允许所有访问 - url-pattern: /druid/* - login-username: # 控制台管理用户名和密码 - login-password: - filter: - stat: - enabled: true - log-slow-sql: true # 慢 SQL 记录 - slow-sql-millis: 100 - merge-sql: true - wall: - config: - multi-statement-allow: true - dynamic: # 多数据源配置 - druid: # Druid 【连接池】相关的全局配置 - initial-size: 5 # 初始连接数 - min-idle: 10 # 最小连接池数量 - max-active: 20 # 最大连接池数量 - max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 - time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 - min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 - max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 - validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 - test-while-idle: true - test-on-borrow: false - test-on-return: false - primary: master - datasource: - master: - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - lazy: true # 开启懒加载,保证启动速度 - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 - data: - redis: - host: 172.16.46.63 # 地址 - port: 30379 # 端口 - database: 0 # 数据库索引 -# password: 123456 # 密码,建议生产环境开启 - -xxl: - job: - admin: - addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址 - -# Lock4j 配置项 -lock4j: - acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 - expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 - -# Actuator 监控端点的配置项 -management: - endpoints: - web: - base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator - exposure: - include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 - -# 日志文件配置 -logging: - file: - name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 - - -justauth: - enabled: true - type: - DINGTALK: # 钉钉 - client-id: dingvrnreaje3yqvzhxg - client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI - ignore-check-redirect-uri: true - WECHAT_ENTERPRISE: # 企业微信 - client-id: wwd411c69a39ad2e54 - client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw - agent-id: 1000004 - ignore-check-redirect-uri: true - # noinspection SpringBootApplicationYaml - WECHAT_MINI_PROGRAM: # 微信小程序 - client-id: ${dollar}{wx.miniapp.appid} - client-secret: ${dollar}{wx.miniapp.secret} - ignore-check-redirect-uri: true - ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验 - WECHAT_MP: # 微信公众号 - client-id: ${dollar}{wx.mp.app-id} - client-secret: ${dollar}{wx.mp.secret} - ignore-check-redirect-uri: true - cache: - type: REDIS - prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: - timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 - diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application-local.yml b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application-local.yml deleted file mode 100644 index 34bdf4e..0000000 --- a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application-local.yml +++ /dev/null @@ -1,97 +0,0 @@ -spring: - # 数据源配置项 - autoconfigure: - # noinspection SpringBootApplicationYaml - exclude: - - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源 - datasource: - druid: # Druid 【监控】相关的全局配置 - web-stat-filter: - enabled: true - stat-view-servlet: - enabled: true - allow: # 设置白名单,不填则允许所有访问 - url-pattern: /druid/* - login-username: # 控制台管理用户名和密码 - login-password: - filter: - stat: - enabled: true - log-slow-sql: true # 慢 SQL 记录 - slow-sql-millis: 100 - merge-sql: true - wall: - config: - multi-statement-allow: true - dynamic: # 多数据源配置 - druid: # Druid 【连接池】相关的全局配置 - initial-size: 1 # 初始连接数 - min-idle: 1 # 最小连接池数量 - max-active: 20 # 最大连接池数量 - max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 - time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 - min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 - max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 - validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 - test-while-idle: true - test-on-borrow: false - test-on-return: false - primary: master - datasource: - master: - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 - lazy: true # 开启懒加载,保证启动速度 - url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO - username: SYSDBA - password: pgbsci6ddJ6Sqj@e - - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 - data: - redis: - host: 172.16.46.63 # 地址 - port: 30379 # 端口 - database: 0 # 数据库索引 -# password: 123456 # 密码,建议生产环境开启 - -xxl: - job: - admin: - addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址 - -# Lock4j 配置项 -lock4j: - acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 - expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 - -# Actuator 监控端点的配置项 -management: - endpoints: - web: - base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator - exposure: - include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 - -# 日志文件配置 -logging: - level: - # 配置自己写的 MyBatis Mapper 打印日志 - cn.iocoder.yudao.module.jyresource.dal.mysql: debug - org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR - -mybatis-plus: - configuration: - log-impl: org.apache.ibatis.logging.stdout.StdOutImpl - - -# 芋道配置项,设置当前项目所有自定义的配置 -yudao: - env: # 多环境的配置项 - tag: ${HOSTNAME} - security: - mock-enable: true - access-log: # 访问日志的配置项 - enable: true - diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application.yml b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application.yml deleted file mode 100644 index 2b86ddd..0000000 --- a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application.yml +++ /dev/null @@ -1,123 +0,0 @@ -spring: - application: - name: jy-resource-server - - profiles: - active: ${env.name} - #统一nacos配置,使用 profile 管理 - cloud: - nacos: - server-addr: ${config.server-addr} # Nacos 服务器地址 - username: ${config.username} # Nacos 账号 - password: ${config.password} # Nacos 密码 - discovery: # 【配置中心】配置项 - namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换 - group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP - metadata: - version: 1.0.0 # 服务实例的版本号,可用于灰度发布 - config: # 【注册中心】配置项 - namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换 - group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP - main: - allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。 - allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务 - - config: - import: - - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置 - - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置 - - # Servlet 配置 - servlet: - # 文件上传相关配置项 - multipart: - max-file-size: 16MB # 单个文件大小 - max-request-size: 32MB # 设置总上传的文件大小 - - # Jackson 配置项 - jackson: - serialization: - write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳 - write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401 - write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳 - fail-on-empty-beans: false # 允许序列化无属性的 Bean - time-zone: Asia/Shanghai - - # Cache 配置项 - cache: - type: REDIS - redis: - time-to-live: 1h # 设置过期时间为 1 小时 - -server: - port: 48121 - -logging: - file: - name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 - -springdoc: - api-docs: - enabled: true # 1. 是否开启 Swagger 接文档的元数据 - path: /v3/api-docs - swagger-ui: - enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面 - path: /swagger-ui.html - default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档 - -knife4j: - enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面 - setting: - language: zh_cn - -# MyBatis Plus 的配置项 -mybatis-plus: - configuration: - map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 - global-config: - db-config: - id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。 - # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库 - # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库 - # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解 - logic-delete-value: 1 # 逻辑已删除值(默认为 1) - logic-not-delete-value: 0 # 逻辑未删除值(默认为 0) - banner: false # 关闭控制台的 Banner 打印 - type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject - encryptor: - password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成 - -mybatis-plus-join: - banner: false # 关闭控制台的 Banner 打印 - -# VO 转换(数据翻译)相关 -easy-trans: - is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口 - -xxl: - job: - executor: - appname: ${spring.application.name} # 执行器 AppName - logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径 - accessToken: default_token # 执行器通讯TOKEN - -yudao: - info: - version: 1.0.0 - base-package: cn.iocoder.yudao.module.jyresource - web: - admin-ui: - url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址 - xss: - enable: false - exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系 - - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求 - - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求 - swagger: - title: 管理后台 - description: 提供管理员管理的所有功能 - version: ${yudao.info.version} - tenant: # 多租户相关配置项 - enable: true - -debug: false