Przeglądaj źródła

部件字典管理接口和部件po

shiyue 6 miesięcy temu
rodzic
commit
e27f05890e

+ 309 - 0
energy-manage-service/src/main/java/com/energy/manage/service/domain/dto/units/UnitDto.java

@@ -0,0 +1,309 @@
+package com.energy.manage.service.domain.dto.units;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * 保存更新部件信息相关参数
+ */
+@Getter
+@Setter
+@ApiModel("保存更新部件信息相关参数")
+public class UnitDto {
+
+    @ApiModelProperty("主轴相关参数")
+    UnitBearingsDto unitBearingsDto;
+
+
+    @ApiModelProperty("齿轮箱相关参数")
+    UnitGearDto unitGearDto;
+
+
+    @ApiModelProperty("发电机相关参数")
+    UnitDynamoDto unitDynamoDto;
+
+
+    /**
+     * 齿轮箱相关参数
+     */
+    @Setter
+    @Getter
+    @ApiModel
+    public static class UnitGearDto{
+
+        /**
+         * 主键
+         */
+        private Integer id;
+
+        /**
+         * 部件编号
+         */
+        private String code;
+        /**
+         * 机型编号
+         */
+        private String millTypeCode;
+        /**
+         * 润滑油品牌
+         */
+        private String lubricantBrand;
+        /**
+         * 润滑油型号
+         */
+        private String lubricantModel;
+
+
+        /**
+         * 齿轮箱结构集合
+         */
+        List<UnitGearboxStructureDto> unitGearboxStructureDtoList;
+
+
+        /**
+         * 齿轮箱结构集合
+         */
+        List<UnitGearboxBearingsDto> unitGearboxBearingsDtoList;
+
+
+    }
+
+    /**
+     * 齿轮箱结构表
+     */
+    @Setter
+    @Getter
+    @ApiModel
+    public static class UnitGearboxStructureDto{
+
+        private Integer id;
+
+        /**
+         * 齿轮箱总表编号
+         */
+        private String gearboxCode;
+        /**
+         * 齿轮箱结构类型;1.行星轮2.平行轮
+         */
+        private String untitled;
+        /**
+         * 齿轮箱结构等级;sort_num1,2......
+         */
+        private Integer planetaryGearGrade;
+        /**
+         * 大齿轮齿数
+         */
+        private String largeGearTeethCount;
+        /**
+         * 小齿轮齿数
+         */
+        private String smallGearTeethCount;
+        /**
+         * 轴承品牌
+         */
+        private String bearingBrand;
+        /**
+         * 轴承型号
+         */
+        private String bearingModel;
+        /**
+         * 齿圈齿数
+         */
+        private String gearRingTeethCount;
+        /**
+         * 太阳轮齿数
+         */
+        private String sunWheelTeethCount;
+        /**
+         * 行星轮个数
+         */
+        private String planetWheelCount;
+        /**
+         * 行星轮齿数
+         */
+        private String planetWheelTeethCount;
+        /**
+         * 太阳轮轴承品牌
+         */
+        private String sunWheelBearingBrand;
+        /**
+         * 太阳轮轴承型号
+         */
+        private String sunWheelBearingModel;
+
+
+    }
+
+
+    /**
+     * 齿轮箱轴承
+     */
+    @Setter
+    @Getter
+    @ApiModel
+    public static class UnitGearboxBearingsDto{
+
+        private Integer id;
+
+        /**
+         * 齿轮箱编号
+         */
+        private String gearboxCode;
+        /**
+         * 齿轮箱轴承类型
+         */
+        private Integer parallelWheelGrade;
+        /**
+         * 齿轮箱轴承编号
+         */
+        private String gearboxBearingNumber;
+        /**
+         * 齿轮箱轴承级别
+         */
+        private String gearboxBearingLevel;
+        /**
+         * 轴承品牌
+         */
+        private String bearingBrand;
+        /**
+         * 轴承型号
+         */
+        private String bearingModel;
+        /**
+         * 齿圈齿数
+         */
+        private String gearRingTeethCount;
+        /**
+         * 轴承-RS品牌
+         */
+        private String bearingRsBrand;
+        /**
+         * 轴承-RS型号
+         */
+        private String bearingRsModel;
+        /**
+         * 轴承-GS品牌
+         */
+        private String bearingGsBrand;
+        /**
+         * 轴承-GS型号
+         */
+        private String bearingGsModel;
+
+
+    }
+
+
+
+    /**
+     * 主轴相关参数
+     */
+    @Setter
+    @Getter
+    @ApiModel
+    public static class UnitBearingsDto {
+
+        /**
+         * 主键
+         */
+        private Integer id;
+
+        /**
+         * 主轴部件编号;主轴部件编号
+         */
+        private String code;
+        /**
+         * 机型编号
+         */
+        private String millTypeCode;
+        /**
+         * 润滑油品牌
+         */
+        private String lubricantBrand;
+        /**
+         * 润滑油型号
+         */
+        private String lubricantModel;
+        /**
+         * 前轴承品牌
+         */
+        private String frontBearingBrand;
+        /**
+         * 前轴承型号
+         */
+        private String frontBearingModel;
+        /**
+         * 后轴承品牌
+         */
+        private String rearBearingBrand;
+        /**
+         * 后轴承型号
+         */
+        private String rearBearingModel;
+        /**
+         * 删除状态;删除状态
+         */
+        private Integer delState;
+
+    }
+
+
+    /**
+     * 发电机相关参数
+     */
+    @Setter
+    @Getter
+    @ApiModel
+    public static class UnitDynamoDto {
+
+        /**
+         * 主键
+         */
+        private Integer id;
+
+        /**
+         * 机型编号
+         */
+        private String millTypeCode;
+        /**
+         * 极对数
+         */
+        private Integer polePairs;
+        /**
+         * 冷却方式
+         */
+        private Integer coolingMethod;
+        /**
+         * 润滑油品牌
+         */
+        private String lubricantBrand;
+        /**
+         * 润滑油型号
+         */
+        private String lubricantModel;
+        /**
+         * 驱动端轴承品牌
+         */
+        private String driveEndBearingBrand;
+        /**
+         * 驱动端轴承型号
+         */
+        private String driveEndBearingModel;
+        /**
+         * 非驱动端轴承品牌
+         */
+        private String nonDriveEndBearingBrand;
+        /**
+         * 非驱动端轴承型号
+         */
+        private String nonDriveEndBearingModel;
+
+
+    }
+
+
+}

+ 10 - 0
energy-manage-service/src/main/java/com/energy/manage/service/service/units/UnitService.java

@@ -2,6 +2,7 @@ package com.energy.manage.service.service.units;
 
 import com.energy.manage.service.domain.dto.units.UnitDictBrandModelDto;
 import com.energy.manage.service.domain.dto.units.UnitDictRoutineDto;
+import com.energy.manage.service.domain.dto.units.UnitDto;
 import com.energy.manage.service.domain.vo.units.UnitDictRoutineListVo;
 
 import java.util.List;
@@ -26,5 +27,14 @@ public interface UnitService {
     List<String> getBrandModelNameOrModelNumber (UnitDictBrandModelDto unitDictBrandModelDto);
 
 
+    /**
+     * 更新部件相关信息
+     * @param unitDto
+     * @return
+     */
+    boolean modificationUnit(UnitDto unitDto);
+
+
+
 
 }

+ 26 - 2
energy-manage-service/src/main/java/com/energy/manage/service/service/units/impl/UnitServiceImpl.java

@@ -14,8 +14,7 @@ import com.energy.manage.service.domain.dto.units.*;
 import com.energy.manage.service.domain.vo.units.UnitDictBrandModelVo;
 import com.energy.manage.service.domain.vo.units.UnitDictConstantsVo;
 import com.energy.manage.service.domain.vo.units.UnitDictRoutineListVo;
-import com.energy.manage.service.mappers.units.UnitDictBrandModelMapper;
-import com.energy.manage.service.mappers.units.UnitDictConstantsMapper;
+import com.energy.manage.service.mappers.units.*;
 import com.energy.manage.service.service.cache.CacheService;
 import com.energy.manage.service.service.dict.DictConstantsService;
 import com.energy.manage.service.service.units.UnitDictConstantsService;
@@ -43,6 +42,21 @@ public class UnitServiceImpl implements UnitService {
     @Autowired
     private UnitDictConstantsService unitDictConstantsService;
 
+    @Autowired
+    private UnitBearingsMapper unitBearingsMapper;
+
+    @Autowired
+    private UnitDynamoMapper unitDynamoMapper;
+
+    @Autowired
+    private UnitGearboxMapper unitGearboxMapper;
+
+    @Autowired
+    private UnitGearboxStructureMapper unitGearboxStructureMapper;
+
+    @Autowired
+    private UnitGearboxBearingsMapper unitGearboxBearingsMapper;
+
 
     @Override
     public List<UnitDictRoutineListVo> getUnitDictRoutineList(UnitDictRoutineDto unitDictRoutineDto) {
@@ -63,4 +77,14 @@ public class UnitServiceImpl implements UnitService {
     public List<String> getBrandModelNameOrModelNumber(UnitDictBrandModelDto unitDictBrandModelDto) {
         return unitDictConstantsService.getUnitDictBrandModelList(unitDictBrandModelDto);
     }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public boolean modificationUnit(UnitDto unitDto) {
+
+
+
+
+        return false;
+    }
 }