From bff37a43d472e3528451960ad79c0a69a1b75bc5 Mon Sep 17 00:00:00 2001 From: wxr Date: Mon, 30 Mar 2026 11:11:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A7=94=E6=89=98=E7=99=BB=E8=AE=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/qms/enums/ErrorCodeConstants.java | 1 + ...pleEntrustUnStandardProjectController.java | 109 +++++++++ .../admin/SampleEntrustController.java | 6 +- .../BusinessSampleEntrustDetailPageReqVO.java | 20 +- .../vo/BusinessSampleEntrustDetailReqVO.java | 20 +- .../vo/BusinessSampleEntrustDetailRespVO.java | 24 +- .../BusinessSampleEntrustDetailSaveReqVO.java | 24 +- ...mpleEntrustUnStandardProjectPageReqVO.java | 56 +++++ ...sSampleEntrustUnStandardProjectRespVO.java | 71 ++++++ ...mpleEntrustUnStandardProjectSaveReqVO.java | 55 +++++ .../BusinessSampleEntrustDetailDO.java | 30 +++ ...inessSampleEntrustUnStandardProjectDO.java | 95 +++++++ .../BusinessSampleEntrustDetailMapper.java | 12 + ...sSampleEntrustUnStandardProjectMapper.java | 38 +++ .../liteflow/param/SampleEntrustDetail.java | 25 ++ .../entrust/SampleEntrustContextInitCmp.java | 56 ++++- .../SampleEntrustGenSampleDataCmp.java | 5 +- .../liteflow/slot/SampleEntrustContext.java | 12 + ...SampleEntrustUnStandardProjectService.java | 62 +++++ ...leEntrustUnStandardProjectServiceImpl.java | 91 +++++++ .../bus/service/SampleEntrustServiceImpl.java | 6 +- .../controller/vo/BaseSamplePageReqVO.java | 3 + .../vo/ConfigEntrustSourcePageReqVO.java | 9 + .../vo/ConfigEntrustSourceReqVO.java | 9 + .../vo/ConfigEntrustSourceRespVO.java | 6 + .../vo/ConfigEntrustSourceSaveReqVO.java | 6 + .../vo/MaterialAssayStandardDetailRespVO.java | 7 + .../dal/dataobject/ConfigEntrustSourceDO.java | 10 + .../config/dal/mapper/BaseSampleMapper.java | 3 + .../dal/mapper/ConfigEntrustSourceMapper.java | 6 + .../MaterialAssayStandardDetailMapper.java | 18 ++ .../MaterialAssayStandardMethodMapper.java | 5 + .../admin/OtherBaseSampleController.java | 110 +++++++++ .../OtherDictionaryBusinessController.java | 109 +++++++++ .../OtherDictionaryProjectController.java | 109 +++++++++ .../admin/OtherSystemConfigController.java | 109 +++++++++ .../admin/OtherSystemUserController.java | 109 +++++++++ .../vo/OtherBaseSamplePageReqVO.java | 53 ++++ .../controller/vo/OtherBaseSampleRespVO.java | 67 +++++ .../vo/OtherBaseSampleSaveReqVO.java | 48 ++++ .../vo/OtherDictionaryBusinessPageReqVO.java | 53 ++++ .../vo/OtherDictionaryBusinessRespVO.java | 67 +++++ .../vo/OtherDictionaryBusinessSaveReqVO.java | 49 ++++ .../vo/OtherDictionaryProjectPageReqVO.java | 50 ++++ .../vo/OtherDictionaryProjectRespVO.java | 63 +++++ .../vo/OtherDictionaryProjectSaveReqVO.java | 45 ++++ .../vo/OtherSystemConfigPageReqVO.java | 67 +++++ .../vo/OtherSystemConfigRespVO.java | 83 +++++++ .../vo/OtherSystemConfigSaveReqVO.java | 63 +++++ .../vo/OtherSystemUserPageReqVO.java | 56 +++++ .../controller/vo/OtherSystemUserRespVO.java | 71 ++++++ .../vo/OtherSystemUserSaveReqVO.java | 52 ++++ .../dal/dataobject/OtherBaseSampleDO.java | 87 +++++++ .../dataobject/OtherDictionaryBusinessDO.java | 90 +++++++ .../dataobject/OtherDictionaryProjectDO.java | 85 +++++++ .../dal/dataobject/OtherSystemConfigDO.java | 111 +++++++++ .../dal/dataobject/OtherSystemUserDO.java | 95 +++++++ .../dal/mapper/OtherBaseSampleMapper.java | 43 ++++ .../mapper/OtherDictionaryBusinessMapper.java | 42 ++++ .../mapper/OtherDictionaryProjectMapper.java | 42 ++++ .../dal/mapper/OtherSystemConfigMapper.java | 41 ++++ .../dal/mapper/OtherSystemUserMapper.java | 44 ++++ .../other/service/OtherBaseSampleService.java | 62 +++++ .../service/OtherBaseSampleServiceImpl.java | 91 +++++++ .../OtherDictionaryBusinessService.java | 62 +++++ .../OtherDictionaryBusinessServiceImpl.java | 91 +++++++ .../OtherDictionaryProjectService.java | 62 +++++ .../OtherDictionaryProjectServiceImpl.java | 91 +++++++ .../service/OtherSystemConfigService.java | 62 +++++ .../service/OtherSystemConfigServiceImpl.java | 91 +++++++ .../other/service/OtherSystemUserService.java | 62 +++++ .../service/OtherSystemUserServiceImpl.java | 91 +++++++ .../admin/AutoIngredientsController.java | 1 - .../InternalSampleEntrustController.java | 16 ++ .../ThirdpartySampleEntrustController.java | 78 ++++++ .../ThirdpartyXntSampleEntrustController.java | 90 +++++++ .../controller/admin/XRFDataController.java | 2 + .../vo/ThirdpartySampleEntrustReqVO.java | 41 ++++ .../vo/ThirdpartyXntSampleEntrustReqVO.java | 59 +++++ .../vo/ThirdpartyXntSampleEntrustRespVO.java | 13 + .../ThirdpartySampleEntrustService.java | 15 ++ .../ThirdpartySampleEntrustServiceImpl.java | 78 ++++++ .../ThirdpartyXntSampleEntrustService.java | 60 +++++ ...ThirdpartyXntSampleEntrustServiceImpl.java | 231 ++++++++++++++++++ ...ssSampleEntrustUnStandardProjectMapper.xml | 12 + .../dal/mapper/OtherBaseSampleMapper.xml | 12 + .../mapper/OtherDictionaryBusinessMapper.xml | 12 + .../mapper/OtherDictionaryProjectMapper.xml | 12 + .../dal/mapper/OtherSystemConfigMapper.xml | 12 + .../dal/mapper/OtherSystemUserMapper.xml | 12 + 90 files changed, 4510 insertions(+), 24 deletions(-) create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessSampleEntrustUnStandardProjectController.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustUnStandardProjectPageReqVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustUnStandardProjectRespVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustUnStandardProjectSaveReqVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustUnStandardProjectDO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/dal/mapper/BusinessSampleEntrustUnStandardProjectMapper.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/BusinessSampleEntrustUnStandardProjectService.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/BusinessSampleEntrustUnStandardProjectServiceImpl.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherBaseSampleController.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherDictionaryBusinessController.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherDictionaryProjectController.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherSystemConfigController.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherSystemUserController.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherBaseSamplePageReqVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherBaseSampleRespVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherBaseSampleSaveReqVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryBusinessPageReqVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryBusinessRespVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryBusinessSaveReqVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryProjectPageReqVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryProjectRespVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryProjectSaveReqVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemConfigPageReqVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemConfigRespVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemConfigSaveReqVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemUserPageReqVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemUserRespVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemUserSaveReqVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherBaseSampleDO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherDictionaryBusinessDO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherDictionaryProjectDO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherSystemConfigDO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherSystemUserDO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherBaseSampleMapper.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryBusinessMapper.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryProjectMapper.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemConfigMapper.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemUserMapper.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherBaseSampleService.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherBaseSampleServiceImpl.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryBusinessService.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryBusinessServiceImpl.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryProjectService.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryProjectServiceImpl.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemConfigService.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemConfigServiceImpl.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemUserService.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemUserServiceImpl.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/InternalSampleEntrustController.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/ThirdpartySampleEntrustController.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/ThirdpartyXntSampleEntrustController.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/vo/ThirdpartySampleEntrustReqVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/vo/ThirdpartyXntSampleEntrustReqVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/vo/ThirdpartyXntSampleEntrustRespVO.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartySampleEntrustService.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartySampleEntrustServiceImpl.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartyXntSampleEntrustService.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartyXntSampleEntrustServiceImpl.java create mode 100644 zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/bus/dal/mapper/BusinessSampleEntrustUnStandardProjectMapper.xml create mode 100644 zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherBaseSampleMapper.xml create mode 100644 zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryBusinessMapper.xml create mode 100644 zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryProjectMapper.xml create mode 100644 zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemConfigMapper.xml create mode 100644 zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemUserMapper.xml diff --git a/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/ErrorCodeConstants.java b/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/ErrorCodeConstants.java index 0a3d0112..d5fcd162 100644 --- a/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/ErrorCodeConstants.java +++ b/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/ErrorCodeConstants.java @@ -96,6 +96,7 @@ public interface ErrorCodeConstants { ErrorCode BUSINESS_SAMPLE_ENTRUST_REGISTRATION_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记业务不存在"); ErrorCode BUSINESS_SAMPLE_ENTRUST_DETAIL_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记样品明细不存在"); ErrorCode BUSINESS_SAMPLE_ENTRUST_PROJECT_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检样品检测项目业务不存在"); + ErrorCode BUSINESS_SAMPLE_ENTRUST_UN_STANDARD_PROJECT_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记样品检测项目表(无标准)不存在"); ErrorCode BUSINESS_SAMPLE_ENTRUST_DEPARTMENT_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记分析部门业务不存在"); ErrorCode BUSINESS_SAMPLE_ENTRUST_FILE_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记附件业务不存在"); ErrorCode BUSINESS_SAMPLE_ENTRUST_DEPARTMENT_DETAIL_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记分析部门样品明细不存在"); diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessSampleEntrustUnStandardProjectController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessSampleEntrustUnStandardProjectController.java new file mode 100644 index 00000000..790c4f5d --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessSampleEntrustUnStandardProjectController.java @@ -0,0 +1,109 @@ +package com.zt.plat.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 com.zt.plat.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 com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO; +import com.zt.plat.framework.common.pojo.PageParam; +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.common.pojo.CommonResult; +import com.zt.plat.framework.common.util.object.BeanUtils; +import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore; + +import static com.zt.plat.framework.common.pojo.CommonResult.success; + +import com.zt.plat.framework.excel.core.util.ExcelUtils; +import com.zt.plat.module.qms.business.bus.controller.vo.*; +import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustUnStandardProjectDO; +import com.zt.plat.module.qms.business.bus.service.BusinessSampleEntrustUnStandardProjectService; +import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog; +import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "管理后台 - 委检登记样品检测项目表(无标准)") +@RestController +@RequestMapping("/qms/business-sample-entrust-un-standard-project") +@Validated +@DeptDataPermissionIgnore(enable = "true") +public class BusinessSampleEntrustUnStandardProjectController implements BusinessControllerMarker { + + + @Resource + private BusinessSampleEntrustUnStandardProjectService businessSampleEntrustUnStandardProjectService; + + @PostMapping("/create") + @Operation(summary = "创建委检登记样品检测项目表(无标准)") + //@PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-un-standard-project:create')") + public CommonResult createBusinessSampleEntrustUnStandardProject(@Valid @RequestBody BusinessSampleEntrustUnStandardProjectSaveReqVO createReqVO) { + return success(businessSampleEntrustUnStandardProjectService.createBusinessSampleEntrustUnStandardProject(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新委检登记样品检测项目表(无标准)") + //@PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-un-standard-project:update')") + public CommonResult updateBusinessSampleEntrustUnStandardProject(@Valid @RequestBody BusinessSampleEntrustUnStandardProjectSaveReqVO updateReqVO) { + businessSampleEntrustUnStandardProjectService.updateBusinessSampleEntrustUnStandardProject(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除委检登记样品检测项目表(无标准)") + @Parameter(name = "id", description = "编号", required = true) + //@PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-un-standard-project:delete')") + public CommonResult deleteBusinessSampleEntrustUnStandardProject(@RequestParam("id") Long id) { + businessSampleEntrustUnStandardProjectService.deleteBusinessSampleEntrustUnStandardProject(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除委检登记样品检测项目表(无标准)") + //@PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-un-standard-project:delete')") + public CommonResult deleteBusinessSampleEntrustUnStandardProjectList(@RequestBody BatchDeleteReqVO req) { + businessSampleEntrustUnStandardProjectService.deleteBusinessSampleEntrustUnStandardProjectListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得委检登记样品检测项目表(无标准)") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + //@PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-un-standard-project:query')") + public CommonResult getBusinessSampleEntrustUnStandardProject(@RequestParam("id") Long id) { + BusinessSampleEntrustUnStandardProjectDO businessSampleEntrustUnStandardProject = businessSampleEntrustUnStandardProjectService.getBusinessSampleEntrustUnStandardProject(id); + return success(BeanUtils.toBean(businessSampleEntrustUnStandardProject, BusinessSampleEntrustUnStandardProjectRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得委检登记样品检测项目表(无标准)分页") + //@PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-un-standard-project:query')") + public CommonResult> getBusinessSampleEntrustUnStandardProjectPage(@Valid BusinessSampleEntrustUnStandardProjectPageReqVO pageReqVO) { + PageResult pageResult = businessSampleEntrustUnStandardProjectService.getBusinessSampleEntrustUnStandardProjectPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessSampleEntrustUnStandardProjectRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出委检登记样品检测项目表(无标准) Excel") + //@PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-un-standard-project:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessSampleEntrustUnStandardProjectExcel(@Valid BusinessSampleEntrustUnStandardProjectPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessSampleEntrustUnStandardProjectService.getBusinessSampleEntrustUnStandardProjectPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "委检登记样品检测项目表(无标准).xls", "数据", BusinessSampleEntrustUnStandardProjectRespVO.class, + BeanUtils.toBean(list, BusinessSampleEntrustUnStandardProjectRespVO.class)); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/SampleEntrustController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/SampleEntrustController.java index 6cd06cd0..01a9cf01 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/SampleEntrustController.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/SampleEntrustController.java @@ -47,7 +47,8 @@ public class SampleEntrustController implements BusinessControllerMarker { public CommonResult create(@Valid @RequestBody SampleEntrustParam sampleEntrustParam) { LiteflowResponse response = sampleEntrustService.create(sampleEntrustParam); if (response.isSuccess()) { - return success(response.getContextBean(SampleEntrustContext.class)); + SampleEntrustContext sampleEntrustContext = response.getContextBean(SampleEntrustContext.class); + return success(sampleEntrustContext.getSampleEntrustRegistration()); } else { return error(1_032_100_000, response.getMessage()); } @@ -65,7 +66,8 @@ public class SampleEntrustController implements BusinessControllerMarker { public CommonResult update(@Valid @RequestBody SampleEntrustParam sampleEntrustParam) { LiteflowResponse response = sampleEntrustService.update(sampleEntrustParam); if (response.isSuccess()) { - return success(response.getContextBean(SampleEntrustContext.class)); + SampleEntrustContext sampleEntrustContext = response.getContextBean(SampleEntrustContext.class); + return success(sampleEntrustContext.getSampleEntrustRegistration()); } else { return error(1_032_100_000, response.getMessage()); } diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailPageReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailPageReqVO.java index 5ba39d1a..4a3ce6e8 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailPageReqVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailPageReqVO.java @@ -31,12 +31,30 @@ public class BusinessSampleEntrustDetailPageReqVO extends PageParam { @Schema(description = "样品编号") private String sampleCode; - @Schema(description = "委托样品名称", example = "赵六") + @Schema(description = "批次编号,西南铜的产品批号") + private String entrustBatchCode; + + @Schema(description = "委托样品组编号") + private String entrustGroupCode; + + @Schema(description = "双杯样标识,针对双杯样标记") + private String entrustDualFlag; + + @Schema(description = "委托样品名称", example = "李四") private String entrustSampleName; @Schema(description = "委托样品编号") private String entrustSampleCode; + @Schema(description = "委托样品量") + private String entrustSampleQuantity; + + @Schema(description = "委托样品量单位") + private String entrustSampleQuantityUnit; + + @Schema(description = "分析级别") + private Integer assayLevel; + @Schema(description = "检测项目") private String assayProject; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailReqVO.java index 72f13f17..d2c1948e 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailReqVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailReqVO.java @@ -29,12 +29,30 @@ public class BusinessSampleEntrustDetailReqVO { @Schema(description = "样品编号") private String sampleCode; - @Schema(description = "委托样品名称", example = "赵六") + @Schema(description = "批次编号,西南铜的产品批号") + private String entrustBatchCode; + + @Schema(description = "委托样品组编号") + private String entrustGroupCode; + + @Schema(description = "双杯样标识,针对双杯样标记") + private String entrustDualFlag; + + @Schema(description = "委托样品名称", example = "李四") private String entrustSampleName; @Schema(description = "委托样品编号") private String entrustSampleCode; + @Schema(description = "委托样品量") + private String entrustSampleQuantity; + + @Schema(description = "委托样品量单位") + private String entrustSampleQuantityUnit; + + @Schema(description = "分析级别") + private Integer assayLevel; + @Schema(description = "检测项目") private String assayProject; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailRespVO.java index e3c0b7ca..33cba566 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailRespVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailRespVO.java @@ -40,14 +40,30 @@ public class BusinessSampleEntrustDetailRespVO { @ExcelProperty("样品编号") private String sampleCode; - @Schema(description = "委托样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") - @ExcelProperty("委托样品名称") + @Schema(description = "批次编号,西南铜的产品批号") + private String entrustBatchCode; + + @Schema(description = "委托样品组编号") + private String entrustGroupCode; + + @Schema(description = "双杯样标识,针对双杯样标记") + private String entrustDualFlag; + + @Schema(description = "委托样品名称", example = "李四") private String entrustSampleName; - @Schema(description = "委托样品编号", requiredMode = Schema.RequiredMode.REQUIRED) - @ExcelProperty("委托样品编号") + @Schema(description = "委托样品编号") private String entrustSampleCode; + @Schema(description = "委托样品量") + private String entrustSampleQuantity; + + @Schema(description = "委托样品量单位") + private String entrustSampleQuantityUnit; + + @Schema(description = "分析级别") + private Integer assayLevel; + @Schema(description = "检测项目", requiredMode = Schema.RequiredMode.REQUIRED) @ExcelProperty("检测项目") private String assayProject; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailSaveReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailSaveReqVO.java index 6f67ea88..05892428 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailSaveReqVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailSaveReqVO.java @@ -34,14 +34,30 @@ public class BusinessSampleEntrustDetailSaveReqVO { @Schema(description = "样品编号") private String sampleCode; - @Schema(description = "委托样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") - @NotEmpty(message = "委托样品名称不能为空") + @Schema(description = "批次编号,西南铜的产品批号") + private String entrustBatchCode; + + @Schema(description = "委托样品组编号") + private String entrustGroupCode; + + @Schema(description = "双杯样标识,针对双杯样标记") + private String entrustDualFlag; + + @Schema(description = "委托样品名称", example = "李四") private String entrustSampleName; - @Schema(description = "委托样品编号", requiredMode = Schema.RequiredMode.REQUIRED) - @NotEmpty(message = "委托样品编号不能为空") + @Schema(description = "委托样品编号") private String entrustSampleCode; + @Schema(description = "委托样品量") + private String entrustSampleQuantity; + + @Schema(description = "委托样品量单位") + private String entrustSampleQuantityUnit; + + @Schema(description = "分析级别") + private Integer assayLevel; + @Schema(description = "检测项目", requiredMode = Schema.RequiredMode.REQUIRED) @NotEmpty(message = "检测项目不能为空") private String assayProject; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustUnStandardProjectPageReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustUnStandardProjectPageReqVO.java new file mode 100644 index 00000000..6ea0bc69 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustUnStandardProjectPageReqVO.java @@ -0,0 +1,56 @@ +package com.zt.plat.module.qms.business.bus.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import com.zt.plat.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 委检登记样品检测项目表(无标准)分页 Request VO") +@Data +public class BusinessSampleEntrustUnStandardProjectPageReqVO extends PageParam { + + @Schema(description = "委托登记样品明细ID", example = "6940") + private Long businessSampleEntrustDetailId; + + @Schema(description = "分析部门ID", example = "18509") + private Long assayDepartmentId; + + @Schema(description = "分析部门名称", example = "赵六") + private String assayDepartmentName; + + @Schema(description = "检测任务ID", example = "978") + private Long businessAssayTaskDataId; + + @Schema(description = "检测方法配置ID", example = "14672") + private Long configAssayMethodId; + + @Schema(description = "检测方法分析项目配置ID", example = "7934") + private Long configAssayMethodProjectId; + + @Schema(description = "任务数", example = "15264") + private Integer taskCount; + + @Schema(description = "检测项目ID,字典表:【T_DIC_PRJ】", example = "17192") + 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 = "14203") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustUnStandardProjectRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustUnStandardProjectRespVO.java new file mode 100644 index 00000000..9ed74922 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustUnStandardProjectRespVO.java @@ -0,0 +1,71 @@ +package com.zt.plat.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 BusinessSampleEntrustUnStandardProjectRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18753") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "委托登记样品明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6940") + @ExcelProperty("委托登记样品明细ID") + private Long businessSampleEntrustDetailId; + + @Schema(description = "分析部门ID", example = "18509") + @ExcelProperty("分析部门ID") + private Long assayDepartmentId; + + @Schema(description = "分析部门名称", example = "赵六") + @ExcelProperty("分析部门名称") + private String assayDepartmentName; + + @Schema(description = "检测任务ID", example = "978") + @ExcelProperty("检测任务ID") + private Long businessAssayTaskDataId; + + @Schema(description = "检测方法配置ID", example = "14672") + @ExcelProperty("检测方法配置ID") + private Long configAssayMethodId; + + @Schema(description = "检测方法分析项目配置ID", example = "7934") + @ExcelProperty("检测方法分析项目配置ID") + private Long configAssayMethodProjectId; + + @Schema(description = "任务数", example = "15264") + @ExcelProperty("任务数") + private Integer taskCount; + + @Schema(description = "检测项目ID,字典表:【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "17192") + @ExcelProperty("检测项目ID,字典表:【T_DIC_PRJ】") + private Long dictionaryProjectId; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "所属部门") + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "14203") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustUnStandardProjectSaveReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustUnStandardProjectSaveReqVO.java new file mode 100644 index 00000000..d62681a3 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/vo/BusinessSampleEntrustUnStandardProjectSaveReqVO.java @@ -0,0 +1,55 @@ +package com.zt.plat.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 BusinessSampleEntrustUnStandardProjectSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18753") + private Long id; + + @Schema(description = "委托登记样品明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6940") + @NotNull(message = "委托登记样品明细ID不能为空") + private Long businessSampleEntrustDetailId; + + @Schema(description = "分析部门ID", example = "18509") + private Long assayDepartmentId; + + @Schema(description = "分析部门名称", example = "赵六") + private String assayDepartmentName; + + @Schema(description = "检测任务ID", example = "978") + private Long businessAssayTaskDataId; + + @Schema(description = "检测方法配置ID", example = "14672") + private Long configAssayMethodId; + + @Schema(description = "检测方法分析项目配置ID", example = "7934") + private Long configAssayMethodProjectId; + + @Schema(description = "任务数", example = "15264") + private Integer taskCount; + + @Schema(description = "检测项目ID,字典表:【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "17192") + @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 = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "14203") + @NotNull(message = "乐观锁不能为空") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustDetailDO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustDetailDO.java index 60f6c83e..9d857c15 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustDetailDO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustDetailDO.java @@ -62,6 +62,21 @@ public class BusinessSampleEntrustDetailDO extends BusinessBaseDO { @TableField("SMP_CD") private String sampleCode; /** + * 批次编号,西南铜的产品批号 + */ + @TableField("ENTT_BAT_CD") + private String entrustBatchCode; + /** + * 委托样品组编号 + */ + @TableField("ENTT_GRP_CD") + private String entrustGroupCode; + /** + * 双杯样标识,针对双杯样标记 + */ + @TableField("ENTT_DUAL_FLG") + private String entrustDualFlag; + /** * 委托样品名称 */ @TableField("ENTT_SMP_NAME") @@ -72,6 +87,21 @@ public class BusinessSampleEntrustDetailDO extends BusinessBaseDO { @TableField("ENTT_SMP_CD") private String entrustSampleCode; /** + * 委托样品量 + */ + @TableField("ENTT_SMP_QTY") + private String entrustSampleQuantity; + /** + * 委托样品量单位 + */ + @TableField("ENTT_SMP_QTY_UNT") + private String entrustSampleQuantityUnit; + /** + * 分析级别 + */ + @TableField("ASY_LVL") + private Integer assayLevel; + /** * 检测项目 */ @TableField("ASY_PRJ") diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustUnStandardProjectDO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustUnStandardProjectDO.java new file mode 100644 index 00000000..be7352d8 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustUnStandardProjectDO.java @@ -0,0 +1,95 @@ +package com.zt.plat.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 com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 委检登记样品检测项目表(无标准) DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_smp_entt_un_std_prj") +@KeySequence("t_bsn_smp_entt_un_std_prj_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSampleEntrustUnStandardProjectDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 委托登记样品明细ID + */ + @TableField("BSN_SMP_ENTT_DTL_ID") + private Long businessSampleEntrustDetailId; + /** + * 分析部门ID + */ + @TableField("ASY_DEPT_ID") + private Long assayDepartmentId; + /** + * 分析部门名称 + */ + @TableField("ASY_DEPT_NAME") + private String assayDepartmentName; + /** + * 检测任务ID + */ + @TableField("BSN_ASY_TSK_DAT_ID") + private Long businessAssayTaskDataId; + /** + * 检测方法配置ID + */ + @TableField("CFG_ASY_MTHD_ID") + private Long configAssayMethodId; + /** + * 检测方法分析项目配置ID + */ + @TableField("CFG_ASY_MTHD_PRJ_ID") + private Long configAssayMethodProjectId; + /** + * 任务数 + */ + @TableField("TSK_CNT") + private Integer taskCount; + /** + * 检测项目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/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.java index d3ae1b03..b1330be1 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.java @@ -44,8 +44,14 @@ public interface BusinessSampleEntrustDetailMapper extends BaseMapperX { + + default PageResult selectPage(BusinessSampleEntrustUnStandardProjectPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(BusinessSampleEntrustUnStandardProjectDO::getBusinessSampleEntrustDetailId, reqVO.getBusinessSampleEntrustDetailId()) + .eqIfPresent(BusinessSampleEntrustUnStandardProjectDO::getAssayDepartmentId, reqVO.getAssayDepartmentId()) + .likeIfPresent(BusinessSampleEntrustUnStandardProjectDO::getAssayDepartmentName, reqVO.getAssayDepartmentName()) + .eqIfPresent(BusinessSampleEntrustUnStandardProjectDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataId()) + .eqIfPresent(BusinessSampleEntrustUnStandardProjectDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId()) + .eqIfPresent(BusinessSampleEntrustUnStandardProjectDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId()) + .eqIfPresent(BusinessSampleEntrustUnStandardProjectDO::getTaskCount, reqVO.getTaskCount()) + .eqIfPresent(BusinessSampleEntrustUnStandardProjectDO::getDictionaryProjectId, reqVO.getDictionaryProjectId()) + .eqIfPresent(BusinessSampleEntrustUnStandardProjectDO::getIsEnabled, reqVO.getIsEnabled()) + .eqIfPresent(BusinessSampleEntrustUnStandardProjectDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(BusinessSampleEntrustUnStandardProjectDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BusinessSampleEntrustUnStandardProjectDO::getUpdateCount, reqVO.getUpdateCount()) + .eqIfPresent(BusinessSampleEntrustUnStandardProjectDO::getRemark, reqVO.getRemark()) + .orderByDesc(BusinessSampleEntrustUnStandardProjectDO::getId)); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/param/SampleEntrustDetail.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/param/SampleEntrustDetail.java index 259ad64a..e151ca1d 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/param/SampleEntrustDetail.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/param/SampleEntrustDetail.java @@ -2,6 +2,7 @@ package com.zt.plat.module.qms.business.bus.liteflow.param; import java.util.List; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -35,6 +36,30 @@ public class SampleEntrustDetail { /** 委托样品编号 **/ private String entrustSampleCode; + + /** 批次编号,西南铜的产品批号 **/ + @Schema(description = "批次编号,西南铜的产品批号") + private String entrustBatchCode; + + /** 委托样品组编号 **/ + @Schema(description = "委托样品组编号") + private String entrustGroupCode; + + /** 双杯样标识,针对双杯样标记 **/ + @Schema(description = "双杯样标识,针对双杯样标记") + private String entrustDualFlag; + + /** 委托样品量 **/ + @Schema(description = "委托样品量") + private String entrustSampleQuantity; + + /** 委托样品量单位 **/ + @Schema(description = "委托样品量单位") + private String entrustSampleQuantityUnit; + + /** 分析级别 **/ + @Schema(description = "分析级别") + private Integer assayLevel; /** 排序号 **/ private Integer sort; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustContextInitCmp.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustContextInitCmp.java index d8f960ac..fee207df 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustContextInitCmp.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustContextInitCmp.java @@ -2,6 +2,8 @@ package com.zt.plat.module.qms.business.bus.liteflow.sample.entrust; import java.util.ArrayList; import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; @@ -21,10 +23,12 @@ import com.zt.plat.module.qms.business.bus.liteflow.param.SampleEntrustDetail; import com.zt.plat.module.qms.business.bus.liteflow.param.SampleEntrustDetailProject; import com.zt.plat.module.qms.business.bus.liteflow.param.SampleEntrustParam; import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleEntrustContext; +import com.zt.plat.module.qms.business.config.dal.dataobject.BaseSampleDO; import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigEntrustSourceDO; import com.zt.plat.module.qms.business.config.dal.dataobject.MaterialAssayStandardDO; import com.zt.plat.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO; import com.zt.plat.module.qms.business.config.dal.dataobject.MaterialAssayStandardMethodDO; +import com.zt.plat.module.qms.business.config.dal.mapper.BaseSampleMapper; import com.zt.plat.module.qms.business.config.dal.mapper.ConfigEntrustSourceMapper; import com.zt.plat.module.qms.business.config.dal.mapper.MaterialAssayStandardDetailMapper; import com.zt.plat.module.qms.business.config.dal.mapper.MaterialAssayStandardMapper; @@ -37,6 +41,9 @@ import jakarta.annotation.Resource; @LiteflowComponent(id = "sampleEntrustContextInitCmp", name = "样品委托上下文初始化") public class SampleEntrustContextInitCmp extends NodeComponent { + @Resource + private BaseSampleMapper baseSampleMapper; + @Resource private ConfigEntrustSourceMapper configEntrustSourceMapper; @@ -78,20 +85,40 @@ public class SampleEntrustContextInitCmp extends NodeComponent { //样品提交时是否送样 sampleEntrustContext.setIsSendSample(sampleEntrustParam.getIsSendSample()); + //委托登记明细 + List detailList = sampleEntrustParam.getSampleEntrustDetailList(); + +// List materialAssayStandardDetailIdList = detailList.stream().flatMap(m -> m.getSampleEntrustDetailProjectList().stream()).map(m -> m.getMaterialAssayStandardDetailId()).distinct().collect(Collectors.toList()); + List materialAssayStandardDetailIdList = detailList.stream() + .filter(Objects::nonNull) // 过滤 outer null + .map(m -> m.getSampleEntrustDetailProjectList()) + .filter(Objects::nonNull) // 过滤 inner list null + .flatMap(List::stream) + .filter(Objects::nonNull) // 过滤 inner element null + .map(SampleEntrustDetailProject::getMaterialAssayStandardDetailId) + .filter(Objects::nonNull) // 如果 ID 可能为 null,也过滤 + .distinct() + .collect(Collectors.toList()); + //委托来源配置 List configEntrustSourceList = configEntrustSourceMapper.selectList(); sampleEntrustContext.setConfigEntrustSourceList(configEntrustSourceList); - - //物料检验标准 - List materialAssayStandardList = materialAssayStandardMapper.selectList(); - sampleEntrustContext.setMaterialAssayStandardList(materialAssayStandardList); //物料检验标准项 - List materialAssayStandardDetailList = materialAssayStandardDetailMapper.selectList(); +// List materialAssayStandardDetailList = materialAssayStandardDetailMapper.selectList(); + List materialAssayStandardDetailList = materialAssayStandardDetailMapper.selectByIds(materialAssayStandardDetailIdList); sampleEntrustContext.setMaterialAssayStandardDetailList(materialAssayStandardDetailList); + List materialAssayStandardIdList = materialAssayStandardDetailList.stream().map(m -> m.getMaterialAssayStandardId()).distinct().collect(Collectors.toList()); + + //物料检验标准 +// List materialAssayStandardList = materialAssayStandardMapper.selectList(); + List materialAssayStandardList = materialAssayStandardMapper.selectByIds(materialAssayStandardIdList); + sampleEntrustContext.setMaterialAssayStandardList(materialAssayStandardList); + //物料检验标准方法 - List materialAssayStandardMethodList = materialAssayStandardMethodMapper.selectList(); +// List materialAssayStandardMethodList = materialAssayStandardMethodMapper.selectList(); + List materialAssayStandardMethodList = materialAssayStandardMethodMapper.selectByMaterialAssayStandardDetailIds(materialAssayStandardDetailIdList); sampleEntrustContext.setMaterialAssayStandardMethodList(materialAssayStandardMethodList); //委托登记 @@ -114,14 +141,27 @@ public class SampleEntrustContextInitCmp extends NodeComponent { //赋值委托来源id sampleEntrustContext.setSampleEntrustRegistration(sampleEntrustRegistration); - List detailList = sampleEntrustParam.getSampleEntrustDetailList(); + + //样品大类id列表 + List baseSampleIdList = detailList.stream().map(m -> m.getBaseSampleId()).distinct().collect(Collectors.toList()); + List baseSampleDOList = baseSampleMapper.selectByIds(baseSampleIdList); + sampleEntrustContext.setBaseSampleList(baseSampleDOList); //委托登记样品明细的检测项目明细 - List sampleEntrustProjectList = new ArrayList<>(); + List sampleEntrustProjectList = new ArrayList<>(); + int sort = 1; for (SampleEntrustDetail sampleEntrustDetail : detailList) { if (sampleEntrustDetail.getId() == null) { sampleEntrustDetail.setId(IdWorker.getId()); } + if (sampleEntrustDetail.getSampleTypeDictionaryBusinessId() == null) { + BaseSampleDO baseSampleDO = sampleEntrustContext.getBaseSampleById(sampleEntrustDetail.getBaseSampleId()); + sampleEntrustDetail.setSampleTypeDictionaryBusinessId(baseSampleDO.getDictionaryBusinessId()); + } + if (sampleEntrustDetail.getSort() == null) { + sampleEntrustDetail.setSort(sort); + sort++; + } List projectList = sampleEntrustDetail.getSampleEntrustDetailProjectList(); for (SampleEntrustDetailProject sampleEntrustDetailProject : projectList) { if (sampleEntrustDetailProject.getBusinessSampleEntrustDetailId() == null) { diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustGenSampleDataCmp.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustGenSampleDataCmp.java index 2a9a5723..0a813011 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustGenSampleDataCmp.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustGenSampleDataCmp.java @@ -215,7 +215,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent { BusinessSampleEntrustRegistrationDO sampleEntrustRegistration = sampleEntrustContext.getSampleEntrustRegistration(); //扩展信息 String sampleEntrustRegistrationExtInfo = sampleEntrustRegistration.getExternalInfomation(); - JSONObject sampleEntrustRegistrationJsonObject = null; + JSONObject sampleEntrustRegistrationJsonObject = new JSONObject(); if (StringUtils.isNotBlank(sampleEntrustRegistrationExtInfo)) { sampleEntrustRegistrationJsonObject = JSON.parseObject(sampleEntrustRegistrationExtInfo); } @@ -230,7 +230,8 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent { List baseSampleIdList = sampleEntrustDetailList.stream().map(m -> m.getBaseSampleId()).distinct().collect(Collectors.toList()); //样品大类列表 - List baseSampleList = baseSampleMapper.selectByIds(baseSampleIdList); +// List baseSampleList = baseSampleMapper.selectByIds(baseSampleIdList); + List baseSampleList = sampleEntrustContext.getBaseSampleList(); //主样配置 List configBaseSampleList = configBaseSampleMapper.selectByBaseSampleIds(baseSampleIdList); diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/slot/SampleEntrustContext.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/slot/SampleEntrustContext.java index da551e34..09c56a20 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/slot/SampleEntrustContext.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/liteflow/slot/SampleEntrustContext.java @@ -11,6 +11,7 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustD import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustProjectDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; import com.zt.plat.module.qms.business.bus.liteflow.param.SampleFlowInfo; +import com.zt.plat.module.qms.business.config.dal.dataobject.BaseSampleDO; import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigEntrustSourceDO; import com.zt.plat.module.qms.business.config.dal.dataobject.MaterialAssayStandardDO; import com.zt.plat.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO; @@ -40,6 +41,17 @@ public class SampleEntrustContext { /** 中心是否送样 **/ private Integer isSendSample = 0; + /** 样品大类 **/ + List baseSampleList; + + public BaseSampleDO getBaseSampleById(Long id) { + BaseSampleDO baseSampleDO = null; + if (CollUtil.isNotEmpty(this.baseSampleList)) { + baseSampleDO = this.baseSampleList.stream().filter(f -> id.equals(f.getId())).findFirst().orElse(null); + } + return baseSampleDO; + } + /** 委托来源配置列表 **/ private List configEntrustSourceList; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/BusinessSampleEntrustUnStandardProjectService.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/BusinessSampleEntrustUnStandardProjectService.java new file mode 100644 index 00000000..979a0be2 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/BusinessSampleEntrustUnStandardProjectService.java @@ -0,0 +1,62 @@ +package com.zt.plat.module.qms.business.bus.service; + +import java.util.*; +import jakarta.validation.*; +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.module.qms.business.bus.controller.vo.*; +import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustUnStandardProjectDO; +import com.zt.plat.framework.common.pojo.PageParam; + +/** + * 委检登记样品检测项目表(无标准) Service 接口 + * + * @author 后台管理 + */ +public interface BusinessSampleEntrustUnStandardProjectService { + + /** + * 创建委检登记样品检测项目表(无标准) + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessSampleEntrustUnStandardProjectRespVO createBusinessSampleEntrustUnStandardProject(@Valid BusinessSampleEntrustUnStandardProjectSaveReqVO createReqVO); + + /** + * 更新委检登记样品检测项目表(无标准) + * + * @param updateReqVO 更新信息 + */ + void updateBusinessSampleEntrustUnStandardProject(@Valid BusinessSampleEntrustUnStandardProjectSaveReqVO updateReqVO); + + /** + * 删除委检登记样品检测项目表(无标准) + * + * @param id 编号 + */ + void deleteBusinessSampleEntrustUnStandardProject(Long id); + + /** + * 批量删除委检登记样品检测项目表(无标准) + * + * @param ids 编号 + */ + void deleteBusinessSampleEntrustUnStandardProjectListByIds(List ids); + + /** + * 获得委检登记样品检测项目表(无标准) + * + * @param id 编号 + * @return 委检登记样品检测项目表(无标准) + */ + BusinessSampleEntrustUnStandardProjectDO getBusinessSampleEntrustUnStandardProject(Long id); + + /** + * 获得委检登记样品检测项目表(无标准)分页 + * + * @param pageReqVO 分页查询 + * @return 委检登记样品检测项目表(无标准)分页 + */ + PageResult getBusinessSampleEntrustUnStandardProjectPage(BusinessSampleEntrustUnStandardProjectPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/BusinessSampleEntrustUnStandardProjectServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/BusinessSampleEntrustUnStandardProjectServiceImpl.java new file mode 100644 index 00000000..f4550540 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/BusinessSampleEntrustUnStandardProjectServiceImpl.java @@ -0,0 +1,91 @@ +package com.zt.plat.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 com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.common.pojo.PageParam; +import com.zt.plat.framework.common.util.object.BeanUtils; +import com.zt.plat.module.qms.business.bus.controller.vo.*; +import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustUnStandardProjectDO; +import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleEntrustUnStandardProjectMapper; + +import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception; +import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList; +import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList; +import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*; + +/** + * 委检登记样品检测项目表(无标准) Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class BusinessSampleEntrustUnStandardProjectServiceImpl implements BusinessSampleEntrustUnStandardProjectService { + + @Resource + private BusinessSampleEntrustUnStandardProjectMapper businessSampleEntrustUnStandardProjectMapper; + + @Override + public BusinessSampleEntrustUnStandardProjectRespVO createBusinessSampleEntrustUnStandardProject(BusinessSampleEntrustUnStandardProjectSaveReqVO createReqVO) { + // 插入 + BusinessSampleEntrustUnStandardProjectDO businessSampleEntrustUnStandardProject = BeanUtils.toBean(createReqVO, BusinessSampleEntrustUnStandardProjectDO.class); + businessSampleEntrustUnStandardProjectMapper.insert(businessSampleEntrustUnStandardProject); + // 返回 + return BeanUtils.toBean(businessSampleEntrustUnStandardProject, BusinessSampleEntrustUnStandardProjectRespVO.class); + } + + @Override + public void updateBusinessSampleEntrustUnStandardProject(BusinessSampleEntrustUnStandardProjectSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessSampleEntrustUnStandardProjectExists(updateReqVO.getId()); + // 更新 + BusinessSampleEntrustUnStandardProjectDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSampleEntrustUnStandardProjectDO.class); + businessSampleEntrustUnStandardProjectMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessSampleEntrustUnStandardProject(Long id) { + // 校验存在 + validateBusinessSampleEntrustUnStandardProjectExists(id); + // 删除 + businessSampleEntrustUnStandardProjectMapper.deleteById(id); + } + + @Override + public void deleteBusinessSampleEntrustUnStandardProjectListByIds(List ids) { + // 校验存在 + validateBusinessSampleEntrustUnStandardProjectExists(ids); + // 删除 + businessSampleEntrustUnStandardProjectMapper.deleteByIds(ids); + } + + private void validateBusinessSampleEntrustUnStandardProjectExists(List ids) { + List list = businessSampleEntrustUnStandardProjectMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_SAMPLE_ENTRUST_UN_STANDARD_PROJECT_NOT_EXISTS); + } + } + + private void validateBusinessSampleEntrustUnStandardProjectExists(Long id) { + if (businessSampleEntrustUnStandardProjectMapper.selectById(id) == null) { + throw exception(BUSINESS_SAMPLE_ENTRUST_UN_STANDARD_PROJECT_NOT_EXISTS); + } + } + + @Override + public BusinessSampleEntrustUnStandardProjectDO getBusinessSampleEntrustUnStandardProject(Long id) { + return businessSampleEntrustUnStandardProjectMapper.selectById(id); + } + + @Override + public PageResult getBusinessSampleEntrustUnStandardProjectPage(BusinessSampleEntrustUnStandardProjectPageReqVO pageReqVO) { + return businessSampleEntrustUnStandardProjectMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/SampleEntrustServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/SampleEntrustServiceImpl.java index d88c0581..a042a9c7 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/SampleEntrustServiceImpl.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/service/SampleEntrustServiceImpl.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -107,7 +108,10 @@ public class SampleEntrustServiceImpl implements SampleEntrustService { JSONObject result = new JSONObject(); BusinessSampleEntrustRegistrationDO businessSampleEntrustRegistrationDO = businessSampleEntrustRegistrationMapper.selectById(id); String externalInfomation = businessSampleEntrustRegistrationDO.getExternalInfomation(); - JSONObject extInfJsonObject = JSON.parseObject(externalInfomation); + JSONObject extInfJsonObject = new JSONObject(); + if (StringUtils.isNotBlank(externalInfomation)) { + extInfJsonObject = JSON.parseObject(externalInfomation); + } String jsonString = JSON.toJSONString(businessSampleEntrustRegistrationDO, context); JSONObject sampleEntrustRegistration = JSON.parseObject(jsonString); diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/BaseSamplePageReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/BaseSamplePageReqVO.java index c47e27ba..ed634181 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/BaseSamplePageReqVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/BaseSamplePageReqVO.java @@ -45,6 +45,9 @@ public class BaseSamplePageReqVO extends PageParam { @Schema(description = "检验委托来源配置ID", example = "321") private Long configEntrustSourceId; + @Schema(description = "检验委托来源配置Key", example = "321") + private String configEntrustSourceKey; + @Schema(description = "委托类型,委托登记-entrust_registration、检验委托-entrust_inspection", example = "1") private String entrustType; } \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourcePageReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourcePageReqVO.java index 638b78f4..c69323b8 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourcePageReqVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourcePageReqVO.java @@ -40,6 +40,12 @@ public class ConfigEntrustSourcePageReqVO extends PageParam { @Schema(description = "表单设计器模板key") private String dataTemplateKey; + @Schema(description = "委托方式,manual-手动创建、interface-接口创建、both-两者都") + private String entrustWay; + + @Schema(description = "委托提交方式,automatic-自动提交,manual-手动提交") + private String entrustSubmitWay; + @Schema(description = "扩展配置") private String externalConfig; @@ -53,5 +59,8 @@ public class ConfigEntrustSourcePageReqVO extends PageParam { @Schema(description = "备注") private String remark; + //================扩展========================== + private List entrustWayList; + } \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourceReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourceReqVO.java index c467ebe7..120dd1dc 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourceReqVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourceReqVO.java @@ -3,6 +3,7 @@ package com.zt.plat.module.qms.business.config.controller.vo; import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; import java.time.LocalDateTime; +import java.util.List; import org.springframework.format.annotation.DateTimeFormat; @@ -40,6 +41,12 @@ public class ConfigEntrustSourceReqVO { @Schema(description = "表单设计器模板key") private String dataTemplateKey; + @Schema(description = "委托方式,manual-手动创建、interface-接口创建、both-两者都") + private String entrustWay; + + @Schema(description = "委托提交方式,automatic-自动提交,manual-手动提交") + private String entrustSubmitWay; + @Schema(description = "扩展配置") private String externalConfig; @@ -53,4 +60,6 @@ public class ConfigEntrustSourceReqVO { @Schema(description = "备注") private String remark; + //================扩展========================== + private List entrustWayList; } diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourceRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourceRespVO.java index d26ac3cc..c13f1a1a 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourceRespVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourceRespVO.java @@ -52,6 +52,12 @@ public class ConfigEntrustSourceRespVO { @ExcelProperty("表单设计器模板key") private String dataTemplateKey; + @Schema(description = "委托方式,manual-手动创建、interface-接口创建、both-两者都") + private String entrustWay; + + @Schema(description = "委托提交方式,automatic-自动提交,manual-手动提交") + private String entrustSubmitWay; + @Schema(description = "扩展配置") @ExcelProperty("扩展配置") private String externalConfig; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourceSaveReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourceSaveReqVO.java index f6fc5288..29270fcf 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourceSaveReqVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/ConfigEntrustSourceSaveReqVO.java @@ -42,6 +42,12 @@ public class ConfigEntrustSourceSaveReqVO { @Schema(description = "表单设计器模板key") private String dataTemplateKey; + @Schema(description = "委托方式,manual-手动创建、interface-接口创建、both-两者都") + private String entrustWay; + + @Schema(description = "委托提交方式,automatic-自动提交,manual-手动提交") + private String entrustSubmitWay; + @Schema(description = "扩展配置") private String externalConfig; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/MaterialAssayStandardDetailRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/MaterialAssayStandardDetailRespVO.java index 7cdbb531..0435d857 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/MaterialAssayStandardDetailRespVO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/controller/vo/MaterialAssayStandardDetailRespVO.java @@ -65,6 +65,13 @@ public class MaterialAssayStandardDetailRespVO { private String remark; //==================================扩展字段==================================== + + @Schema(description = "样品大类ID", example = "1394") + private Long baseSampleId; + + @Schema(description = "大类名称") + private String sampleName; + @Schema(description = "检测项名称") private String dictionaryProjectName; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/dataobject/ConfigEntrustSourceDO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/dataobject/ConfigEntrustSourceDO.java index 3c63f5d9..0cd531b9 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/dataobject/ConfigEntrustSourceDO.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/dataobject/ConfigEntrustSourceDO.java @@ -77,6 +77,16 @@ public class ConfigEntrustSourceDO extends BusinessBaseDO { @TableField("DAT_TMPL_KY") private String dataTemplateKey; /** + * 委托方式,manual-手动创建、interface-接口创建、both-两者都 + */ + @TableField("ENTT_WY") + private String entrustWay; + /** + * 委托提交方式,automatic-自动提交,manual-手动提交 + */ + @TableField("ENTT_SBM_WY") + private String entrustSubmitWay; + /** * 扩展配置 */ @TableField("EXT_CFG") diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/mapper/BaseSampleMapper.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/mapper/BaseSampleMapper.java index c7285248..fc63e34f 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/mapper/BaseSampleMapper.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/mapper/BaseSampleMapper.java @@ -50,7 +50,10 @@ public interface BaseSampleMapper extends BaseMapperX { .eqIfPresent(BaseSampleDO::getRemark, reqVO.getRemark()); if (ObjectUtil.isNotEmpty(reqVO.getConfigEntrustSourceId())) { queryWrapperX.inSql(BaseSampleDO::getDictionaryBusinessId, "SELECT tcesst.DIC_BSN_ID FROM T_CFG_ENTT_SRC_SMP_TP tcesst WHERE tcesst.DELETED = 0 AND tcesst.CFG_ENTT_SRC_ID = " + reqVO.getConfigEntrustSourceId()); + } else if (ObjectUtil.isNotEmpty(reqVO.getConfigEntrustSourceKey())) { + queryWrapperX.inSql(BaseSampleDO::getDictionaryBusinessId, "SELECT tcesst.DIC_BSN_ID FROM T_CFG_ENTT_SRC_SMP_TP tcesst LEFT JOIN T_CFG_ENTT_SRC tces ON tcesst.CFG_ENTT_SRC_ID = tces.ID WHERE tcesst.DELETED = 0 AND tces.DELETED = 0 AND tces.KY = '" + reqVO.getConfigEntrustSourceKey() + "'"); } + if (QmsCommonConstant.ENTRUST_INSPECTION.equals(reqVO.getEntrustType())) { queryWrapperX.inSql(BaseSampleDO::getDictionaryBusinessId, "SELECT tcesst.DIC_BSN_ID FROM T_CFG_ENTT_SRC_SMP_TP tcesst LEFT JOIN T_CFG_ENTT_SRC tces ON tcesst.CFG_ENTT_SRC_ID = tces.ID WHERE tcesst.DELETED = 0 AND tces.DELETED = 0 AND tces.ENTT_TP = '" + reqVO.getEntrustType() + "'"); } diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.java index 73af692f..66e0002e 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.java @@ -28,6 +28,9 @@ public interface ConfigEntrustSourceMapper extends BaseMapperX selectListWithExtend(@Param("param") MaterialAssayStandardDetailPageReqVO reqVO); + default List selectByBaseSampleIds(List baseSampleIdList) { + return selectJoinList(MaterialAssayStandardDetailRespVO.class, new MPJLambdaWrapperX() + .leftJoin(MaterialAssayStandardDO.class, MaterialAssayStandardDO::getId, MaterialAssayStandardDetailDO::getMaterialAssayStandardId) + .leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, MaterialAssayStandardDetailDO::getDictionaryProjectId) + .selectAll(MaterialAssayStandardDetailDO.class) + .selectAs(MaterialAssayStandardDO::getBaseSampleId, MaterialAssayStandardDetailRespVO::getBaseSampleId) + .selectAs(DictionaryProjectDO::getName, MaterialAssayStandardDetailRespVO::getDictionaryProjectName) + .selectAs(DictionaryProjectDO::getSimpleName, MaterialAssayStandardDetailRespVO::getDictionaryProjectSimpleName) + .selectAs(DictionaryProjectDO::getShowName, MaterialAssayStandardDetailRespVO::getDictionaryProjectShowName) + .selectAs(DictionaryProjectDO::getCode, MaterialAssayStandardDetailRespVO::getDictionaryProjectCode) + .in(MaterialAssayStandardDO::getBaseSampleId, baseSampleIdList) + ); + } } \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.java index eaaf2371..db610189 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.java @@ -39,6 +39,11 @@ public interface MaterialAssayStandardMethodMapper extends BaseMapperX selectByMaterialAssayStandardDetailIds(List materialAssayStandardDetailIdList) { + return selectList(new LambdaQueryWrapperX() + .in(MaterialAssayStandardMethodDO::getMaterialAssayStandardDetailId, materialAssayStandardDetailIdList)); + } + /** * 根据样品大类id和检测项目id获取对应的默认检测方法 * @param baseSampleId 样品大类id diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherBaseSampleController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherBaseSampleController.java new file mode 100644 index 00000000..45e90aa3 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherBaseSampleController.java @@ -0,0 +1,110 @@ +package com.zt.plat.module.qms.business.other.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 com.zt.plat.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 com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO; +import com.zt.plat.framework.common.pojo.PageParam; +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.common.pojo.CommonResult; +import com.zt.plat.framework.common.util.object.BeanUtils; +import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore; + +import static com.zt.plat.framework.common.pojo.CommonResult.success; + +import com.zt.plat.framework.excel.core.util.ExcelUtils; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherBaseSampleDO; +import com.zt.plat.module.qms.business.other.service.OtherBaseSampleService; +import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog; +import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*; + + +@Tag(name = "管理后台 - 第三方系统样品大类对应") +@RestController +@RequestMapping("/qms/other-base-sample") +@Validated +@DeptDataPermissionIgnore(enable = "true") +public class OtherBaseSampleController implements BusinessControllerMarker { + + + @Resource + private OtherBaseSampleService otherBaseSampleService; + + @PostMapping("/create") + @Operation(summary = "创建第三方系统样品大类对应") + //@PreAuthorize("@ss.hasPermission('qms:other-base-sample:create')") + public CommonResult createOtherBaseSample(@Valid @RequestBody OtherBaseSampleSaveReqVO createReqVO) { + return success(otherBaseSampleService.createOtherBaseSample(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新第三方系统样品大类对应") + //@PreAuthorize("@ss.hasPermission('qms:other-base-sample:update')") + public CommonResult updateOtherBaseSample(@Valid @RequestBody OtherBaseSampleSaveReqVO updateReqVO) { + otherBaseSampleService.updateOtherBaseSample(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除第三方系统样品大类对应") + @Parameter(name = "id", description = "编号", required = true) + //@PreAuthorize("@ss.hasPermission('qms:other-base-sample:delete')") + public CommonResult deleteOtherBaseSample(@RequestParam("id") Long id) { + otherBaseSampleService.deleteOtherBaseSample(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除第三方系统样品大类对应") + //@PreAuthorize("@ss.hasPermission('qms:other-base-sample:delete')") + public CommonResult deleteOtherBaseSampleList(@RequestBody BatchDeleteReqVO req) { + otherBaseSampleService.deleteOtherBaseSampleListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得第三方系统样品大类对应") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + //@PreAuthorize("@ss.hasPermission('qms:other-base-sample:query')") + public CommonResult getOtherBaseSample(@RequestParam("id") Long id) { + OtherBaseSampleDO otherBaseSample = otherBaseSampleService.getOtherBaseSample(id); + return success(BeanUtils.toBean(otherBaseSample, OtherBaseSampleRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得第三方系统样品大类对应分页") + //@PreAuthorize("@ss.hasPermission('qms:other-base-sample:query')") + public CommonResult> getOtherBaseSamplePage(@Valid OtherBaseSamplePageReqVO pageReqVO) { + PageResult pageResult = otherBaseSampleService.getOtherBaseSamplePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, OtherBaseSampleRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出第三方系统样品大类对应 Excel") + //@PreAuthorize("@ss.hasPermission('qms:other-base-sample:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportOtherBaseSampleExcel(@Valid OtherBaseSamplePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = otherBaseSampleService.getOtherBaseSamplePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "第三方系统样品大类对应.xls", "数据", OtherBaseSampleRespVO.class, + BeanUtils.toBean(list, OtherBaseSampleRespVO.class)); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherDictionaryBusinessController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherDictionaryBusinessController.java new file mode 100644 index 00000000..869e6660 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherDictionaryBusinessController.java @@ -0,0 +1,109 @@ +package com.zt.plat.module.qms.business.other.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 com.zt.plat.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 com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO; +import com.zt.plat.framework.common.pojo.PageParam; +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.common.pojo.CommonResult; +import com.zt.plat.framework.common.util.object.BeanUtils; +import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore; + +import static com.zt.plat.framework.common.pojo.CommonResult.success; + +import com.zt.plat.framework.excel.core.util.ExcelUtils; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherDictionaryBusinessDO; +import com.zt.plat.module.qms.business.other.service.OtherDictionaryBusinessService; +import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog; +import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "管理后台 - 第三方系统与业务字典对应") +@RestController +@RequestMapping("/qms/other-dictionary-business") +@Validated +@DeptDataPermissionIgnore(enable = "true") +public class OtherDictionaryBusinessController implements BusinessControllerMarker { + + + @Resource + private OtherDictionaryBusinessService otherDictionaryBusinessService; + + @PostMapping("/create") + @Operation(summary = "创建第三方系统与业务字典对应") + //@PreAuthorize("@ss.hasPermission('qms:other-dictionary-business:create')") + public CommonResult createOtherDictionaryBusiness(@Valid @RequestBody OtherDictionaryBusinessSaveReqVO createReqVO) { + return success(otherDictionaryBusinessService.createOtherDictionaryBusiness(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新第三方系统与业务字典对应") + //@PreAuthorize("@ss.hasPermission('qms:other-dictionary-business:update')") + public CommonResult updateOtherDictionaryBusiness(@Valid @RequestBody OtherDictionaryBusinessSaveReqVO updateReqVO) { + otherDictionaryBusinessService.updateOtherDictionaryBusiness(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除第三方系统与业务字典对应") + @Parameter(name = "id", description = "编号", required = true) + //@PreAuthorize("@ss.hasPermission('qms:other-dictionary-business:delete')") + public CommonResult deleteOtherDictionaryBusiness(@RequestParam("id") Long id) { + otherDictionaryBusinessService.deleteOtherDictionaryBusiness(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除第三方系统与业务字典对应") + //@PreAuthorize("@ss.hasPermission('qms:other-dictionary-business:delete')") + public CommonResult deleteOtherDictionaryBusinessList(@RequestBody BatchDeleteReqVO req) { + otherDictionaryBusinessService.deleteOtherDictionaryBusinessListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得第三方系统与业务字典对应") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + //@PreAuthorize("@ss.hasPermission('qms:other-dictionary-business:query')") + public CommonResult getOtherDictionaryBusiness(@RequestParam("id") Long id) { + OtherDictionaryBusinessDO otherDictionaryBusiness = otherDictionaryBusinessService.getOtherDictionaryBusiness(id); + return success(BeanUtils.toBean(otherDictionaryBusiness, OtherDictionaryBusinessRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得第三方系统与业务字典对应分页") + //@PreAuthorize("@ss.hasPermission('qms:other-dictionary-business:query')") + public CommonResult> getOtherDictionaryBusinessPage(@Valid OtherDictionaryBusinessPageReqVO pageReqVO) { + PageResult pageResult = otherDictionaryBusinessService.getOtherDictionaryBusinessPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, OtherDictionaryBusinessRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出第三方系统与业务字典对应 Excel") + //@PreAuthorize("@ss.hasPermission('qms:other-dictionary-business:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportOtherDictionaryBusinessExcel(@Valid OtherDictionaryBusinessPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = otherDictionaryBusinessService.getOtherDictionaryBusinessPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "第三方系统与业务字典对应.xls", "数据", OtherDictionaryBusinessRespVO.class, + BeanUtils.toBean(list, OtherDictionaryBusinessRespVO.class)); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherDictionaryProjectController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherDictionaryProjectController.java new file mode 100644 index 00000000..fdc665b5 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherDictionaryProjectController.java @@ -0,0 +1,109 @@ +package com.zt.plat.module.qms.business.other.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 com.zt.plat.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 com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO; +import com.zt.plat.framework.common.pojo.PageParam; +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.common.pojo.CommonResult; +import com.zt.plat.framework.common.util.object.BeanUtils; +import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore; + +import static com.zt.plat.framework.common.pojo.CommonResult.success; + +import com.zt.plat.framework.excel.core.util.ExcelUtils; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherDictionaryProjectDO; +import com.zt.plat.module.qms.business.other.service.OtherDictionaryProjectService; +import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog; +import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "管理后台 - 第三方系统检测项目字典对应") +@RestController +@RequestMapping("/qms/other-dictionary-project") +@Validated +@DeptDataPermissionIgnore(enable = "true") +public class OtherDictionaryProjectController implements BusinessControllerMarker { + + + @Resource + private OtherDictionaryProjectService otherDictionaryProjectService; + + @PostMapping("/create") + @Operation(summary = "创建第三方系统检测项目字典对应") + //@PreAuthorize("@ss.hasPermission('qms:other-dictionary-project:create')") + public CommonResult createOtherDictionaryProject(@Valid @RequestBody OtherDictionaryProjectSaveReqVO createReqVO) { + return success(otherDictionaryProjectService.createOtherDictionaryProject(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新第三方系统检测项目字典对应") + //@PreAuthorize("@ss.hasPermission('qms:other-dictionary-project:update')") + public CommonResult updateOtherDictionaryProject(@Valid @RequestBody OtherDictionaryProjectSaveReqVO updateReqVO) { + otherDictionaryProjectService.updateOtherDictionaryProject(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除第三方系统检测项目字典对应") + @Parameter(name = "id", description = "编号", required = true) + //@PreAuthorize("@ss.hasPermission('qms:other-dictionary-project:delete')") + public CommonResult deleteOtherDictionaryProject(@RequestParam("id") Long id) { + otherDictionaryProjectService.deleteOtherDictionaryProject(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除第三方系统检测项目字典对应") + //@PreAuthorize("@ss.hasPermission('qms:other-dictionary-project:delete')") + public CommonResult deleteOtherDictionaryProjectList(@RequestBody BatchDeleteReqVO req) { + otherDictionaryProjectService.deleteOtherDictionaryProjectListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得第三方系统检测项目字典对应") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + //@PreAuthorize("@ss.hasPermission('qms:other-dictionary-project:query')") + public CommonResult getOtherDictionaryProject(@RequestParam("id") Long id) { + OtherDictionaryProjectDO otherDictionaryProject = otherDictionaryProjectService.getOtherDictionaryProject(id); + return success(BeanUtils.toBean(otherDictionaryProject, OtherDictionaryProjectRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得第三方系统检测项目字典对应分页") + //@PreAuthorize("@ss.hasPermission('qms:other-dictionary-project:query')") + public CommonResult> getOtherDictionaryProjectPage(@Valid OtherDictionaryProjectPageReqVO pageReqVO) { + PageResult pageResult = otherDictionaryProjectService.getOtherDictionaryProjectPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, OtherDictionaryProjectRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出第三方系统检测项目字典对应 Excel") + //@PreAuthorize("@ss.hasPermission('qms:other-dictionary-project:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportOtherDictionaryProjectExcel(@Valid OtherDictionaryProjectPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = otherDictionaryProjectService.getOtherDictionaryProjectPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "第三方系统检测项目字典对应.xls", "数据", OtherDictionaryProjectRespVO.class, + BeanUtils.toBean(list, OtherDictionaryProjectRespVO.class)); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherSystemConfigController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherSystemConfigController.java new file mode 100644 index 00000000..714553fa --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherSystemConfigController.java @@ -0,0 +1,109 @@ +package com.zt.plat.module.qms.business.other.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 com.zt.plat.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 com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO; +import com.zt.plat.framework.common.pojo.PageParam; +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.common.pojo.CommonResult; +import com.zt.plat.framework.common.util.object.BeanUtils; +import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore; + +import static com.zt.plat.framework.common.pojo.CommonResult.success; + +import com.zt.plat.framework.excel.core.util.ExcelUtils; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherSystemConfigDO; +import com.zt.plat.module.qms.business.other.service.OtherSystemConfigService; +import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog; +import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "管理后台 - 第三方系统配置") +@RestController +@RequestMapping("/qms/other-system-config") +@Validated +@DeptDataPermissionIgnore(enable = "true") +public class OtherSystemConfigController implements BusinessControllerMarker { + + + @Resource + private OtherSystemConfigService otherSystemConfigService; + + @PostMapping("/create") + @Operation(summary = "创建第三方系统配置") + //@PreAuthorize("@ss.hasPermission('qms:other-system-config:create')") + public CommonResult createOtherSystemConfig(@Valid @RequestBody OtherSystemConfigSaveReqVO createReqVO) { + return success(otherSystemConfigService.createOtherSystemConfig(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新第三方系统配置") + //@PreAuthorize("@ss.hasPermission('qms:other-system-config:update')") + public CommonResult updateOtherSystemConfig(@Valid @RequestBody OtherSystemConfigSaveReqVO updateReqVO) { + otherSystemConfigService.updateOtherSystemConfig(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除第三方系统配置") + @Parameter(name = "id", description = "编号", required = true) + //@PreAuthorize("@ss.hasPermission('qms:other-system-config:delete')") + public CommonResult deleteOtherSystemConfig(@RequestParam("id") Long id) { + otherSystemConfigService.deleteOtherSystemConfig(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除第三方系统配置") + //@PreAuthorize("@ss.hasPermission('qms:other-system-config:delete')") + public CommonResult deleteOtherSystemConfigList(@RequestBody BatchDeleteReqVO req) { + otherSystemConfigService.deleteOtherSystemConfigListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得第三方系统配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + //@PreAuthorize("@ss.hasPermission('qms:other-system-config:query')") + public CommonResult getOtherSystemConfig(@RequestParam("id") Long id) { + OtherSystemConfigDO otherSystemConfig = otherSystemConfigService.getOtherSystemConfig(id); + return success(BeanUtils.toBean(otherSystemConfig, OtherSystemConfigRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得第三方系统配置分页") + //@PreAuthorize("@ss.hasPermission('qms:other-system-config:query')") + public CommonResult> getOtherSystemConfigPage(@Valid OtherSystemConfigPageReqVO pageReqVO) { + PageResult pageResult = otherSystemConfigService.getOtherSystemConfigPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, OtherSystemConfigRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出第三方系统配置 Excel") + //@PreAuthorize("@ss.hasPermission('qms:other-system-config:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportOtherSystemConfigExcel(@Valid OtherSystemConfigPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = otherSystemConfigService.getOtherSystemConfigPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "第三方系统配置.xls", "数据", OtherSystemConfigRespVO.class, + BeanUtils.toBean(list, OtherSystemConfigRespVO.class)); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherSystemUserController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherSystemUserController.java new file mode 100644 index 00000000..63e7a537 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/admin/OtherSystemUserController.java @@ -0,0 +1,109 @@ +package com.zt.plat.module.qms.business.other.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 com.zt.plat.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 com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO; +import com.zt.plat.framework.common.pojo.PageParam; +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.common.pojo.CommonResult; +import com.zt.plat.framework.common.util.object.BeanUtils; +import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore; + +import static com.zt.plat.framework.common.pojo.CommonResult.success; + +import com.zt.plat.framework.excel.core.util.ExcelUtils; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherSystemUserDO; +import com.zt.plat.module.qms.business.other.service.OtherSystemUserService; +import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog; +import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "管理后台 - 第三方系统用户信息对应") +@RestController +@RequestMapping("/qms/other-system-user") +@Validated +@DeptDataPermissionIgnore(enable = "true") +public class OtherSystemUserController implements BusinessControllerMarker { + + + @Resource + private OtherSystemUserService otherSystemUserService; + + @PostMapping("/create") + @Operation(summary = "创建第三方系统用户信息对应") + //@PreAuthorize("@ss.hasPermission('qms:other-system-user:create')") + public CommonResult createOtherSystemUser(@Valid @RequestBody OtherSystemUserSaveReqVO createReqVO) { + return success(otherSystemUserService.createOtherSystemUser(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新第三方系统用户信息对应") + //@PreAuthorize("@ss.hasPermission('qms:other-system-user:update')") + public CommonResult updateOtherSystemUser(@Valid @RequestBody OtherSystemUserSaveReqVO updateReqVO) { + otherSystemUserService.updateOtherSystemUser(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除第三方系统用户信息对应") + @Parameter(name = "id", description = "编号", required = true) + //@PreAuthorize("@ss.hasPermission('qms:other-system-user:delete')") + public CommonResult deleteOtherSystemUser(@RequestParam("id") Long id) { + otherSystemUserService.deleteOtherSystemUser(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除第三方系统用户信息对应") + //@PreAuthorize("@ss.hasPermission('qms:other-system-user:delete')") + public CommonResult deleteOtherSystemUserList(@RequestBody BatchDeleteReqVO req) { + otherSystemUserService.deleteOtherSystemUserListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得第三方系统用户信息对应") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + //@PreAuthorize("@ss.hasPermission('qms:other-system-user:query')") + public CommonResult getOtherSystemUser(@RequestParam("id") Long id) { + OtherSystemUserDO otherSystemUser = otherSystemUserService.getOtherSystemUser(id); + return success(BeanUtils.toBean(otherSystemUser, OtherSystemUserRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得第三方系统用户信息对应分页") + //@PreAuthorize("@ss.hasPermission('qms:other-system-user:query')") + public CommonResult> getOtherSystemUserPage(@Valid OtherSystemUserPageReqVO pageReqVO) { + PageResult pageResult = otherSystemUserService.getOtherSystemUserPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, OtherSystemUserRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出第三方系统用户信息对应 Excel") + //@PreAuthorize("@ss.hasPermission('qms:other-system-user:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportOtherSystemUserExcel(@Valid OtherSystemUserPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = otherSystemUserService.getOtherSystemUserPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "第三方系统用户信息对应.xls", "数据", OtherSystemUserRespVO.class, + BeanUtils.toBean(list, OtherSystemUserRespVO.class)); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherBaseSamplePageReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherBaseSamplePageReqVO.java new file mode 100644 index 00000000..32003799 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherBaseSamplePageReqVO.java @@ -0,0 +1,53 @@ +package com.zt.plat.module.qms.business.other.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import com.zt.plat.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 第三方系统样品大类对应分页 Request VO") +@Data +public class OtherBaseSamplePageReqVO extends PageParam { + + @Schema(description = "第三方系统") + private String otherSystem; + + @Schema(description = "样品大类ID", example = "5690") + private Long baseSampleId; + + @Schema(description = "第三方系统中对应的ID", example = "3002") + private String otherId; + + @Schema(description = "第三方系统中对应的类型", example = "2") + private String otherType; + + @Schema(description = "第三方系统中对应的名称", example = "张三") + private String otherName; + + @Schema(description = "第三方系统中对应的简称", example = "李四") + private String otherSimpleName; + + @Schema(description = "第三方系统中对应的编码") + private String otherCode; + + @Schema(description = "第三方系统中对应的简码") + private String otherSimpleCode; + + @Schema(description = "第三方系统中对应的描述") + private String otherDescription; + + @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/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherBaseSampleRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherBaseSampleRespVO.java new file mode 100644 index 00000000..6d54ee33 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherBaseSampleRespVO.java @@ -0,0 +1,67 @@ +package com.zt.plat.module.qms.business.other.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 OtherBaseSampleRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17660") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "第三方系统") + @ExcelProperty("第三方系统") + private String otherSystem; + + @Schema(description = "样品大类ID", example = "5690") + @ExcelProperty("样品大类ID") + private Long baseSampleId; + + @Schema(description = "第三方系统中对应的ID", example = "3002") + @ExcelProperty("第三方系统中对应的ID") + private String otherId; + + @Schema(description = "第三方系统中对应的类型", example = "2") + @ExcelProperty("第三方系统中对应的类型") + private String otherType; + + @Schema(description = "第三方系统中对应的名称", example = "张三") + @ExcelProperty("第三方系统中对应的名称") + private String otherName; + + @Schema(description = "第三方系统中对应的简称", example = "李四") + @ExcelProperty("第三方系统中对应的简称") + private String otherSimpleName; + + @Schema(description = "第三方系统中对应的编码") + @ExcelProperty("第三方系统中对应的编码") + private String otherCode; + + @Schema(description = "第三方系统中对应的简码") + @ExcelProperty("第三方系统中对应的简码") + private String otherSimpleCode; + + @Schema(description = "第三方系统中对应的描述") + @ExcelProperty("第三方系统中对应的描述") + private String otherDescription; + + @Schema(description = "所属部门") + @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/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherBaseSampleSaveReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherBaseSampleSaveReqVO.java new file mode 100644 index 00000000..61681e79 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherBaseSampleSaveReqVO.java @@ -0,0 +1,48 @@ +package com.zt.plat.module.qms.business.other.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 OtherBaseSampleSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17660") + private Long id; + + @Schema(description = "第三方系统") + private String otherSystem; + + @Schema(description = "样品大类ID", example = "5690") + private Long baseSampleId; + + @Schema(description = "第三方系统中对应的ID", example = "3002") + private String otherId; + + @Schema(description = "第三方系统中对应的类型", example = "2") + private String otherType; + + @Schema(description = "第三方系统中对应的名称", example = "张三") + private String otherName; + + @Schema(description = "第三方系统中对应的简称", example = "李四") + private String otherSimpleName; + + @Schema(description = "第三方系统中对应的编码") + private String otherCode; + + @Schema(description = "第三方系统中对应的简码") + private String otherSimpleCode; + + @Schema(description = "第三方系统中对应的描述") + private String otherDescription; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryBusinessPageReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryBusinessPageReqVO.java new file mode 100644 index 00000000..3025f5b2 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryBusinessPageReqVO.java @@ -0,0 +1,53 @@ +package com.zt.plat.module.qms.business.other.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import com.zt.plat.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 第三方系统与业务字典对应分页 Request VO") +@Data +public class OtherDictionaryBusinessPageReqVO extends PageParam { + + @Schema(description = "第三方系统") + private String otherSystem; + + @Schema(description = "业务字典ID,字典表【T_DIC_BSN】", example = "4167") + private Long dictionaryBusinessId; + + @Schema(description = "业务字典Key,字典表【T_DIC_BSN】") + private String dictionaryBusinessKey; + + @Schema(description = "第三方系统中对应的ID", example = "1766") + private String otherId; + + @Schema(description = "第三方系统中对应的key") + private String otherKey; + + @Schema(description = "第三方系统中对应的value") + private String otherValue; + + @Schema(description = "第三方系统中对应的名称", example = "李四") + private String otherName; + + @Schema(description = "第三方系统中对应的其他信息") + private String otherInfomation; + + @Schema(description = "第三方系统中对应排序") + private Integer otherSort; + + @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/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryBusinessRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryBusinessRespVO.java new file mode 100644 index 00000000..51692916 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryBusinessRespVO.java @@ -0,0 +1,67 @@ +package com.zt.plat.module.qms.business.other.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 OtherDictionaryBusinessRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16170") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "第三方系统") + @ExcelProperty("第三方系统") + private String otherSystem; + + @Schema(description = "业务字典ID,字典表【T_DIC_BSN】", requiredMode = Schema.RequiredMode.REQUIRED, example = "4167") + @ExcelProperty("业务字典ID,字典表【T_DIC_BSN】") + private Long dictionaryBusinessId; + + @Schema(description = "业务字典Key,字典表【T_DIC_BSN】") + @ExcelProperty("业务字典Key,字典表【T_DIC_BSN】") + private String dictionaryBusinessKey; + + @Schema(description = "第三方系统中对应的ID", example = "1766") + @ExcelProperty("第三方系统中对应的ID") + private String otherId; + + @Schema(description = "第三方系统中对应的key") + @ExcelProperty("第三方系统中对应的key") + private String otherKey; + + @Schema(description = "第三方系统中对应的value") + @ExcelProperty("第三方系统中对应的value") + private String otherValue; + + @Schema(description = "第三方系统中对应的名称", example = "李四") + @ExcelProperty("第三方系统中对应的名称") + private String otherName; + + @Schema(description = "第三方系统中对应的其他信息") + @ExcelProperty("第三方系统中对应的其他信息") + private String otherInfomation; + + @Schema(description = "第三方系统中对应排序") + @ExcelProperty("第三方系统中对应排序") + private Integer otherSort; + + @Schema(description = "所属部门") + @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/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryBusinessSaveReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryBusinessSaveReqVO.java new file mode 100644 index 00000000..b1d613e8 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryBusinessSaveReqVO.java @@ -0,0 +1,49 @@ +package com.zt.plat.module.qms.business.other.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 OtherDictionaryBusinessSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16170") + private Long id; + + @Schema(description = "第三方系统") + private String otherSystem; + + @Schema(description = "业务字典ID,字典表【T_DIC_BSN】", requiredMode = Schema.RequiredMode.REQUIRED, example = "4167") + @NotNull(message = "业务字典ID,字典表【T_DIC_BSN】不能为空") + private Long dictionaryBusinessId; + + @Schema(description = "业务字典Key,字典表【T_DIC_BSN】") + private String dictionaryBusinessKey; + + @Schema(description = "第三方系统中对应的ID", example = "1766") + private String otherId; + + @Schema(description = "第三方系统中对应的key") + private String otherKey; + + @Schema(description = "第三方系统中对应的value") + private String otherValue; + + @Schema(description = "第三方系统中对应的名称", example = "李四") + private String otherName; + + @Schema(description = "第三方系统中对应的其他信息") + private String otherInfomation; + + @Schema(description = "第三方系统中对应排序") + private Integer otherSort; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryProjectPageReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryProjectPageReqVO.java new file mode 100644 index 00000000..f575899d --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryProjectPageReqVO.java @@ -0,0 +1,50 @@ +package com.zt.plat.module.qms.business.other.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import com.zt.plat.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 第三方系统检测项目字典对应分页 Request VO") +@Data +public class OtherDictionaryProjectPageReqVO extends PageParam { + + @Schema(description = "第三方系统") + private String otherSystem; + + @Schema(description = "检测项目ID,字典表【T_DIC_PRJ】", example = "27171") + private Long dictionaryProjectId; + + @Schema(description = "第三方系统中对应的ID", example = "4875") + private String otherId; + + @Schema(description = "第三方系统中对应的检测项目代码") + private String otherCode; + + @Schema(description = "第三方系统中对应的检测项目名称", example = "ZT") + private String otherName; + + @Schema(description = "第三方系统中对应的检测项目缩写", example = "王五") + private String otherSimpleName; + + @Schema(description = "第三方系统中对应的显示名称", example = "赵六") + private String otherShowName; + + @Schema(description = "第三方系统中对应的键值") + private String otherKey; + + @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/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryProjectRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryProjectRespVO.java new file mode 100644 index 00000000..013a4c0d --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryProjectRespVO.java @@ -0,0 +1,63 @@ +package com.zt.plat.module.qms.business.other.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 OtherDictionaryProjectRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2274") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "第三方系统") + @ExcelProperty("第三方系统") + private String otherSystem; + + @Schema(description = "检测项目ID,字典表【T_DIC_PRJ】", example = "27171") + @ExcelProperty("检测项目ID,字典表【T_DIC_PRJ】") + private Long dictionaryProjectId; + + @Schema(description = "第三方系统中对应的ID", example = "4875") + @ExcelProperty("第三方系统中对应的ID") + private String otherId; + + @Schema(description = "第三方系统中对应的检测项目代码") + @ExcelProperty("第三方系统中对应的检测项目代码") + private String otherCode; + + @Schema(description = "第三方系统中对应的检测项目名称", example = "ZT") + @ExcelProperty("第三方系统中对应的检测项目名称") + private String otherName; + + @Schema(description = "第三方系统中对应的检测项目缩写", example = "王五") + @ExcelProperty("第三方系统中对应的检测项目缩写") + private String otherSimpleName; + + @Schema(description = "第三方系统中对应的显示名称", example = "赵六") + @ExcelProperty("第三方系统中对应的显示名称") + private String otherShowName; + + @Schema(description = "第三方系统中对应的键值") + @ExcelProperty("第三方系统中对应的键值") + private String otherKey; + + @Schema(description = "所属部门") + @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/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryProjectSaveReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryProjectSaveReqVO.java new file mode 100644 index 00000000..ba42f9e8 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherDictionaryProjectSaveReqVO.java @@ -0,0 +1,45 @@ +package com.zt.plat.module.qms.business.other.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 OtherDictionaryProjectSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2274") + private Long id; + + @Schema(description = "第三方系统") + private String otherSystem; + + @Schema(description = "检测项目ID,字典表【T_DIC_PRJ】", example = "27171") + private Long dictionaryProjectId; + + @Schema(description = "第三方系统中对应的ID", example = "4875") + private String otherId; + + @Schema(description = "第三方系统中对应的检测项目代码") + private String otherCode; + + @Schema(description = "第三方系统中对应的检测项目名称", example = "ZT") + private String otherName; + + @Schema(description = "第三方系统中对应的检测项目缩写", example = "王五") + private String otherSimpleName; + + @Schema(description = "第三方系统中对应的显示名称", example = "赵六") + private String otherShowName; + + @Schema(description = "第三方系统中对应的键值") + private String otherKey; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemConfigPageReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemConfigPageReqVO.java new file mode 100644 index 00000000..57c68808 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemConfigPageReqVO.java @@ -0,0 +1,67 @@ +package com.zt.plat.module.qms.business.other.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import com.zt.plat.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 第三方系统配置分页 Request VO") +@Data +public class OtherSystemConfigPageReqVO extends PageParam { + + @Schema(description = "第三方系统") + private String otherSystem; + + @Schema(description = "基地址", example = "https://www.iocoder.cn") + private String baseUrl; + + @Schema(description = "账号", example = "7932") + private String account; + + @Schema(description = "密码") + private String password; + + @Schema(description = "令牌") + private String token; + + @Schema(description = "令牌有效时间,单位秒") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private Integer[] tokenEffectiveTime; + + @Schema(description = "令牌到期时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] tokenExpirationTime; + + @Schema(description = "扩展配置") + private String externalConfig; + + @Schema(description = "是否启用代理,0-否,1-是") + private Integer isEnableProxy; + + @Schema(description = "代理服务器主机地址") + private String proxyHost; + + @Schema(description = "代理服务器端口号") + private Integer proxyPort; + + @Schema(description = "代理服务验证的用户名") + private String proxyUser; + + @Schema(description = "代理服务验证的密码") + private String proxyPassword; + + @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/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemConfigRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemConfigRespVO.java new file mode 100644 index 00000000..e3582750 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemConfigRespVO.java @@ -0,0 +1,83 @@ +package com.zt.plat.module.qms.business.other.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 OtherSystemConfigRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32525") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "第三方系统") + @ExcelProperty("第三方系统") + private String otherSystem; + + @Schema(description = "基地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn") + @ExcelProperty("基地址") + private String baseUrl; + + @Schema(description = "账号", example = "7932") + @ExcelProperty("账号") + private String account; + + @Schema(description = "密码") + @ExcelProperty("密码") + private String password; + + @Schema(description = "令牌") + @ExcelProperty("令牌") + private String token; + + @Schema(description = "令牌有效时间,单位秒") + @ExcelProperty("令牌有效时间,单位秒") + private Integer tokenEffectiveTime; + + @Schema(description = "令牌到期时间") + @ExcelProperty("令牌到期时间") + private LocalDateTime tokenExpirationTime; + + @Schema(description = "扩展配置") + @ExcelProperty("扩展配置") + private String externalConfig; + + @Schema(description = "是否启用代理,0-否,1-是") + @ExcelProperty("是否启用代理,0-否,1-是") + private Integer isEnableProxy; + + @Schema(description = "代理服务器主机地址") + @ExcelProperty("代理服务器主机地址") + private String proxyHost; + + @Schema(description = "代理服务器端口号") + @ExcelProperty("代理服务器端口号") + private Integer proxyPort; + + @Schema(description = "代理服务验证的用户名") + @ExcelProperty("代理服务验证的用户名") + private String proxyUser; + + @Schema(description = "代理服务验证的密码") + @ExcelProperty("代理服务验证的密码") + private String proxyPassword; + + @Schema(description = "所属部门") + @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/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemConfigSaveReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemConfigSaveReqVO.java new file mode 100644 index 00000000..df6867cb --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemConfigSaveReqVO.java @@ -0,0 +1,63 @@ +package com.zt.plat.module.qms.business.other.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 OtherSystemConfigSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32525") + private Long id; + + @Schema(description = "第三方系统") + private String otherSystem; + + @Schema(description = "基地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn") + @NotEmpty(message = "基地址不能为空") + private String baseUrl; + + @Schema(description = "账号", example = "7932") + private String account; + + @Schema(description = "密码") + private String password; + + @Schema(description = "令牌") + private String token; + + @Schema(description = "令牌有效时间,单位秒") + private Integer tokenEffectiveTime; + + @Schema(description = "令牌到期时间") + private LocalDateTime tokenExpirationTime; + + @Schema(description = "扩展配置") + private String externalConfig; + + @Schema(description = "是否启用代理,0-否,1-是") + private Integer isEnableProxy; + + @Schema(description = "代理服务器主机地址") + private String proxyHost; + + @Schema(description = "代理服务器端口号") + private Integer proxyPort; + + @Schema(description = "代理服务验证的用户名") + private String proxyUser; + + @Schema(description = "代理服务验证的密码") + private String proxyPassword; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemUserPageReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemUserPageReqVO.java new file mode 100644 index 00000000..99ca1fb1 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemUserPageReqVO.java @@ -0,0 +1,56 @@ +package com.zt.plat.module.qms.business.other.controller.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import com.zt.plat.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 第三方系统用户信息对应分页 Request VO") +@Data +public class OtherSystemUserPageReqVO extends PageParam { + + @Schema(description = "第三方系统") + private String otherSystem; + + @Schema(description = "用户ID,用户信息表【SYSTEM_USERS】", example = "14157") + private Long userId; + + @Schema(description = "用户姓名", example = "ZT") + private String userRealName; + + @Schema(description = "第三方系统中对应的ID", example = "10325") + private String otherId; + + @Schema(description = "第三方系统中对应的姓名", example = "王五") + private String otherName; + + @Schema(description = "第三方系统中对应的手机号码") + private String otherMobile; + + @Schema(description = "第三方系统中对应的电子邮件") + private String otherEmail; + + @Schema(description = "第三方系统中对应的性别") + private String otherGender; + + @Schema(description = "第三方系统中对应的部门") + private String otherDepartment; + + @Schema(description = "第三方系统中对应的其他信息") + private String otherInfomation; + + @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/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemUserRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemUserRespVO.java new file mode 100644 index 00000000..b0727dac --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemUserRespVO.java @@ -0,0 +1,71 @@ +package com.zt.plat.module.qms.business.other.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 OtherSystemUserRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26930") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "第三方系统") + @ExcelProperty("第三方系统") + private String otherSystem; + + @Schema(description = "用户ID,用户信息表【SYSTEM_USERS】", requiredMode = Schema.RequiredMode.REQUIRED, example = "14157") + @ExcelProperty("用户ID,用户信息表【SYSTEM_USERS】") + private Long userId; + + @Schema(description = "用户姓名", example = "ZT") + @ExcelProperty("用户姓名") + private String userRealName; + + @Schema(description = "第三方系统中对应的ID", example = "10325") + @ExcelProperty("第三方系统中对应的ID") + private String otherId; + + @Schema(description = "第三方系统中对应的姓名", example = "王五") + @ExcelProperty("第三方系统中对应的姓名") + private String otherName; + + @Schema(description = "第三方系统中对应的手机号码") + @ExcelProperty("第三方系统中对应的手机号码") + private String otherMobile; + + @Schema(description = "第三方系统中对应的电子邮件") + @ExcelProperty("第三方系统中对应的电子邮件") + private String otherEmail; + + @Schema(description = "第三方系统中对应的性别") + @ExcelProperty("第三方系统中对应的性别") + private String otherGender; + + @Schema(description = "第三方系统中对应的部门") + @ExcelProperty("第三方系统中对应的部门") + private String otherDepartment; + + @Schema(description = "第三方系统中对应的其他信息") + @ExcelProperty("第三方系统中对应的其他信息") + private String otherInfomation; + + @Schema(description = "所属部门") + @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/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemUserSaveReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemUserSaveReqVO.java new file mode 100644 index 00000000..3845c1ab --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/controller/vo/OtherSystemUserSaveReqVO.java @@ -0,0 +1,52 @@ +package com.zt.plat.module.qms.business.other.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 OtherSystemUserSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26930") + private Long id; + + @Schema(description = "第三方系统") + private String otherSystem; + + @Schema(description = "用户ID,用户信息表【SYSTEM_USERS】", requiredMode = Schema.RequiredMode.REQUIRED, example = "14157") + @NotNull(message = "用户ID,用户信息表【SYSTEM_USERS】不能为空") + private Long userId; + + @Schema(description = "用户姓名", example = "ZT") + private String userRealName; + + @Schema(description = "第三方系统中对应的ID", example = "10325") + private String otherId; + + @Schema(description = "第三方系统中对应的姓名", example = "王五") + private String otherName; + + @Schema(description = "第三方系统中对应的手机号码") + private String otherMobile; + + @Schema(description = "第三方系统中对应的电子邮件") + private String otherEmail; + + @Schema(description = "第三方系统中对应的性别") + private String otherGender; + + @Schema(description = "第三方系统中对应的部门") + private String otherDepartment; + + @Schema(description = "第三方系统中对应的其他信息") + private String otherInfomation; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherBaseSampleDO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherBaseSampleDO.java new file mode 100644 index 00000000..9014d876 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherBaseSampleDO.java @@ -0,0 +1,87 @@ +package com.zt.plat.module.qms.business.other.dal.dataobject; + +import lombok.*; +import com.baomidou.mybatisplus.annotation.*; +import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 第三方系统样品大类对应 DO +* +* @author 后台管理 +*/ +@TableName("t_oth_bse_smp") +@KeySequence("t_oth_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 OtherBaseSampleDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 第三方系统 + */ + @TableField("OTH_SYS") + private String otherSystem; + /** + * 样品大类ID + */ + @TableField("BSE_SMP_ID") + private Long baseSampleId; + /** + * 第三方系统中对应的ID + */ + @TableField("OTH_ID") + private String otherId; + /** + * 第三方系统中对应的类型 + */ + @TableField("OTH_TP") + private String otherType; + /** + * 第三方系统中对应的名称 + */ + @TableField("OTH_NAME") + private String otherName; + /** + * 第三方系统中对应的简称 + */ + @TableField("OTH_SMPL_NAME") + private String otherSimpleName; + /** + * 第三方系统中对应的编码 + */ + @TableField("OTH_CD") + private String otherCode; + /** + * 第三方系统中对应的简码 + */ + @TableField("OTH_SMPL_CD") + private String otherSimpleCode; + /** + * 第三方系统中对应的描述 + */ + @TableField("OTH_DSP") + private String otherDescription; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherDictionaryBusinessDO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherDictionaryBusinessDO.java new file mode 100644 index 00000000..7f6c9afa --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherDictionaryBusinessDO.java @@ -0,0 +1,90 @@ +package com.zt.plat.module.qms.business.other.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 第三方系统与业务字典对应 DO +* +* @author 后台管理 +*/ +@TableName("t_oth_dic_bsn") +@KeySequence("t_oth_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 OtherDictionaryBusinessDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 第三方系统 + */ + @TableField("OTH_SYS") + private String otherSystem; + /** + * 业务字典ID,字典表【T_DIC_BSN】 + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 业务字典Key,字典表【T_DIC_BSN】 + */ + @TableField("DIC_BSN_KY") + private String dictionaryBusinessKey; + /** + * 第三方系统中对应的ID + */ + @TableField("OTH_ID") + private String otherId; + /** + * 第三方系统中对应的key + */ + @TableField("OTH_KY") + private String otherKey; + /** + * 第三方系统中对应的value + */ + @TableField("OTH_VAL") + private String otherValue; + /** + * 第三方系统中对应的名称 + */ + @TableField("OTH_NAME") + private String otherName; + /** + * 第三方系统中对应的其他信息 + */ + @TableField("OTH_INF") + private String otherInfomation; + /** + * 第三方系统中对应排序 + */ + @TableField("OTH_SRT") + private Integer otherSort; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherDictionaryProjectDO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherDictionaryProjectDO.java new file mode 100644 index 00000000..de467afb --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherDictionaryProjectDO.java @@ -0,0 +1,85 @@ +package com.zt.plat.module.qms.business.other.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 第三方系统检测项目字典对应 DO +* +* @author 后台管理 +*/ +@TableName("t_oth_dic_prj") +@KeySequence("t_oth_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 OtherDictionaryProjectDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 第三方系统 + */ + @TableField("OTH_SYS") + private String otherSystem; + /** + * 检测项目ID,字典表【T_DIC_PRJ】 + */ + @TableField("DIC_PRJ_ID") + private Long dictionaryProjectId; + /** + * 第三方系统中对应的ID + */ + @TableField("OTH_ID") + private String otherId; + /** + * 第三方系统中对应的检测项目代码 + */ + @TableField("OTH_CD") + private String otherCode; + /** + * 第三方系统中对应的检测项目名称 + */ + @TableField("OTH_NAME") + private String otherName; + /** + * 第三方系统中对应的检测项目缩写 + */ + @TableField("OTH_SMPL_NAME") + private String otherSimpleName; + /** + * 第三方系统中对应的显示名称 + */ + @TableField("OTH_SHW_NAME") + private String otherShowName; + /** + * 第三方系统中对应的键值 + */ + @TableField("OTH_KY") + private String otherKey; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherSystemConfigDO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherSystemConfigDO.java new file mode 100644 index 00000000..439e3b3a --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherSystemConfigDO.java @@ -0,0 +1,111 @@ +package com.zt.plat.module.qms.business.other.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 com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 第三方系统配置 DO +* +* @author 后台管理 +*/ +@TableName("t_oth_sys_cfg") +@KeySequence("t_oth_sys_cfg_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class OtherSystemConfigDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 第三方系统 + */ + @TableField("OTH_SYS") + private String otherSystem; + /** + * 基地址 + */ + @TableField("BSE_URL") + private String baseUrl; + /** + * 账号 + */ + @TableField("ACCT") + private String account; + /** + * 密码 + */ + @TableField("PWD") + private String password; + /** + * 令牌 + */ + @TableField("TKN") + private String token; + /** + * 令牌有效时间,单位秒 + */ + @TableField("TKN_EFCT_TM") + private Integer tokenEffectiveTime; + /** + * 令牌到期时间 + */ + @TableField("TKN_EXPR_TM") + private LocalDateTime tokenExpirationTime; + /** + * 扩展配置 + */ + @TableField("EXT_CFG") + private String externalConfig; + /** + * 是否启用代理,0-否,1-是 + */ + @TableField("IS_ENB_PRXY") + private Integer isEnableProxy; + /** + * 代理服务器主机地址 + */ + @TableField("PRXY_HST") + private String proxyHost; + /** + * 代理服务器端口号 + */ + @TableField("PRXY_PRT") + private Integer proxyPort; + /** + * 代理服务验证的用户名 + */ + @TableField("PRXY_USER") + private String proxyUser; + /** + * 代理服务验证的密码 + */ + @TableField("PRXY_PWD") + private String proxyPassword; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherSystemUserDO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherSystemUserDO.java new file mode 100644 index 00000000..2f8b7752 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/dataobject/OtherSystemUserDO.java @@ -0,0 +1,95 @@ +package com.zt.plat.module.qms.business.other.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 第三方系统用户信息对应 DO +* +* @author 后台管理 +*/ +@TableName("t_oth_sys_user") +@KeySequence("t_oth_sys_user_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class OtherSystemUserDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 第三方系统 + */ + @TableField("OTH_SYS") + private String otherSystem; + /** + * 用户ID,用户信息表【SYSTEM_USERS】 + */ + @TableField("USER_ID") + private Long userId; + /** + * 用户姓名 + */ + @TableField("USER_RAL_NAME") + private String userRealName; + /** + * 第三方系统中对应的ID + */ + @TableField("OTH_ID") + private String otherId; + /** + * 第三方系统中对应的姓名 + */ + @TableField("OTH_NAME") + private String otherName; + /** + * 第三方系统中对应的手机号码 + */ + @TableField("OTH_MOB") + private String otherMobile; + /** + * 第三方系统中对应的电子邮件 + */ + @TableField("OTH_EM") + private String otherEmail; + /** + * 第三方系统中对应的性别 + */ + @TableField("OTH_GNDR") + private String otherGender; + /** + * 第三方系统中对应的部门 + */ + @TableField("OTH_DEPT") + private String otherDepartment; + /** + * 第三方系统中对应的其他信息 + */ + @TableField("OTH_INF") + private String otherInfomation; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherBaseSampleMapper.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherBaseSampleMapper.java new file mode 100644 index 00000000..c66168d3 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherBaseSampleMapper.java @@ -0,0 +1,43 @@ +package com.zt.plat.module.qms.business.other.dal.mapper; + +import java.util.*; + +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherBaseSampleDO; +import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 第三方系统样品大类对应 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface OtherBaseSampleMapper extends BaseMapperX { + + default PageResult selectPage(OtherBaseSamplePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(OtherBaseSampleDO::getOtherSystem, reqVO.getOtherSystem()) + .eqIfPresent(OtherBaseSampleDO::getBaseSampleId, reqVO.getBaseSampleId()) + .eqIfPresent(OtherBaseSampleDO::getOtherId, reqVO.getOtherId()) + .eqIfPresent(OtherBaseSampleDO::getOtherType, reqVO.getOtherType()) + .likeIfPresent(OtherBaseSampleDO::getOtherName, reqVO.getOtherName()) + .likeIfPresent(OtherBaseSampleDO::getOtherSimpleName, reqVO.getOtherSimpleName()) + .eqIfPresent(OtherBaseSampleDO::getOtherCode, reqVO.getOtherCode()) + .eqIfPresent(OtherBaseSampleDO::getOtherSimpleCode, reqVO.getOtherSimpleCode()) + .eqIfPresent(OtherBaseSampleDO::getOtherDescription, reqVO.getOtherDescription()) + .eqIfPresent(OtherBaseSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(OtherBaseSampleDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(OtherBaseSampleDO::getRemark, reqVO.getRemark()) + .orderByDesc(OtherBaseSampleDO::getId)); + } + + default List selectByOtherSystemAndOtherIds(String otherSystem, List otherIdList) { + return selectList(new LambdaQueryWrapperX() + .eq(OtherBaseSampleDO::getOtherSystem, otherSystem) + .in(OtherBaseSampleDO::getOtherId, otherIdList)); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryBusinessMapper.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryBusinessMapper.java new file mode 100644 index 00000000..954abf57 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryBusinessMapper.java @@ -0,0 +1,42 @@ +package com.zt.plat.module.qms.business.other.dal.mapper; + +import java.util.*; + +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherDictionaryBusinessDO; +import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 第三方系统与业务字典对应 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface OtherDictionaryBusinessMapper extends BaseMapperX { + + default PageResult selectPage(OtherDictionaryBusinessPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(OtherDictionaryBusinessDO::getOtherSystem, reqVO.getOtherSystem()) + .eqIfPresent(OtherDictionaryBusinessDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId()) + .eqIfPresent(OtherDictionaryBusinessDO::getDictionaryBusinessKey, reqVO.getDictionaryBusinessKey()) + .eqIfPresent(OtherDictionaryBusinessDO::getOtherId, reqVO.getOtherId()) + .eqIfPresent(OtherDictionaryBusinessDO::getOtherKey, reqVO.getOtherKey()) + .eqIfPresent(OtherDictionaryBusinessDO::getOtherValue, reqVO.getOtherValue()) + .likeIfPresent(OtherDictionaryBusinessDO::getOtherName, reqVO.getOtherName()) + .eqIfPresent(OtherDictionaryBusinessDO::getOtherInfomation, reqVO.getOtherInfomation()) + .eqIfPresent(OtherDictionaryBusinessDO::getOtherSort, reqVO.getOtherSort()) + .eqIfPresent(OtherDictionaryBusinessDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(OtherDictionaryBusinessDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(OtherDictionaryBusinessDO::getRemark, reqVO.getRemark()) + .orderByDesc(OtherDictionaryBusinessDO::getId)); + } + + default List selectByOtherSystem(String otherSystem) { + return selectList(new LambdaQueryWrapperX() + .eq(OtherDictionaryBusinessDO::getOtherSystem, otherSystem)); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryProjectMapper.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryProjectMapper.java new file mode 100644 index 00000000..46a8cbd5 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryProjectMapper.java @@ -0,0 +1,42 @@ +package com.zt.plat.module.qms.business.other.dal.mapper; + +import java.util.*; + +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherDictionaryProjectDO; +import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 第三方系统检测项目字典对应 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface OtherDictionaryProjectMapper extends BaseMapperX { + + default PageResult selectPage(OtherDictionaryProjectPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(OtherDictionaryProjectDO::getOtherSystem, reqVO.getOtherSystem()) + .eqIfPresent(OtherDictionaryProjectDO::getDictionaryProjectId, reqVO.getDictionaryProjectId()) + .eqIfPresent(OtherDictionaryProjectDO::getOtherId, reqVO.getOtherId()) + .eqIfPresent(OtherDictionaryProjectDO::getOtherCode, reqVO.getOtherCode()) + .likeIfPresent(OtherDictionaryProjectDO::getOtherName, reqVO.getOtherName()) + .likeIfPresent(OtherDictionaryProjectDO::getOtherSimpleName, reqVO.getOtherSimpleName()) + .likeIfPresent(OtherDictionaryProjectDO::getOtherShowName, reqVO.getOtherShowName()) + .eqIfPresent(OtherDictionaryProjectDO::getOtherKey, reqVO.getOtherKey()) + .eqIfPresent(OtherDictionaryProjectDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(OtherDictionaryProjectDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(OtherDictionaryProjectDO::getRemark, reqVO.getRemark()) + .orderByDesc(OtherDictionaryProjectDO::getId)); + } + + default List selectByOtherSystemAndOtherIds(String otherSystem, List otherIdList) { + return selectList(new LambdaQueryWrapperX() + .eq(OtherDictionaryProjectDO::getOtherSystem, otherSystem) + .in(OtherDictionaryProjectDO::getOtherId, otherIdList)); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemConfigMapper.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemConfigMapper.java new file mode 100644 index 00000000..3a40d331 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemConfigMapper.java @@ -0,0 +1,41 @@ +package com.zt.plat.module.qms.business.other.dal.mapper; + +import java.util.*; + +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherSystemConfigDO; +import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 第三方系统配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface OtherSystemConfigMapper extends BaseMapperX { + + default PageResult selectPage(OtherSystemConfigPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(OtherSystemConfigDO::getOtherSystem, reqVO.getOtherSystem()) + .eqIfPresent(OtherSystemConfigDO::getBaseUrl, reqVO.getBaseUrl()) + .eqIfPresent(OtherSystemConfigDO::getAccount, reqVO.getAccount()) + .eqIfPresent(OtherSystemConfigDO::getPassword, reqVO.getPassword()) + .eqIfPresent(OtherSystemConfigDO::getToken, reqVO.getToken()) + .betweenIfPresent(OtherSystemConfigDO::getTokenEffectiveTime, reqVO.getTokenEffectiveTime()) + .betweenIfPresent(OtherSystemConfigDO::getTokenExpirationTime, reqVO.getTokenExpirationTime()) + .eqIfPresent(OtherSystemConfigDO::getExternalConfig, reqVO.getExternalConfig()) + .eqIfPresent(OtherSystemConfigDO::getIsEnableProxy, reqVO.getIsEnableProxy()) + .eqIfPresent(OtherSystemConfigDO::getProxyHost, reqVO.getProxyHost()) + .eqIfPresent(OtherSystemConfigDO::getProxyPort, reqVO.getProxyPort()) + .eqIfPresent(OtherSystemConfigDO::getProxyUser, reqVO.getProxyUser()) + .eqIfPresent(OtherSystemConfigDO::getProxyPassword, reqVO.getProxyPassword()) + .eqIfPresent(OtherSystemConfigDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(OtherSystemConfigDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(OtherSystemConfigDO::getRemark, reqVO.getRemark()) + .orderByDesc(OtherSystemConfigDO::getId)); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemUserMapper.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemUserMapper.java new file mode 100644 index 00000000..fa2d071b --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemUserMapper.java @@ -0,0 +1,44 @@ +package com.zt.plat.module.qms.business.other.dal.mapper; + +import java.util.*; + +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherSystemUserDO; +import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 第三方系统用户信息对应 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface OtherSystemUserMapper extends BaseMapperX { + + default PageResult selectPage(OtherSystemUserPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(OtherSystemUserDO::getOtherSystem, reqVO.getOtherSystem()) + .eqIfPresent(OtherSystemUserDO::getUserId, reqVO.getUserId()) + .likeIfPresent(OtherSystemUserDO::getUserRealName, reqVO.getUserRealName()) + .eqIfPresent(OtherSystemUserDO::getOtherId, reqVO.getOtherId()) + .likeIfPresent(OtherSystemUserDO::getOtherName, reqVO.getOtherName()) + .eqIfPresent(OtherSystemUserDO::getOtherMobile, reqVO.getOtherMobile()) + .eqIfPresent(OtherSystemUserDO::getOtherEmail, reqVO.getOtherEmail()) + .eqIfPresent(OtherSystemUserDO::getOtherGender, reqVO.getOtherGender()) + .eqIfPresent(OtherSystemUserDO::getOtherDepartment, reqVO.getOtherDepartment()) + .eqIfPresent(OtherSystemUserDO::getOtherInfomation, reqVO.getOtherInfomation()) + .eqIfPresent(OtherSystemUserDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(OtherSystemUserDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(OtherSystemUserDO::getRemark, reqVO.getRemark()) + .orderByDesc(OtherSystemUserDO::getId)); + } + + default List selectByOtherSystemAndOtherIds(String otherSystem, List otherIdList) { + return selectList(new LambdaQueryWrapperX() + .eq(OtherSystemUserDO::getOtherSystem, otherSystem) + .in(OtherSystemUserDO::getOtherId, otherIdList)); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherBaseSampleService.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherBaseSampleService.java new file mode 100644 index 00000000..b221e0b9 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherBaseSampleService.java @@ -0,0 +1,62 @@ +package com.zt.plat.module.qms.business.other.service; + +import java.util.*; +import jakarta.validation.*; +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherBaseSampleDO; +import com.zt.plat.framework.common.pojo.PageParam; + +/** + * 第三方系统样品大类对应 Service 接口 + * + * @author 后台管理 + */ +public interface OtherBaseSampleService { + + /** + * 创建第三方系统样品大类对应 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + OtherBaseSampleRespVO createOtherBaseSample(@Valid OtherBaseSampleSaveReqVO createReqVO); + + /** + * 更新第三方系统样品大类对应 + * + * @param updateReqVO 更新信息 + */ + void updateOtherBaseSample(@Valid OtherBaseSampleSaveReqVO updateReqVO); + + /** + * 删除第三方系统样品大类对应 + * + * @param id 编号 + */ + void deleteOtherBaseSample(Long id); + + /** + * 批量删除第三方系统样品大类对应 + * + * @param ids 编号 + */ + void deleteOtherBaseSampleListByIds(List ids); + + /** + * 获得第三方系统样品大类对应 + * + * @param id 编号 + * @return 第三方系统样品大类对应 + */ + OtherBaseSampleDO getOtherBaseSample(Long id); + + /** + * 获得第三方系统样品大类对应分页 + * + * @param pageReqVO 分页查询 + * @return 第三方系统样品大类对应分页 + */ + PageResult getOtherBaseSamplePage(OtherBaseSamplePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherBaseSampleServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherBaseSampleServiceImpl.java new file mode 100644 index 00000000..dd42872d --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherBaseSampleServiceImpl.java @@ -0,0 +1,91 @@ +package com.zt.plat.module.qms.business.other.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 com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.common.pojo.PageParam; +import com.zt.plat.framework.common.util.object.BeanUtils; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherBaseSampleDO; +import com.zt.plat.module.qms.business.other.dal.mapper.OtherBaseSampleMapper; + +import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception; +import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList; +import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList; +import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*; + +/** + * 第三方系统样品大类对应 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class OtherBaseSampleServiceImpl implements OtherBaseSampleService { + + @Resource + private OtherBaseSampleMapper otherBaseSampleMapper; + + @Override + public OtherBaseSampleRespVO createOtherBaseSample(OtherBaseSampleSaveReqVO createReqVO) { + // 插入 + OtherBaseSampleDO otherBaseSample = BeanUtils.toBean(createReqVO, OtherBaseSampleDO.class); + otherBaseSampleMapper.insert(otherBaseSample); + // 返回 + return BeanUtils.toBean(otherBaseSample, OtherBaseSampleRespVO.class); + } + + @Override + public void updateOtherBaseSample(OtherBaseSampleSaveReqVO updateReqVO) { + // 校验存在 + validateOtherBaseSampleExists(updateReqVO.getId()); + // 更新 + OtherBaseSampleDO updateObj = BeanUtils.toBean(updateReqVO, OtherBaseSampleDO.class); + otherBaseSampleMapper.updateById(updateObj); + } + + @Override + public void deleteOtherBaseSample(Long id) { + // 校验存在 + validateOtherBaseSampleExists(id); + // 删除 + otherBaseSampleMapper.deleteById(id); + } + + @Override + public void deleteOtherBaseSampleListByIds(List ids) { + // 校验存在 + validateOtherBaseSampleExists(ids); + // 删除 + otherBaseSampleMapper.deleteByIds(ids); + } + + private void validateOtherBaseSampleExists(List ids) { + List list = otherBaseSampleMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(OTHER_BASE_SAMPLE_NOT_EXISTS); + } + } + + private void validateOtherBaseSampleExists(Long id) { + if (otherBaseSampleMapper.selectById(id) == null) { + throw exception(OTHER_BASE_SAMPLE_NOT_EXISTS); + } + } + + @Override + public OtherBaseSampleDO getOtherBaseSample(Long id) { + return otherBaseSampleMapper.selectById(id); + } + + @Override + public PageResult getOtherBaseSamplePage(OtherBaseSamplePageReqVO pageReqVO) { + return otherBaseSampleMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryBusinessService.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryBusinessService.java new file mode 100644 index 00000000..af6a24e5 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryBusinessService.java @@ -0,0 +1,62 @@ +package com.zt.plat.module.qms.business.other.service; + +import java.util.*; +import jakarta.validation.*; +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherDictionaryBusinessDO; +import com.zt.plat.framework.common.pojo.PageParam; + +/** + * 第三方系统与业务字典对应 Service 接口 + * + * @author 后台管理 + */ +public interface OtherDictionaryBusinessService { + + /** + * 创建第三方系统与业务字典对应 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + OtherDictionaryBusinessRespVO createOtherDictionaryBusiness(@Valid OtherDictionaryBusinessSaveReqVO createReqVO); + + /** + * 更新第三方系统与业务字典对应 + * + * @param updateReqVO 更新信息 + */ + void updateOtherDictionaryBusiness(@Valid OtherDictionaryBusinessSaveReqVO updateReqVO); + + /** + * 删除第三方系统与业务字典对应 + * + * @param id 编号 + */ + void deleteOtherDictionaryBusiness(Long id); + + /** + * 批量删除第三方系统与业务字典对应 + * + * @param ids 编号 + */ + void deleteOtherDictionaryBusinessListByIds(List ids); + + /** + * 获得第三方系统与业务字典对应 + * + * @param id 编号 + * @return 第三方系统与业务字典对应 + */ + OtherDictionaryBusinessDO getOtherDictionaryBusiness(Long id); + + /** + * 获得第三方系统与业务字典对应分页 + * + * @param pageReqVO 分页查询 + * @return 第三方系统与业务字典对应分页 + */ + PageResult getOtherDictionaryBusinessPage(OtherDictionaryBusinessPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryBusinessServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryBusinessServiceImpl.java new file mode 100644 index 00000000..d9fdb3d1 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryBusinessServiceImpl.java @@ -0,0 +1,91 @@ +package com.zt.plat.module.qms.business.other.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 com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.common.pojo.PageParam; +import com.zt.plat.framework.common.util.object.BeanUtils; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherDictionaryBusinessDO; +import com.zt.plat.module.qms.business.other.dal.mapper.OtherDictionaryBusinessMapper; + +import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception; +import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList; +import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList; +import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*; + +/** + * 第三方系统与业务字典对应 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class OtherDictionaryBusinessServiceImpl implements OtherDictionaryBusinessService { + + @Resource + private OtherDictionaryBusinessMapper otherDictionaryBusinessMapper; + + @Override + public OtherDictionaryBusinessRespVO createOtherDictionaryBusiness(OtherDictionaryBusinessSaveReqVO createReqVO) { + // 插入 + OtherDictionaryBusinessDO otherDictionaryBusiness = BeanUtils.toBean(createReqVO, OtherDictionaryBusinessDO.class); + otherDictionaryBusinessMapper.insert(otherDictionaryBusiness); + // 返回 + return BeanUtils.toBean(otherDictionaryBusiness, OtherDictionaryBusinessRespVO.class); + } + + @Override + public void updateOtherDictionaryBusiness(OtherDictionaryBusinessSaveReqVO updateReqVO) { + // 校验存在 + validateOtherDictionaryBusinessExists(updateReqVO.getId()); + // 更新 + OtherDictionaryBusinessDO updateObj = BeanUtils.toBean(updateReqVO, OtherDictionaryBusinessDO.class); + otherDictionaryBusinessMapper.updateById(updateObj); + } + + @Override + public void deleteOtherDictionaryBusiness(Long id) { + // 校验存在 + validateOtherDictionaryBusinessExists(id); + // 删除 + otherDictionaryBusinessMapper.deleteById(id); + } + + @Override + public void deleteOtherDictionaryBusinessListByIds(List ids) { + // 校验存在 + validateOtherDictionaryBusinessExists(ids); + // 删除 + otherDictionaryBusinessMapper.deleteByIds(ids); + } + + private void validateOtherDictionaryBusinessExists(List ids) { + List list = otherDictionaryBusinessMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(OTHER_DICTIONARY_BUSINESS_NOT_EXISTS); + } + } + + private void validateOtherDictionaryBusinessExists(Long id) { + if (otherDictionaryBusinessMapper.selectById(id) == null) { + throw exception(OTHER_DICTIONARY_BUSINESS_NOT_EXISTS); + } + } + + @Override + public OtherDictionaryBusinessDO getOtherDictionaryBusiness(Long id) { + return otherDictionaryBusinessMapper.selectById(id); + } + + @Override + public PageResult getOtherDictionaryBusinessPage(OtherDictionaryBusinessPageReqVO pageReqVO) { + return otherDictionaryBusinessMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryProjectService.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryProjectService.java new file mode 100644 index 00000000..ab1f8930 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryProjectService.java @@ -0,0 +1,62 @@ +package com.zt.plat.module.qms.business.other.service; + +import java.util.*; +import jakarta.validation.*; +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherDictionaryProjectDO; +import com.zt.plat.framework.common.pojo.PageParam; + +/** + * 第三方系统检测项目字典对应 Service 接口 + * + * @author 后台管理 + */ +public interface OtherDictionaryProjectService { + + /** + * 创建第三方系统检测项目字典对应 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + OtherDictionaryProjectRespVO createOtherDictionaryProject(@Valid OtherDictionaryProjectSaveReqVO createReqVO); + + /** + * 更新第三方系统检测项目字典对应 + * + * @param updateReqVO 更新信息 + */ + void updateOtherDictionaryProject(@Valid OtherDictionaryProjectSaveReqVO updateReqVO); + + /** + * 删除第三方系统检测项目字典对应 + * + * @param id 编号 + */ + void deleteOtherDictionaryProject(Long id); + + /** + * 批量删除第三方系统检测项目字典对应 + * + * @param ids 编号 + */ + void deleteOtherDictionaryProjectListByIds(List ids); + + /** + * 获得第三方系统检测项目字典对应 + * + * @param id 编号 + * @return 第三方系统检测项目字典对应 + */ + OtherDictionaryProjectDO getOtherDictionaryProject(Long id); + + /** + * 获得第三方系统检测项目字典对应分页 + * + * @param pageReqVO 分页查询 + * @return 第三方系统检测项目字典对应分页 + */ + PageResult getOtherDictionaryProjectPage(OtherDictionaryProjectPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryProjectServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryProjectServiceImpl.java new file mode 100644 index 00000000..d9524bdd --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherDictionaryProjectServiceImpl.java @@ -0,0 +1,91 @@ +package com.zt.plat.module.qms.business.other.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 com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.common.pojo.PageParam; +import com.zt.plat.framework.common.util.object.BeanUtils; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherDictionaryProjectDO; +import com.zt.plat.module.qms.business.other.dal.mapper.OtherDictionaryProjectMapper; + +import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception; +import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList; +import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList; +import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*; + +/** + * 第三方系统检测项目字典对应 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class OtherDictionaryProjectServiceImpl implements OtherDictionaryProjectService { + + @Resource + private OtherDictionaryProjectMapper otherDictionaryProjectMapper; + + @Override + public OtherDictionaryProjectRespVO createOtherDictionaryProject(OtherDictionaryProjectSaveReqVO createReqVO) { + // 插入 + OtherDictionaryProjectDO otherDictionaryProject = BeanUtils.toBean(createReqVO, OtherDictionaryProjectDO.class); + otherDictionaryProjectMapper.insert(otherDictionaryProject); + // 返回 + return BeanUtils.toBean(otherDictionaryProject, OtherDictionaryProjectRespVO.class); + } + + @Override + public void updateOtherDictionaryProject(OtherDictionaryProjectSaveReqVO updateReqVO) { + // 校验存在 + validateOtherDictionaryProjectExists(updateReqVO.getId()); + // 更新 + OtherDictionaryProjectDO updateObj = BeanUtils.toBean(updateReqVO, OtherDictionaryProjectDO.class); + otherDictionaryProjectMapper.updateById(updateObj); + } + + @Override + public void deleteOtherDictionaryProject(Long id) { + // 校验存在 + validateOtherDictionaryProjectExists(id); + // 删除 + otherDictionaryProjectMapper.deleteById(id); + } + + @Override + public void deleteOtherDictionaryProjectListByIds(List ids) { + // 校验存在 + validateOtherDictionaryProjectExists(ids); + // 删除 + otherDictionaryProjectMapper.deleteByIds(ids); + } + + private void validateOtherDictionaryProjectExists(List ids) { + List list = otherDictionaryProjectMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(OTHER_DICTIONARY_PROJECT_NOT_EXISTS); + } + } + + private void validateOtherDictionaryProjectExists(Long id) { + if (otherDictionaryProjectMapper.selectById(id) == null) { + throw exception(OTHER_DICTIONARY_PROJECT_NOT_EXISTS); + } + } + + @Override + public OtherDictionaryProjectDO getOtherDictionaryProject(Long id) { + return otherDictionaryProjectMapper.selectById(id); + } + + @Override + public PageResult getOtherDictionaryProjectPage(OtherDictionaryProjectPageReqVO pageReqVO) { + return otherDictionaryProjectMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemConfigService.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemConfigService.java new file mode 100644 index 00000000..eb7ca3e8 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemConfigService.java @@ -0,0 +1,62 @@ +package com.zt.plat.module.qms.business.other.service; + +import java.util.*; +import jakarta.validation.*; +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherSystemConfigDO; +import com.zt.plat.framework.common.pojo.PageParam; + +/** + * 第三方系统配置 Service 接口 + * + * @author 后台管理 + */ +public interface OtherSystemConfigService { + + /** + * 创建第三方系统配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + OtherSystemConfigRespVO createOtherSystemConfig(@Valid OtherSystemConfigSaveReqVO createReqVO); + + /** + * 更新第三方系统配置 + * + * @param updateReqVO 更新信息 + */ + void updateOtherSystemConfig(@Valid OtherSystemConfigSaveReqVO updateReqVO); + + /** + * 删除第三方系统配置 + * + * @param id 编号 + */ + void deleteOtherSystemConfig(Long id); + + /** + * 批量删除第三方系统配置 + * + * @param ids 编号 + */ + void deleteOtherSystemConfigListByIds(List ids); + + /** + * 获得第三方系统配置 + * + * @param id 编号 + * @return 第三方系统配置 + */ + OtherSystemConfigDO getOtherSystemConfig(Long id); + + /** + * 获得第三方系统配置分页 + * + * @param pageReqVO 分页查询 + * @return 第三方系统配置分页 + */ + PageResult getOtherSystemConfigPage(OtherSystemConfigPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemConfigServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemConfigServiceImpl.java new file mode 100644 index 00000000..3c411871 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemConfigServiceImpl.java @@ -0,0 +1,91 @@ +package com.zt.plat.module.qms.business.other.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 com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.common.pojo.PageParam; +import com.zt.plat.framework.common.util.object.BeanUtils; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherSystemConfigDO; +import com.zt.plat.module.qms.business.other.dal.mapper.OtherSystemConfigMapper; + +import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception; +import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList; +import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList; +import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*; + +/** + * 第三方系统配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class OtherSystemConfigServiceImpl implements OtherSystemConfigService { + + @Resource + private OtherSystemConfigMapper otherSystemConfigMapper; + + @Override + public OtherSystemConfigRespVO createOtherSystemConfig(OtherSystemConfigSaveReqVO createReqVO) { + // 插入 + OtherSystemConfigDO otherSystemConfig = BeanUtils.toBean(createReqVO, OtherSystemConfigDO.class); + otherSystemConfigMapper.insert(otherSystemConfig); + // 返回 + return BeanUtils.toBean(otherSystemConfig, OtherSystemConfigRespVO.class); + } + + @Override + public void updateOtherSystemConfig(OtherSystemConfigSaveReqVO updateReqVO) { + // 校验存在 + validateOtherSystemConfigExists(updateReqVO.getId()); + // 更新 + OtherSystemConfigDO updateObj = BeanUtils.toBean(updateReqVO, OtherSystemConfigDO.class); + otherSystemConfigMapper.updateById(updateObj); + } + + @Override + public void deleteOtherSystemConfig(Long id) { + // 校验存在 + validateOtherSystemConfigExists(id); + // 删除 + otherSystemConfigMapper.deleteById(id); + } + + @Override + public void deleteOtherSystemConfigListByIds(List ids) { + // 校验存在 + validateOtherSystemConfigExists(ids); + // 删除 + otherSystemConfigMapper.deleteByIds(ids); + } + + private void validateOtherSystemConfigExists(List ids) { + List list = otherSystemConfigMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(OTHER_SYSTEM_CONFIG_NOT_EXISTS); + } + } + + private void validateOtherSystemConfigExists(Long id) { + if (otherSystemConfigMapper.selectById(id) == null) { + throw exception(OTHER_SYSTEM_CONFIG_NOT_EXISTS); + } + } + + @Override + public OtherSystemConfigDO getOtherSystemConfig(Long id) { + return otherSystemConfigMapper.selectById(id); + } + + @Override + public PageResult getOtherSystemConfigPage(OtherSystemConfigPageReqVO pageReqVO) { + return otherSystemConfigMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemUserService.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemUserService.java new file mode 100644 index 00000000..8b2da49a --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemUserService.java @@ -0,0 +1,62 @@ +package com.zt.plat.module.qms.business.other.service; + +import java.util.*; +import jakarta.validation.*; +import com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherSystemUserDO; +import com.zt.plat.framework.common.pojo.PageParam; + +/** + * 第三方系统用户信息对应 Service 接口 + * + * @author 后台管理 + */ +public interface OtherSystemUserService { + + /** + * 创建第三方系统用户信息对应 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + OtherSystemUserRespVO createOtherSystemUser(@Valid OtherSystemUserSaveReqVO createReqVO); + + /** + * 更新第三方系统用户信息对应 + * + * @param updateReqVO 更新信息 + */ + void updateOtherSystemUser(@Valid OtherSystemUserSaveReqVO updateReqVO); + + /** + * 删除第三方系统用户信息对应 + * + * @param id 编号 + */ + void deleteOtherSystemUser(Long id); + + /** + * 批量删除第三方系统用户信息对应 + * + * @param ids 编号 + */ + void deleteOtherSystemUserListByIds(List ids); + + /** + * 获得第三方系统用户信息对应 + * + * @param id 编号 + * @return 第三方系统用户信息对应 + */ + OtherSystemUserDO getOtherSystemUser(Long id); + + /** + * 获得第三方系统用户信息对应分页 + * + * @param pageReqVO 分页查询 + * @return 第三方系统用户信息对应分页 + */ + PageResult getOtherSystemUserPage(OtherSystemUserPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemUserServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemUserServiceImpl.java new file mode 100644 index 00000000..0efd71f0 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/other/service/OtherSystemUserServiceImpl.java @@ -0,0 +1,91 @@ +package com.zt.plat.module.qms.business.other.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 com.zt.plat.framework.common.pojo.PageResult; +import com.zt.plat.framework.common.pojo.PageParam; +import com.zt.plat.framework.common.util.object.BeanUtils; +import com.zt.plat.module.qms.business.other.controller.vo.*; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherSystemUserDO; +import com.zt.plat.module.qms.business.other.dal.mapper.OtherSystemUserMapper; + +import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception; +import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList; +import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList; +import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*; + +/** + * 第三方系统用户信息对应 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class OtherSystemUserServiceImpl implements OtherSystemUserService { + + @Resource + private OtherSystemUserMapper otherSystemUserMapper; + + @Override + public OtherSystemUserRespVO createOtherSystemUser(OtherSystemUserSaveReqVO createReqVO) { + // 插入 + OtherSystemUserDO otherSystemUser = BeanUtils.toBean(createReqVO, OtherSystemUserDO.class); + otherSystemUserMapper.insert(otherSystemUser); + // 返回 + return BeanUtils.toBean(otherSystemUser, OtherSystemUserRespVO.class); + } + + @Override + public void updateOtherSystemUser(OtherSystemUserSaveReqVO updateReqVO) { + // 校验存在 + validateOtherSystemUserExists(updateReqVO.getId()); + // 更新 + OtherSystemUserDO updateObj = BeanUtils.toBean(updateReqVO, OtherSystemUserDO.class); + otherSystemUserMapper.updateById(updateObj); + } + + @Override + public void deleteOtherSystemUser(Long id) { + // 校验存在 + validateOtherSystemUserExists(id); + // 删除 + otherSystemUserMapper.deleteById(id); + } + + @Override + public void deleteOtherSystemUserListByIds(List ids) { + // 校验存在 + validateOtherSystemUserExists(ids); + // 删除 + otherSystemUserMapper.deleteByIds(ids); + } + + private void validateOtherSystemUserExists(List ids) { + List list = otherSystemUserMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(OTHER_SYSTEM_USER_NOT_EXISTS); + } + } + + private void validateOtherSystemUserExists(Long id) { + if (otherSystemUserMapper.selectById(id) == null) { + throw exception(OTHER_SYSTEM_USER_NOT_EXISTS); + } + } + + @Override + public OtherSystemUserDO getOtherSystemUser(Long id) { + return otherSystemUserMapper.selectById(id); + } + + @Override + public PageResult getOtherSystemUserPage(OtherSystemUserPageReqVO pageReqVO) { + return otherSystemUserMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/AutoIngredientsController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/AutoIngredientsController.java index 7942b551..b098116b 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/AutoIngredientsController.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/AutoIngredientsController.java @@ -14,7 +14,6 @@ import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIg import com.zt.plat.module.qms.thirdpartyapi.controller.vo.*; import com.zt.plat.module.qms.thirdpartyapi.service.AutoIngredientsService; -import cn.hutool.json.JSON; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/InternalSampleEntrustController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/InternalSampleEntrustController.java new file mode 100644 index 00000000..87aa8b42 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/InternalSampleEntrustController.java @@ -0,0 +1,16 @@ +package com.zt.plat.module.qms.thirdpartyapi.controller.admin; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore; + +/** + * 样品委托 + */ +@RestController +@RequestMapping("/qms/thirdpartyapi/internal-sample-entrust") +@DeptDataPermissionIgnore(enable = "true") +public class InternalSampleEntrustController { + +} diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/ThirdpartySampleEntrustController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/ThirdpartySampleEntrustController.java new file mode 100644 index 00000000..fef15efd --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/ThirdpartySampleEntrustController.java @@ -0,0 +1,78 @@ +package com.zt.plat.module.qms.thirdpartyapi.controller.admin; + +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.zt.plat.framework.common.pojo.CommonResult; +import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore; +import com.zt.plat.module.qms.business.config.controller.vo.BaseSamplePageReqVO; +import com.zt.plat.module.qms.business.config.controller.vo.BaseSampleRespVO; +import com.zt.plat.module.qms.business.config.controller.vo.MaterialAssayStandardDetailPageReqVO; +import com.zt.plat.module.qms.business.config.controller.vo.MaterialAssayStandardDetailRespVO; +import com.zt.plat.module.qms.business.config.dal.dataobject.MaterialAssayStandardDO; +import com.zt.plat.module.qms.business.config.service.BaseSampleService; +import com.zt.plat.module.qms.business.config.service.MaterialAssayStandardDetailService; +import com.zt.plat.module.qms.business.config.service.MaterialAssayStandardService; +import com.zt.plat.module.qms.thirdpartyapi.controller.vo.ThirdpartySampleEntrustReqVO; +import com.zt.plat.module.qms.thirdpartyapi.service.ThirdpartySampleEntrustService; + +import static com.zt.plat.framework.common.pojo.CommonResult.success; + +import java.util.List; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; + +/** + * 样品委托 + */ +@Tag(name = "通用样品委托接口") +@RestController +@RequestMapping("/qms/thirdpartyapi/sample-entrust") +@DeptDataPermissionIgnore(enable = "true") +public class ThirdpartySampleEntrustController { + + @Resource + private BaseSampleService baseSampleService; + + @Resource + private MaterialAssayStandardService materialAssayStandardService; + + @Resource + private MaterialAssayStandardDetailService materialAssayStandardDetailService; + + @Resource + private ThirdpartySampleEntrustService thirdpartySampleEntrustService; + + @GetMapping("/getBaseSampleList") + @Operation(summary = "获得样品大类管理列表") + public CommonResult getBaseSampleList(BaseSamplePageReqVO reqVO) { + List list = baseSampleService.getBaseSampleList(reqVO); + return success(list); + } + + @GetMapping("/getAssayStandardByBaseSampleId") + @Operation(summary = "根据样品大类id,获取分析标准") + public CommonResult getAssayStandardByBaseSampleId(@RequestParam("baseSampleId") Long baseSampleId) { + List standardList = materialAssayStandardService.queryByBaseSampleID(baseSampleId); + List standardIds = standardList.stream().map(MaterialAssayStandardDO::getId).toList(); + MaterialAssayStandardDetailPageReqVO params = new MaterialAssayStandardDetailPageReqVO(); + params.setStandardIdList(standardIds); + List list = materialAssayStandardDetailService.selectListWithExtend(params); + return success(list); + } + + + @PostMapping("/create") + @Operation(summary = "创建委托登记") + public CommonResult create(@Valid @RequestBody List sampleEntrustReqVOList) { + thirdpartySampleEntrustService.create(sampleEntrustReqVOList); + return success(""); + } +} diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/ThirdpartyXntSampleEntrustController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/ThirdpartyXntSampleEntrustController.java new file mode 100644 index 00000000..1178fb36 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/ThirdpartyXntSampleEntrustController.java @@ -0,0 +1,90 @@ +package com.zt.plat.module.qms.thirdpartyapi.controller.admin; + +import static com.zt.plat.framework.common.pojo.CommonResult.success; + +import java.util.List; + +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.RestController; + +import com.zt.plat.framework.common.pojo.CommonResult; +import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore; +import com.zt.plat.module.qms.thirdpartyapi.controller.vo.ThirdpartyXntSampleEntrustReqVO; +import com.zt.plat.module.qms.thirdpartyapi.service.ThirdpartyXntSampleEntrustService; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; + +/** + * 西南铜样品委托 + */ +@Tag(name = "西南铜样品委托接口") +@RestController +@RequestMapping("/qms/thirdpartyapi/xnt-sample-entrust") +@DeptDataPermissionIgnore(enable = "true") +public class ThirdpartyXntSampleEntrustController { + + @Resource + private ThirdpartyXntSampleEntrustService thirdpartySampleEntrustService; + + @PostMapping("/create-raw-material") + @Operation(summary = "创建原料委托登记") + public CommonResult createRawMaterial(@Valid @RequestBody List sampleEntrustReqVOList) { + thirdpartySampleEntrustService.createRawMaterial(sampleEntrustReqVOList); + return success(""); + } + + @PostMapping("/create-supplier") + @Operation(summary = "创建委供方托登记") + public CommonResult createSupplier(@Valid @RequestBody List sampleEntrustReqVOList) { + thirdpartySampleEntrustService.createSupplier(sampleEntrustReqVOList); + return success(""); + } + + @PostMapping("/create-product") + @Operation(summary = "创建产品委托登记") + public CommonResult createProduct(@Valid @RequestBody List sampleEntrustReqVOList) { + thirdpartySampleEntrustService.createProduct(sampleEntrustReqVOList); + return success(""); + } + + @PostMapping("/create-ipc") + @Operation(summary = "创建中控委托登记") + public CommonResult createInProcessControl(@Valid @RequestBody List sampleEntrustReqVOList) { + thirdpartySampleEntrustService.createInProcessControl(sampleEntrustReqVOList); + return success(""); + } + + @PostMapping("/create-retest") + @Operation(summary = "创建复测委托登记") + public CommonResult createReTest(@Valid @RequestBody List sampleEntrustReqVOList) { + thirdpartySampleEntrustService.createReTest(sampleEntrustReqVOList); + return success(""); + } + + @PostMapping("/create-product-retest") + @Operation(summary = "创建产品复测委托登记") + public CommonResult createProductReTest(@Valid @RequestBody List sampleEntrustReqVOList) { + thirdpartySampleEntrustService.createProductReTest(sampleEntrustReqVOList); + return success(""); + } + + @PostMapping("/create-central-retentin-retest") + @Operation(summary = "创建中心留样委托登记") + public CommonResult createCentralRetentionReTest(@Valid @RequestBody List sampleEntrustReqVOList) { + thirdpartySampleEntrustService.createCentralRetentionReTest(sampleEntrustReqVOList); + return success(""); + } + + @PostMapping("/create-temporary") + @Operation(summary = "创建临时委托委托登记") + public CommonResult createTemporary(@Valid @RequestBody List sampleEntrustReqVOList) { + thirdpartySampleEntrustService.createTemporary(sampleEntrustReqVOList); + return success(""); + } + +} diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/XRFDataController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/XRFDataController.java index db670959..65b305bf 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/XRFDataController.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/admin/XRFDataController.java @@ -15,8 +15,10 @@ import com.zt.plat.module.qms.thirdpartyapi.controller.vo.*; import com.zt.plat.module.qms.thirdpartyapi.service.XRFDataService; import cn.hutool.core.collection.CollUtil; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; +@Tag(name = "荧光取数接口") @RestController @RequestMapping("/qms/thirdpartyapi/xrf-data") @DeptDataPermissionIgnore(enable = "true") diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/vo/ThirdpartySampleEntrustReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/vo/ThirdpartySampleEntrustReqVO.java new file mode 100644 index 00000000..d6729310 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/vo/ThirdpartySampleEntrustReqVO.java @@ -0,0 +1,41 @@ +package com.zt.plat.module.qms.thirdpartyapi.controller.vo; + +import java.io.Serializable; + +import lombok.Data; + +/** + * ThirdpartySampleEntrustReqVO + * 第三方委托创建请求参数 + */ +@Data +public class ThirdpartySampleEntrustReqVO implements Serializable { + + private static final long serialVersionUID = 6635902078096869352L; + + /** 样品大类id **/ + private Long baseSampleId; + + /** 委托样品名称 **/ + private String entrustSampleName; + + /** 委托样品编号 **/ + private String entrustSampleCode; + + /** 委托样品主编号 **/ + private String entrustBaseCode; + + /** 委托样品批次编号 **/ + private String entrustBatchCode; + + /** 送样人,多个以“,”分割 **/ + private String entrustSampleSender; + + /** 送样人ID,多个以“,”分割 **/ + private String entrustSampleSenderIds; + + /** 检测标准检测项目ID,多个以“,”分割 **/ + private String materialAssayStandardDetailIds; + + +} diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/vo/ThirdpartyXntSampleEntrustReqVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/vo/ThirdpartyXntSampleEntrustReqVO.java new file mode 100644 index 00000000..e490ac8e --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/vo/ThirdpartyXntSampleEntrustReqVO.java @@ -0,0 +1,59 @@ +package com.zt.plat.module.qms.thirdpartyapi.controller.vo; + +import java.io.Serializable; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** + * ThirdpartyXntSampleEntrustReqVO + * 西南铜样品委托参数 + */ +@Data +public class ThirdpartyXntSampleEntrustReqVO implements Serializable { + + private static final long serialVersionUID = 3149602485085409874L; + + /** 检测对象id **/ + @Schema(description = "检测对象id") + private String limsObjectId; + + /** 检测对象名称 **/ + @Schema(description = "检测对象名称") + private String limsObjectName; + + /** 委托样品编号 **/ + @Schema(description = "样品编号") + private String entrustSampleCode; + + /** 委托样品主编号 **/ + @Schema(description = "主样编号,标识那几包样品是一组,须全局唯一") + private String entrustGroupCode; + + /** 委托样品批次编号 **/ + @Schema(description = "产品批号") + private String entrustBatchCode; + + /** 送样人,多个以“,”分割 **/ +// @Schema(description = "送样人,多个以“,”分割") +// private String entrustSampleSender; + + /** 送样人ID,多个以“,”分割 **/ + @Schema(description = "送样人Id,多个以“,”分割") + private String entrustSampleSenderIds; + + /** 委托样品量 **/ + @Schema(description = "委托样品量") + private String entrustSampleQuantity; + + /** 委托样品量单位 **/ + @Schema(description = "委托样品量单位") + private String entrustSampleQuantityUnit; + + /** 分析级别 **/ + @Schema(description = "分析级别") + private String assayLevel; + + @Schema(description = "检测项目id列表") + private String assayProjectIds; +} diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/vo/ThirdpartyXntSampleEntrustRespVO.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/vo/ThirdpartyXntSampleEntrustRespVO.java new file mode 100644 index 00000000..6c0404da --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/controller/vo/ThirdpartyXntSampleEntrustRespVO.java @@ -0,0 +1,13 @@ +package com.zt.plat.module.qms.thirdpartyapi.controller.vo; + +import java.io.Serializable; + +/** + * ThirdpartyXntSampleEntrustRespVO + * 委托响应 + */ +public class ThirdpartyXntSampleEntrustRespVO implements Serializable { + + private static final long serialVersionUID = 1493584781611645615L; + +} diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartySampleEntrustService.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartySampleEntrustService.java new file mode 100644 index 00000000..ca0b7072 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartySampleEntrustService.java @@ -0,0 +1,15 @@ +package com.zt.plat.module.qms.thirdpartyapi.service; + +import java.util.List; + +import com.zt.plat.module.qms.thirdpartyapi.controller.vo.ThirdpartySampleEntrustReqVO; + + +/** + * 第三方样品委托服务 + */ +public interface ThirdpartySampleEntrustService { + + void create(List sampleEntrustReqVOList); + +} diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartySampleEntrustServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartySampleEntrustServiceImpl.java new file mode 100644 index 00000000..a0b8edba --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartySampleEntrustServiceImpl.java @@ -0,0 +1,78 @@ +package com.zt.plat.module.qms.thirdpartyapi.service; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.yomahub.liteflow.flow.LiteflowResponse; +import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO; +import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import com.zt.plat.module.qms.business.bus.liteflow.param.SampleEntrustDetail; +import com.zt.plat.module.qms.business.bus.liteflow.param.SampleEntrustDetailProject; +import com.zt.plat.module.qms.business.bus.liteflow.param.SampleEntrustParam; +import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleEntrustContext; +import com.zt.plat.module.qms.business.bus.service.SampleEntrustService; +import com.zt.plat.module.qms.enums.QmsCommonConstant; +import com.zt.plat.module.qms.thirdpartyapi.controller.vo.ThirdpartySampleEntrustReqVO; + +import jakarta.annotation.Resource; + +/** + * 第三方样品委托服务 + */ +@Service +public class ThirdpartySampleEntrustServiceImpl implements ThirdpartySampleEntrustService { + + @Resource + private SampleEntrustService sampleEntrustService; + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(List sampleEntrustReqVOList) { + List sampleEntrustDetailList = new ArrayList<>(); + SampleEntrustParam sampleEntrustParam = new SampleEntrustParam(); + sampleEntrustParam.setCreateWay("interface"); + sampleEntrustParam.setEntrustTime(LocalDateTime.now()); + sampleEntrustParam.setEntrustType("entrust_inspection"); + sampleEntrustParam.setConfigEntrustSourceKey("jywt"); + sampleEntrustParam.setSampleQuantity(sampleEntrustReqVOList.size()); + + for (ThirdpartySampleEntrustReqVO thirdpartySampleEntrustReqVO : sampleEntrustReqVOList) { + List sampleEntrustDetailProjectList = new ArrayList<>(); + SampleEntrustDetail sampleEntrustDetail = new SampleEntrustDetail(); + sampleEntrustDetail.setBaseSampleId(thirdpartySampleEntrustReqVO.getBaseSampleId()); + sampleEntrustDetail.setEntrustSampleCode(thirdpartySampleEntrustReqVO.getEntrustSampleCode()); + sampleEntrustDetail.setEntrustSampleName(thirdpartySampleEntrustReqVO.getEntrustSampleName()); + sampleEntrustDetail.setSampleName(thirdpartySampleEntrustReqVO.getEntrustSampleName()); + + String materialAssayStandardDetailIds = thirdpartySampleEntrustReqVO.getMaterialAssayStandardDetailIds(); + List materialAssayStandardDetailIdList = Arrays.asList(materialAssayStandardDetailIds.split(",")); + for (String materialAssayStandardDetailId : materialAssayStandardDetailIdList) { + SampleEntrustDetailProject sampleEntrustDetailProject = new SampleEntrustDetailProject(); + sampleEntrustDetailProject.setMaterialAssayStandardDetailId(Long.parseLong(materialAssayStandardDetailId)); + sampleEntrustDetailProject.setIsEnabled(QmsCommonConstant.YES); + sampleEntrustDetailProjectList.add(sampleEntrustDetailProject); + } + + sampleEntrustDetail.setSampleEntrustDetailProjectList(sampleEntrustDetailProjectList); + + sampleEntrustDetailList.add(sampleEntrustDetail); + } + + + sampleEntrustParam.setSampleEntrustDetailList(sampleEntrustDetailList); + + LiteflowResponse liteflowResponse = sampleEntrustService.create(sampleEntrustParam); + SampleEntrustContext sampleEntrustContext = liteflowResponse.getContextBean(SampleEntrustContext.class); + BusinessSampleEntrustRegistrationDO sampleEntrustRegistration = sampleEntrustContext.getSampleEntrustRegistration(); + List sampleEntrustDetailList2 = sampleEntrustContext.getSampleEntrustDetailList(); + + } + + + +} diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartyXntSampleEntrustService.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartyXntSampleEntrustService.java new file mode 100644 index 00000000..3c6b7f0d --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartyXntSampleEntrustService.java @@ -0,0 +1,60 @@ +package com.zt.plat.module.qms.thirdpartyapi.service; + +import java.util.List; + +import com.zt.plat.module.qms.thirdpartyapi.controller.vo.ThirdpartyXntSampleEntrustReqVO; + +/** + * 西南铜委托服务接口 + */ +public interface ThirdpartyXntSampleEntrustService { + + /** + * 创建原料委托 + * @param sampleEntrustReqVOList + */ + void createRawMaterial(List sampleEntrustReqVOList); + + /** + * 创建供方委托 + * @param sampleEntrustReqVOList + */ + void createSupplier(List sampleEntrustReqVOList); + + /** + * 创建产品委托 + * @param sampleEntrustReqVOList + */ + void createProduct(List sampleEntrustReqVOList); + + /** + * 创建中控委托 + * @param sampleEntrustReqVOList + */ + void createInProcessControl(List sampleEntrustReqVOList); + + /** + * 创建复测委托 + * @param sampleEntrustReqVOList + */ + void createReTest(List sampleEntrustReqVOList); + + /** + * 创建产品复测委托 + * @param sampleEntrustReqVOList + */ + void createProductReTest(List sampleEntrustReqVOList); + + /** + * 创建中心留样复测委托 + * @param sampleEntrustReqVOList + */ + void createCentralRetentionReTest(List sampleEntrustReqVOList); + + /** + * 创建临时样委托 + * @param sampleEntrustReqVOList + */ + void createTemporary(List sampleEntrustReqVOList); + +} diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartyXntSampleEntrustServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartyXntSampleEntrustServiceImpl.java new file mode 100644 index 00000000..69df46e0 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/thirdpartyapi/service/ThirdpartyXntSampleEntrustServiceImpl.java @@ -0,0 +1,231 @@ +package com.zt.plat.module.qms.thirdpartyapi.service; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.yomahub.liteflow.flow.LiteflowResponse; +import com.zt.plat.module.qms.business.bus.liteflow.param.SampleEntrustDetail; +import com.zt.plat.module.qms.business.bus.liteflow.param.SampleEntrustDetailProject; +import com.zt.plat.module.qms.business.bus.liteflow.param.SampleEntrustParam; +import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleEntrustContext; +import com.zt.plat.module.qms.business.bus.service.SampleEntrustService; +import com.zt.plat.module.qms.business.config.controller.vo.MaterialAssayStandardDetailRespVO; +import com.zt.plat.module.qms.business.config.dal.mapper.MaterialAssayStandardDetailMapper; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherBaseSampleDO; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherDictionaryBusinessDO; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherDictionaryProjectDO; +import com.zt.plat.module.qms.business.other.dal.dataobject.OtherSystemUserDO; +import com.zt.plat.module.qms.business.other.dal.mapper.OtherBaseSampleMapper; +import com.zt.plat.module.qms.business.other.dal.mapper.OtherDictionaryBusinessMapper; +import com.zt.plat.module.qms.business.other.dal.mapper.OtherDictionaryProjectMapper; +import com.zt.plat.module.qms.business.other.dal.mapper.OtherSystemUserMapper; +import com.zt.plat.module.qms.enums.QmsCommonConstant; +import com.zt.plat.module.qms.thirdpartyapi.controller.vo.ThirdpartyXntSampleEntrustReqVO; + +import jakarta.annotation.Resource; + +/** + * 西南铜委托创建服务 + */ +@Service +public class ThirdpartyXntSampleEntrustServiceImpl implements ThirdpartyXntSampleEntrustService { + + @Resource + private SampleEntrustService sampleEntrustService; + + @Resource + private OtherBaseSampleMapper otherBaseSampleMapper; + + @Resource + private OtherSystemUserMapper otherSystemUserMapper; + + @Resource + private OtherDictionaryProjectMapper otherDictionaryProjectMapper; + + @Resource + private OtherDictionaryBusinessMapper otherDictionaryBusinessMapper; + + @Resource + private MaterialAssayStandardDetailMapper materialAssayStandardDetailMapper; + + @Override + @Transactional(rollbackFor = Exception.class) + public void createRawMaterial(List sampleEntrustReqVOList) { + SampleEntrustParam sampleEntrustParam = buildSampleEntrustParam(sampleEntrustReqVOList, QmsCommonConstant.ENTRUST_SOURCE_XNT_RAW_MATERIAL); + LiteflowResponse liteflowResponse = sampleEntrustService.create(sampleEntrustParam); + SampleEntrustContext sampleEntrustContext = liteflowResponse.getContextBean(SampleEntrustContext.class); + + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void createSupplier(List sampleEntrustReqVOList) { + SampleEntrustParam sampleEntrustParam = buildSampleEntrustParam(sampleEntrustReqVOList, QmsCommonConstant.ENTRUST_SOURCE_XNT_SUPPLIER); + LiteflowResponse liteflowResponse = sampleEntrustService.create(sampleEntrustParam); + SampleEntrustContext sampleEntrustContext = liteflowResponse.getContextBean(SampleEntrustContext.class); + + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void createProduct(List sampleEntrustReqVOList) { + SampleEntrustParam sampleEntrustParam = buildSampleEntrustParam(sampleEntrustReqVOList, QmsCommonConstant.ENTRUST_SOURCE_XNT_PRODUCT); + LiteflowResponse liteflowResponse = sampleEntrustService.create(sampleEntrustParam); + SampleEntrustContext sampleEntrustContext = liteflowResponse.getContextBean(SampleEntrustContext.class); + + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void createInProcessControl(List sampleEntrustReqVOList) { + SampleEntrustParam sampleEntrustParam = buildSampleEntrustParam(sampleEntrustReqVOList, QmsCommonConstant.ENTRUST_SOURCE_XNT_IN_PROCESS_CONTROL); + LiteflowResponse liteflowResponse = sampleEntrustService.create(sampleEntrustParam); + SampleEntrustContext sampleEntrustContext = liteflowResponse.getContextBean(SampleEntrustContext.class); + + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void createReTest(List sampleEntrustReqVOList) { + SampleEntrustParam sampleEntrustParam = buildSampleEntrustParam(sampleEntrustReqVOList, QmsCommonConstant.ENTRUST_SOURCE_XNT_RETEST); + LiteflowResponse liteflowResponse = sampleEntrustService.create(sampleEntrustParam); + SampleEntrustContext sampleEntrustContext = liteflowResponse.getContextBean(SampleEntrustContext.class); + + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void createProductReTest(List sampleEntrustReqVOList) { + SampleEntrustParam sampleEntrustParam = buildSampleEntrustParam(sampleEntrustReqVOList, QmsCommonConstant.ENTRUST_SOURCE_XNT_PRODUCT_RETEST); + LiteflowResponse liteflowResponse = sampleEntrustService.create(sampleEntrustParam); + SampleEntrustContext sampleEntrustContext = liteflowResponse.getContextBean(SampleEntrustContext.class); + + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void createCentralRetentionReTest(List sampleEntrustReqVOList) { + SampleEntrustParam sampleEntrustParam = buildSampleEntrustParam(sampleEntrustReqVOList, QmsCommonConstant.ENTRUST_SOURCE_XNT_CENTRAL_RETENTIN_RETEST); + LiteflowResponse liteflowResponse = sampleEntrustService.create(sampleEntrustParam); + SampleEntrustContext sampleEntrustContext = liteflowResponse.getContextBean(SampleEntrustContext.class); + + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void createTemporary(List sampleEntrustReqVOList) { + //构建临时样委托参数 + SampleEntrustParam sampleEntrustParam = buildTemporarySampleEntrustParam(sampleEntrustReqVOList, QmsCommonConstant.ENTRUST_SOURCE_XNT_TEMPORARY); + LiteflowResponse liteflowResponse = sampleEntrustService.create(sampleEntrustParam); + SampleEntrustContext sampleEntrustContext = liteflowResponse.getContextBean(SampleEntrustContext.class); + + } + + private SampleEntrustParam buildTemporarySampleEntrustParam(List sampleEntrustReqVOList, String configEntrustSourceKey) { + SampleEntrustParam sampleEntrustParam = new SampleEntrustParam(); + sampleEntrustParam.setCreateWay("interface"); + sampleEntrustParam.setEntrustTime(LocalDateTime.now()); + sampleEntrustParam.setEntrustType(QmsCommonConstant.ENTRUST_REGISTRATION); + sampleEntrustParam.setConfigEntrustSourceKey(configEntrustSourceKey); + sampleEntrustParam.setEntrustUnit("西南铜"); + sampleEntrustParam.setSampleQuantity(sampleEntrustReqVOList.size()); + + sampleEntrustParam.setSampleSendDate(LocalDateTime.now()); + + return sampleEntrustParam; + } + + private SampleEntrustParam buildSampleEntrustParam(List sampleEntrustReqVOList, String configEntrustSourceKey) { + SampleEntrustParam sampleEntrustParam = new SampleEntrustParam(); + sampleEntrustParam.setCreateWay("interface"); + sampleEntrustParam.setEntrustTime(LocalDateTime.now()); + sampleEntrustParam.setEntrustType(QmsCommonConstant.ENTRUST_REGISTRATION); + sampleEntrustParam.setConfigEntrustSourceKey(configEntrustSourceKey); + sampleEntrustParam.setEntrustUnit("西南铜"); + sampleEntrustParam.setSampleQuantity(sampleEntrustReqVOList.size()); + + sampleEntrustParam.setSampleSendDate(LocalDateTime.now()); + + List limsObjectIdList = sampleEntrustReqVOList.stream().map(m -> m.getLimsObjectId()).distinct().collect(Collectors.toList()); + List otherBaseSampleDOList = otherBaseSampleMapper.selectByOtherSystemAndOtherIds(QmsCommonConstant.OTHER_SYSTEM_XNT_LIMS, limsObjectIdList); + List baseSampleIdList = otherBaseSampleDOList.stream().map(m -> m.getBaseSampleId()).distinct().collect(Collectors.toList()); + List materialAssayStandardDetailRespList = materialAssayStandardDetailMapper.selectByBaseSampleIds(baseSampleIdList); + //获取第三方送样人id列表 + List otherSendUserIdList = sampleEntrustReqVOList.stream().flatMap(m -> { + // 按逗号分割 + String[] parts = m.getEntrustSampleSenderIds().split(","); + + // 转为 Stream 并处理空格 (trim),同时过滤掉分割后可能产生的空字符串 + return Arrays.stream(parts) + .map(String::trim) // 去除每个ID前后的空格 + .filter(s -> !s.isEmpty()); // 过滤掉空项(例如 "101,,102" 中间的空项) + }).distinct().collect(Collectors.toList()); + + List otherSystemUserDOList = otherSystemUserMapper.selectByOtherSystemAndOtherIds(QmsCommonConstant.OTHER_SYSTEM_XNT_LIMS, otherSendUserIdList); + + List otherDictionaryBusinessDOList = otherDictionaryBusinessMapper.selectByOtherSystem(QmsCommonConstant.OTHER_SYSTEM_XNT_LIMS); + + List sampleEntrustDetailList = new ArrayList<>(); + for (ThirdpartyXntSampleEntrustReqVO thirdpartySampleEntrustReqVO : sampleEntrustReqVOList) { + OtherBaseSampleDO otherBaseSampleDO = otherBaseSampleDOList.stream().filter(f -> f.getOtherId().equals(thirdpartySampleEntrustReqVO.getLimsObjectId())).findFirst().orElse(null); + + SampleEntrustDetail sampleEntrustDetail = new SampleEntrustDetail(); + sampleEntrustDetail.setBaseSampleId(otherBaseSampleDO.getBaseSampleId()); + sampleEntrustDetail.setEntrustGroupCode(thirdpartySampleEntrustReqVO.getEntrustGroupCode()); + sampleEntrustDetail.setEntrustBatchCode(thirdpartySampleEntrustReqVO.getEntrustBatchCode()); + sampleEntrustDetail.setEntrustDualFlag(null); + sampleEntrustDetail.setEntrustSampleName(thirdpartySampleEntrustReqVO.getLimsObjectName()); + sampleEntrustDetail.setEntrustSampleCode(thirdpartySampleEntrustReqVO.getEntrustSampleCode()); + sampleEntrustDetail.setSampleName(thirdpartySampleEntrustReqVO.getLimsObjectName()); + sampleEntrustDetail.setSampleCode(thirdpartySampleEntrustReqVO.getEntrustSampleCode()); + if (StringUtils.isNotBlank(thirdpartySampleEntrustReqVO.getEntrustSampleQuantity())) { + sampleEntrustDetail.setIsWeighing(QmsCommonConstant.YES); + } else { + sampleEntrustDetail.setIsWeighing(QmsCommonConstant.NO); + } + sampleEntrustDetail.setEntrustSampleQuantity(thirdpartySampleEntrustReqVO.getEntrustSampleQuantity()); + sampleEntrustDetail.setEntrustSampleQuantityUnit(thirdpartySampleEntrustReqVO.getEntrustSampleQuantityUnit()); + + //处理分析等级 + if (StringUtils.isNotBlank(thirdpartySampleEntrustReqVO.getAssayLevel())) { + OtherDictionaryBusinessDO otherDictionaryBusinessDO = otherDictionaryBusinessDOList.stream().filter(f -> f.getOtherKey().equals(thirdpartySampleEntrustReqVO.getAssayLevel())).findFirst().orElse(null); + sampleEntrustDetail.setAssayLevel(Integer.parseInt(otherDictionaryBusinessDO.getDictionaryBusinessKey())); + } + + String entrustSampleSenderIds = thirdpartySampleEntrustReqVO.getEntrustSampleSenderIds(); + String sampleSender = otherSystemUserDOList.stream().filter(f -> Arrays.asList(entrustSampleSenderIds.split(",")).contains(f.getOtherId())).map(m -> m.getUserRealName()).collect(Collectors.joining(",")); + sampleEntrustParam.setSampleSender(sampleSender); + + String assayProjectIds = thirdpartySampleEntrustReqVO.getAssayProjectIds(); + List assayProjectIdList = Arrays.asList(assayProjectIds.split(",")); + List otherDictionaryProjectDOList = otherDictionaryProjectMapper.selectByOtherSystemAndOtherIds(QmsCommonConstant.OTHER_SYSTEM_XNT_LIMS, assayProjectIdList); + List dictionaryProjectIdList = otherDictionaryProjectDOList.stream().map(m -> m.getDictionaryProjectId()).collect(Collectors.toList()); + List currMaterialAssayStandardDetailList = materialAssayStandardDetailRespList.stream().filter(f -> f.getBaseSampleId().equals(otherBaseSampleDO.getBaseSampleId()) && dictionaryProjectIdList.contains(f.getDictionaryProjectId())).collect(Collectors.toList()); + String assayProjectShowName = currMaterialAssayStandardDetailList.stream().map(m -> m.getDictionaryProjectShowName()).collect(Collectors.joining(",")); + sampleEntrustDetail.setAssayProject(assayProjectShowName); + List sampleEntrustDetailProjectList = new ArrayList<>(); + for (MaterialAssayStandardDetailRespVO currMaterialAssayStandardDetail : currMaterialAssayStandardDetailList) { + SampleEntrustDetailProject sampleEntrustDetailProject = new SampleEntrustDetailProject(); + sampleEntrustDetailProject.setMaterialAssayStandardDetailId(currMaterialAssayStandardDetail.getId()); + sampleEntrustDetailProject.setIsEnabled(QmsCommonConstant.YES); + sampleEntrustDetailProjectList.add(sampleEntrustDetailProject); + } + sampleEntrustDetail.setSampleEntrustDetailProjectList(sampleEntrustDetailProjectList); + + sampleEntrustDetailList.add(sampleEntrustDetail); + } + + + sampleEntrustParam.setSampleEntrustDetailList(sampleEntrustDetailList); + + + return sampleEntrustParam; + } +} diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/bus/dal/mapper/BusinessSampleEntrustUnStandardProjectMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/bus/dal/mapper/BusinessSampleEntrustUnStandardProjectMapper.xml new file mode 100644 index 00000000..8170bb93 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/bus/dal/mapper/BusinessSampleEntrustUnStandardProjectMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherBaseSampleMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherBaseSampleMapper.xml new file mode 100644 index 00000000..63d0f4b5 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherBaseSampleMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryBusinessMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryBusinessMapper.xml new file mode 100644 index 00000000..f138d8cf --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryBusinessMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryProjectMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryProjectMapper.xml new file mode 100644 index 00000000..bf0e4c94 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherDictionaryProjectMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemConfigMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemConfigMapper.xml new file mode 100644 index 00000000..a7386dcf --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemConfigMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemUserMapper.xml b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemUserMapper.xml new file mode 100644 index 00000000..699dc974 --- /dev/null +++ b/zt-module-qms/zt-module-qms-server/src/main/resources/com/zt/plat/module/qms/business/other/dal/mapper/OtherSystemUserMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file