无关风月
2025-06-10 d066ff34d052bd0597c69fec0b6bd3460bd0ac2b
菌种库所有代码
1个文件已添加
1个文件已修改
54 ■■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBreedingAndPreservationController.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/dto/TConfirmBreedingAndPreservationDTO.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBreedingAndPreservationController.java
@@ -4,6 +4,7 @@
import com.ruoyi.common.core.domain.BaseModel;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.system.dto.TConfirmBreedingAndPreservationDTO;
import com.ruoyi.system.model.*;
import java.util.List;
@@ -90,6 +91,9 @@
            return R.fail(401,"登陆失效");
        }
        TBreedingAndPreservationDTO dto = JSON.parseObject(param,TBreedingAndPreservationDTO.class);
        if (dto.getStatus()==3){
            dto.setIsDraft(1);
        }
        breedingAndPreservationService.save(dto);
        List<TSeparationOfCultureDishes> separationOfCultureDishesList = dto.getSeparationOfCultureDishesList();
        for (TSeparationOfCultureDishes tSeparationOfCultureDishes : separationOfCultureDishesList) {
@@ -111,7 +115,7 @@
            tSeparationOfCultureDishes.setBreedingPreserveId(dto.getId());
        }
        culturePreservationService.saveBatch(culturePreservations);
        if (dto.getStatus()==2){
        if (dto.getStatus()!=null&&dto.getStatus()==2){
            // 新增消息
            TNotice tNotice = new TNotice();
            List<String> collect = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getUserId, tokenService.getLoginUser().getUserId())
@@ -148,6 +152,11 @@
            return R.fail(401,"登陆失效");
        }
        TBreedingAndPreservationDTO dto = JSON.parseObject(param,TBreedingAndPreservationDTO.class);
        if (dto.getStatus()==3){
            dto.setIsDraft(1);
        }else{
            dto.setIsDraft(0);
        }
        breedingAndPreservationService.updateById(dto);
        List<TSeparationOfCultureDishes> separationOfCultureDishesList = dto.getSeparationOfCultureDishesList();
        for (TSeparationOfCultureDishes tSeparationOfCultureDishes : separationOfCultureDishesList) {
@@ -195,7 +204,33 @@
        }
        return R.ok();
    }
    @Log(title = "接种斜面记录确认入库", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "接种斜面记录确认入库",response = TConfirmBreedingAndPreservationDTO.class)
    @PostMapping(value = "/api/t-breeding-and-preservation/vaccinationSlopesConfirm")
    public R<Boolean> vaccinationSlopesConfirm(@RequestBody String param) {
        Long userId = tokenService.getLoginUser().getUserId();
        TConfirmBreedingAndPreservationDTO dto = JSON.parseObject(param,TConfirmBreedingAndPreservationDTO.class);
        TVaccinationSlope byId = vaccinationSlopeService.getById(dto.getId());
        byId.setPreserveId(userId+"");
        byId.setPreserveTime(LocalDateTime.now());
        byId.setPreserveSignature(dto.getPreserveSignature());
        vaccinationSlopeService.updateById(byId);
        return R.ok();
    }
    @Log(title = "菌种保藏记录确认入库", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "菌种保藏记录确认入库",response = TConfirmBreedingAndPreservationDTO.class)
    @PostMapping(value = "/api/t-breeding-and-preservation/culturePreservationsConfirm")
    public R<Boolean> culturePreservationsConfirm(@RequestBody String param) {
        Long userId = tokenService.getLoginUser().getUserId();
        TConfirmBreedingAndPreservationDTO dto = JSON.parseObject(param,TConfirmBreedingAndPreservationDTO.class);
        TCulturePreservation byId = culturePreservationService.getById(dto.getId());
        byId.setPreserveId(userId+"");
        byId.setPreserveTime(LocalDateTime.now());
        byId.setPreserveSignature(dto.getPreserveSignature());
        culturePreservationService.updateById(byId);
        return R.ok();
    }
    //@PreAuthorize("@ss.hasPermi('system:breedingAndPreservation:detail')")
    @ApiOperation(value = "选育保藏记录详情")
    @GetMapping(value = "/open/t-breeding-and-preservation/getDetailById")
ruoyi-system/src/main/java/com/ruoyi/system/dto/TConfirmBreedingAndPreservationDTO.java
New file
@@ -0,0 +1,17 @@
package com.ruoyi.system.dto;
import com.ruoyi.system.model.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(value = "菌种工程师确认入库DTO")
public class TConfirmBreedingAndPreservationDTO {
    @ApiModelProperty("保藏人签名")
    private String preserveSignature;
    @ApiModelProperty("数据id")
    private String id;
}