无关风月
2026-01-17 4a4d2741c5962dc0e5d7101b3435c2ab8312ff8a
菌种库所有代码
2个文件已添加
21个文件已修改
7831 ■■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TPedigreeChartController.java 423 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTrainLibraryController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-prod.yml 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-test.yml 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application.yml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/core/controller/FileController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/dto/TPedigreeChartDetailCountDTO.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TPedigreeChartMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/model/TPedigreeChart.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/model/TPedigreeChartDetail.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/model/TTrainLibrary.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/TPedigreeChartDetailConfirmCountDTO.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/TPedigreeChartQuery.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/TTrainLibraryQuery.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/TPedigreeChartService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPedigreeChartServiceImpl.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/vo/TPedigreeChartDetailVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TPedigreeChartMapper.xml 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sql/strain_library.sql 7174 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TPedigreeChartController.java
@@ -18,6 +18,7 @@
import com.ruoyi.system.dto.*;
import com.ruoyi.system.model.*;
import com.ruoyi.system.query.TPedigreeChartConfirmQuery;
import com.ruoyi.system.query.TPedigreeChartDetailConfirmCountDTO;
import com.ruoyi.system.query.TPedigreeChartDetailQuery;
import com.ruoyi.system.query.TPedigreeChartQuery;
import com.ruoyi.system.service.*;
@@ -28,6 +29,7 @@
import io.swagger.annotations.ApiOperation;
import org.checkerframework.checker.units.qual.C;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -72,20 +74,21 @@
        TPedigreeChartQuery query = JSON.parseObject(param, TPedigreeChartQuery.class);
        SysUser sysUser = sysUserService.selectUserById(tokenService.getLoginUser().getUserId());
        if (sysUser.getRoleType().equals("2")){
            query.setRoleType(2);
            List<String> allProjectIds = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getUserId, tokenService.getLoginUser().getUserId())
                    .list().stream().map(TProjectTeamStaff::getTeamId).collect(Collectors.toList());
            if (!allProjectIds.isEmpty()){                List<String> projectIds = projectTeamService.lambdaQuery().in(TProjectTeam::getId, allProjectIds)
                        .list().stream().map(TProjectTeam::getId).collect(Collectors.toList());
                if (projectIds.isEmpty()){
                    return R.ok(new PageInfo<>());
                }
                query.setProjectIds(projectIds);
            }else{
                return R.ok(new PageInfo<>());
            }
        }else if (!sysUser.getRoleType().equals("1")){
            query.setRoleType(3);
            List<String> allProjectIds = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getUserId, tokenService.getLoginUser().getUserId())
                    .list().stream().map(TProjectTeamStaff::getTeamId).collect(Collectors.toList());
            if (!allProjectIds.isEmpty()){                List<String> projectIds = projectTeamService.lambdaQuery().in(TProjectTeam::getId, allProjectIds)
@@ -99,6 +102,8 @@
                return R.ok(new PageInfo<>());
            }
        }else{
            query.setRoleType(1);
        }
        return R.ok(pedigreeChartService.pageList(query));
    }
@@ -122,7 +127,8 @@
            String child = JSON.toJSONString(dto.getOne().get(0));
            parent.setJson(child);
        }
        List<String> projectIds = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getUserId, tokenService.getLoginUser().getUserId())
        List<String> projectIds = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getUserId,
                        tokenService.getLoginUser().getUserId())
                .list().stream().map(TProjectTeamStaff::getTeamId).collect(Collectors.toList());
        if (!projectIds.isEmpty()){
            TProjectTeam projectTeam = projectTeamService.lambdaQuery().in(TProjectTeam::getId, projectIds)
@@ -131,6 +137,7 @@
                    .last("limit 1").one();
            parent.setProjectId(projectTeam.getId());
        }
        pedigreeChartService.save(parent);
        if (!dto.getOne().isEmpty()){
            TPedigreeChartParentOneDTO oneLevel = dto.getOne().get(0);
@@ -143,6 +150,12 @@
            oneLevel.setVaccinateSignature(oneLevel.getVaccinateSignature());
            oneLevel.setVaccinateTime(LocalDateTime.now());
            oneLevel.setId(null);
            if (parent.getStatus()==1){
                oneLevel.setAuditStatus(0);
            }else{
                oneLevel.setAuditStatus(1);
            }
            oneLevel.setCodeStatus(parent.getStatus());
            pedigreeChartDetailService.save(oneLevel);
            List<TPedigreeChartParentOneCountDTO> countList = oneLevel.getChildren();
@@ -150,9 +163,18 @@
                TPedigreeChartParentOneCountDTO count = countList.get(0);
                count.setParentId(oneLevel.getId());
                count.setType(2);
                count.setVaccinateId(loginUser.getUserId()+"");
                count.setVaccinateTime(LocalDateTime.now());
                    count.setStatus(1);
                count.setPedigreeChartId(parent.getId());
                count.setId(null);
                if (parent.getStatus()==1){
                    count.setAuditStatus(0);
                }else{
                    count.setAuditStatus(1);
                }
                count.setCodeStatus(parent.getStatus());
                pedigreeChartDetailService.save(count);
                if (count.getChildren()!=null){
@@ -169,17 +191,31 @@
                        tPedigreeChartParentTwoDTO.setStorageTime(LocalDateTime.now());
                        tPedigreeChartParentTwoDTO.setParentId(count.getId());
                        tPedigreeChartParentTwoDTO.setId(null);
                        if (parent.getStatus()==1){
                            tPedigreeChartParentTwoDTO.setAuditStatus(0);
                        }else{
                            tPedigreeChartParentTwoDTO.setAuditStatus(1);
                        }
                        tPedigreeChartParentTwoDTO.setCodeStatus(parent.getStatus());
                        pedigreeChartDetailService.save(tPedigreeChartParentTwoDTO);
                        List<TPedigreeChartParentTwoCountDTO> count1List = tPedigreeChartParentTwoDTO.getChildren();
                        if (!count1List.isEmpty()){
                            // 传代数
                            TPedigreeChartParentTwoCountDTO childCount = count1List.get(0);
                            childCount.setType(2);
                            if (parent.getStatus()==1){
                                count.setAuditStatus(0);
                            }else{
                                count.setAuditStatus(1);
                            }
                            count.setVaccinateId(loginUser.getUserId()+"");
                            count.setVaccinateTime(LocalDateTime.now());
                            childCount.setParentId(tPedigreeChartParentTwoDTO.getId());
                            childCount.setPedigreeChartId(parent.getId());
                            childCount.setStatus(1);
                            childCount.setId(null);
                            childCount.setCodeStatus(parent.getStatus());
                            pedigreeChartDetailService.save(childCount);
                            if (childCount.getChildren()!=null){
                                for (TPedigreeChartParentThreeDTO tPedigreeChartParentThreeDTO : childCount.getChildren()) {
@@ -190,12 +226,18 @@
                                    if (tPedigreeChartParentThreeDTO.getStatus()==null){
                                        tPedigreeChartParentThreeDTO.setStatus(1);
                                    }
                                    tPedigreeChartParentTwoDTO.setVaccinateId(loginUser.getUserId()+"");
                                    tPedigreeChartParentTwoDTO.setVaccinateSignature(tPedigreeChartParentTwoDTO.getVaccinateSignature());
                                    tPedigreeChartParentTwoDTO.setVaccinateTime(LocalDateTime.now());
                                    tPedigreeChartParentThreeDTO.setVaccinateId(loginUser.getUserId()+"");
                                    tPedigreeChartParentThreeDTO.setVaccinateSignature(tPedigreeChartParentTwoDTO.getVaccinateSignature());
                                    tPedigreeChartParentThreeDTO.setVaccinateTime(LocalDateTime.now());
                                    tPedigreeChartParentThreeDTO.setStorageTime(LocalDateTime.now());
                                    tPedigreeChartParentThreeDTO.setPedigreeChartId(parent.getId());
                                    tPedigreeChartParentThreeDTO.setId(null);
                                    if (parent.getStatus()==1){
                                        tPedigreeChartParentThreeDTO.setAuditStatus(0);
                                    }else{
                                        tPedigreeChartParentThreeDTO.setAuditStatus(1);
                                    }
                                    tPedigreeChartParentThreeDTO.setCodeStatus(parent.getStatus());
                                    pedigreeChartDetailService.save(tPedigreeChartParentThreeDTO);
                                }
                            }
@@ -220,11 +262,11 @@
                    .eq(TProjectTeam::getStatus, 1)
                    .orderByDesc(BaseModel::getCreateTime).last("limit 1").one();
            TProjectTeamStaff projectTeamStaff = projectTeamStaffService.lambdaQuery()
                    .eq(TProjectTeamStaff::getTeamId, team.getId()).eq(TProjectTeamStaff::getRoleType, 2).one();
                    .eq(TProjectTeamStaff::getTeamId, team.getId()).eq(TProjectTeamStaff::getRoleType, 1).one();
            tNotice.setCommitId(tokenService.getLoginUser().getUserId()+"");
            tNotice.setUserId(projectTeamStaff.getUserId());
            tNotice.setStatus(1);
            tNotice.setNoticeContent("菌种实验员新增【1】条【菌种传代生产谱系图】操作,等待您签字确认;");
            tNotice.setNoticeContent("菌种工程师新增【1】条【菌种传代生产谱系图】操作,等待您签字确认;");
            tNotice.setDataId(parent.getId());
            tNotice.setNoticeType(4);
            noticeService.save(tNotice);
@@ -253,69 +295,254 @@
            String child = JSON.toJSONString(dto.getOne().get(0));
            parent.setJson(child);
        }
        List<String> projectIds = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getUserId,
                        tokenService.getLoginUser().getUserId())
                .list().stream().map(TProjectTeamStaff::getTeamId).collect(Collectors.toList());
        if (!projectIds.isEmpty()){
            TProjectTeam projectTeam = projectTeamService.lambdaQuery().in(TProjectTeam::getId, projectIds)
                    .eq(TProjectTeam::getStatus, 1)
                    .orderByDesc(BaseModel::getCreateTime)
                    .last("limit 1").one();
            parent.setProjectId(projectTeam.getId());
        }
        Integer status = parent.getStatus();
        TPedigreeChart pedigreeChart = pedigreeChartService.getById(parent.getId());
        if (pedigreeChart.getStatus() == 2){
            parent.setStatus(2);
        }
        pedigreeChartService.updateById(parent);
        if (parent.getGenerationType()==1){
            TPedigreeChartDetail one = pedigreeChartDetailService.getOne(new LambdaQueryWrapper<TPedigreeChartDetail>()
                    .eq(TPedigreeChartDetail::getPedigreeChartId, "0"));
            if (one!=null){
                one.setStrainName(parent.getStrainName());
                one.setStrainCode(parent.getStrainCode());
                pedigreeChartDetailService.updateById( one);
        parent.setStatus( status);
        if (!dto.getOne().isEmpty()){
            TPedigreeChartParentOneDTO oneLevel = dto.getOne().get(0);
            oneLevel.setParentId("0");
            oneLevel.setType(1);
            oneLevel.setStatus(oneLevel.getStatus());
            oneLevel.setStorageTime(LocalDateTime.now());
            oneLevel.setPedigreeChartId(parent.getId());
            oneLevel.setVaccinateId(loginUser.getUserId()+"");
            oneLevel.setVaccinateSignature(oneLevel.getVaccinateSignature());
            oneLevel.setVaccinateTime(LocalDateTime.now());
            oneLevel.setId(dto.getOne().get(0).getId());
            if (oneLevel.getId()==null){
                if (parent.getStatus()==1){
                    oneLevel.setAuditStatus(0);
                    oneLevel.setCodeStatus(parent.getStatus());
                }else{
                    oneLevel.setAuditStatus(1);
                    oneLevel.setCodeStatus(parent.getStatus());
                }
            }else{
                if (parent.getStatus()==2){
                    switch (oneLevel.getAuditStatus()){
                        case 0:
                            oneLevel.setAuditStatus(1);
                            oneLevel.setCodeStatus(parent.getStatus());
                            break;
                        case 1:
                            oneLevel.setAuditStatus(1);
                            oneLevel.setCodeStatus(parent.getStatus());
                            break;
                        case 2:
                            oneLevel.setAuditStatus(2);
                            oneLevel.setCodeStatus(parent.getStatus());
                    }
                }
            }
            pedigreeChartDetailService.saveOrUpdate(oneLevel);
            List<TPedigreeChartParentOneCountDTO> countList = oneLevel.getChildren();
            if (!countList.isEmpty()){
                TPedigreeChartParentOneCountDTO count = countList.get(0);
                count.setParentId(oneLevel.getId());
                count.setType(2);
                count.setVaccinateId(loginUser.getUserId()+"");
                count.setVaccinateTime(LocalDateTime.now());
                count.setStatus(1);
                if (count.getId()==null){
                    if (parent.getStatus()==1){
                        count.setAuditStatus(0);
                        count.setCodeStatus(parent.getStatus());
                    }else{
                        count.setAuditStatus(1);
                        count.setCodeStatus(parent.getStatus());
                    }
                }else{
                    if (parent.getStatus()==2){
                        switch (count.getAuditStatus()){
                            case 0:
                                count.setAuditStatus(1);
                                count.setCodeStatus(parent.getStatus());
                                break;
                            case 1:
                                count.setAuditStatus(1);
                                count.setCodeStatus(parent.getStatus());
                                break;
                            case 2:
                                count.setAuditStatus(2);
                                count.setCodeStatus(parent.getStatus());
                        }
            }
        }
//        pedigreeChartDetailService.remove(new LambdaQueryWrapper<TPedigreeChartDetail>()
//                .eq(TPedigreeChartDetail::getPedigreeChartId,  dto.getParent().getId()));
//        if (!dto.getOne().isEmpty()){
//            TPedigreeChartParentOneDTO one = dto.getOne().get(0);
//            one.setParentId("0");
//            one.setType(1);
//            one.setStatus(1);
//            one.setPedigreeChartId(parent.getId());
//            pedigreeChartDetailService.save(one);
//            List<TPedigreeChartParentOneCountDTO> countList = one.getChildren();
//            if (!countList.isEmpty()){
//                TPedigreeChartParentOneCountDTO count = countList.get(0);
//                count.setParentId(one.getId());
//                count.setType(2);
//                count.setStatus(1);
//                count.setPedigreeChartId(parent.getId());
//                pedigreeChartDetailService.save(count);
//                if (count.getChildren()!=null){
//                    for (TPedigreeChartParentTwoDTO tPedigreeChartParentTwoDTO : count.getChildren()) {
//                        tPedigreeChartParentTwoDTO.setParentId(one.getId());
//                        tPedigreeChartParentTwoDTO.setPedigreeChartId(parent.getId());
//                        tPedigreeChartParentTwoDTO.setType(1);
//                        tPedigreeChartParentTwoDTO.setStatus(1);
//                        tPedigreeChartParentTwoDTO.setParentId(count.getId());
//                        tPedigreeChartParentTwoDTO.setPedigreeChartId(parent.getId());
//                        pedigreeChartDetailService.save(tPedigreeChartParentTwoDTO);
//                        List<TPedigreeChartParentTwoCountDTO> count1List = tPedigreeChartParentTwoDTO.getChildren();
//                        if (!count1List.isEmpty()){
//                            TPedigreeChartParentTwoCountDTO count1 = count1List.get(0);
//                            count1.setType(2);
//                            count1.setParentId(tPedigreeChartParentTwoDTO.getId());
//                            count1.setPedigreeChartId(parent.getId());
//                            count1.setStatus(1);
//                            pedigreeChartDetailService.save(count1);
//                            if (count1.getChildren()!=null){
//                                for (TPedigreeChartParentThreeDTO tPedigreeChartParentThreeDTO : count1.getChildren()) {
//                                    tPedigreeChartParentThreeDTO.setParentId(count1.getId());
//                                    tPedigreeChartParentThreeDTO.setPedigreeChartId(parent.getId());
//                                    tPedigreeChartParentThreeDTO.setType(1);
//                                    tPedigreeChartParentThreeDTO.setStatus(1);
//                                    tPedigreeChartParentThreeDTO.setParentId(tPedigreeChartParentTwoDTO.getId());
//                                    tPedigreeChartParentThreeDTO.setPedigreeChartId(parent.getId());
//                                    pedigreeChartDetailService.save(tPedigreeChartParentThreeDTO);
//                                }
//                            }
//                        }
//                    }
//                }
//
//            }
                count.setPedigreeChartId(parent.getId());
                count.setId(countList.get(0).getId());
                pedigreeChartDetailService.saveOrUpdate(count);
                if (count.getChildren()!=null){
                    for (TPedigreeChartParentTwoDTO tPedigreeChartParentTwoDTO : count.getChildren()) {
                        tPedigreeChartParentTwoDTO.setParentId(oneLevel.getId());
                        tPedigreeChartParentTwoDTO.setPedigreeChartId(parent.getId());
                        tPedigreeChartParentTwoDTO.setType(1);
                        if (tPedigreeChartParentTwoDTO.getStatus()==null){
                            tPedigreeChartParentTwoDTO.setStatus(1);
                        }
                        tPedigreeChartParentTwoDTO.setVaccinateId(loginUser.getUserId()+"");
                        tPedigreeChartParentTwoDTO.setVaccinateSignature(tPedigreeChartParentTwoDTO.getVaccinateSignature());
                        tPedigreeChartParentTwoDTO.setVaccinateTime(LocalDateTime.now());
                        tPedigreeChartParentTwoDTO.setStorageTime(LocalDateTime.now());
                        tPedigreeChartParentTwoDTO.setParentId(count.getId());
                        tPedigreeChartParentTwoDTO.setId(tPedigreeChartParentTwoDTO.getId());
                        if (tPedigreeChartParentTwoDTO.getId()==null){
                            if (parent.getStatus()==1){
                                tPedigreeChartParentTwoDTO.setAuditStatus(0);
                                tPedigreeChartParentTwoDTO.setCodeStatus(parent.getStatus());
                            }else{
                                tPedigreeChartParentTwoDTO.setAuditStatus(1);
                                tPedigreeChartParentTwoDTO.setCodeStatus(parent.getStatus());
//        }
                            }
                        }else{
                            if (parent.getStatus()==2){
                                switch (tPedigreeChartParentTwoDTO.getAuditStatus()){
                                    case 0:
                                        tPedigreeChartParentTwoDTO.setAuditStatus(1);
                                        tPedigreeChartParentTwoDTO.setCodeStatus(parent.getStatus());
                                        break;
                                    case 1:
                                        tPedigreeChartParentTwoDTO.setAuditStatus(1);
                                        tPedigreeChartParentTwoDTO.setCodeStatus(parent.getStatus());
                                        break;
                                    case 2:
                                        tPedigreeChartParentTwoDTO.setAuditStatus(2);
                                        tPedigreeChartParentTwoDTO.setCodeStatus(parent.getStatus());
                                }
                            }
                        }
                        pedigreeChartDetailService.saveOrUpdate(tPedigreeChartParentTwoDTO);
                        List<TPedigreeChartParentTwoCountDTO> count1List = tPedigreeChartParentTwoDTO.getChildren();
                        if (!count1List.isEmpty()){
                            // 传代数
                            TPedigreeChartParentTwoCountDTO childCount = count1List.get(0);
                            childCount.setType(2);
                            if (childCount.getId()==null){
                                if (parent.getStatus()==1){
                                    childCount.setAuditStatus(0);
                                    childCount.setCodeStatus(parent.getStatus());
                                }else{
                                    childCount.setAuditStatus(1);
                                    childCount.setCodeStatus(parent.getStatus());
                                }
                            }else{
                                if (parent.getStatus()==2){
                                    switch (childCount.getAuditStatus()){
                                        case 0:
                                            childCount.setAuditStatus(1);
                                            childCount.setCodeStatus(parent.getStatus());
                                            break;
                                        case 1:
                                            childCount.setAuditStatus(1);
                                            childCount.setCodeStatus(parent.getStatus());
                                            break;
                                        case 2:
                                            childCount.setAuditStatus(2);
                                            childCount.setCodeStatus(parent.getStatus());
                                    }
                                }
                            }
                            count.setVaccinateId(loginUser.getUserId()+"");
                            count.setVaccinateTime(LocalDateTime.now());
                            childCount.setParentId(tPedigreeChartParentTwoDTO.getId());
                            childCount.setPedigreeChartId(parent.getId());
                            childCount.setStatus(1);
                            childCount.setId(childCount.getId());
                            pedigreeChartDetailService.saveOrUpdate(childCount);
                            if (childCount.getChildren()!=null){
                                for (TPedigreeChartParentThreeDTO tPedigreeChartParentThreeDTO : childCount.getChildren()) {
                                    tPedigreeChartParentThreeDTO.setParentId(childCount.getId());
                                    tPedigreeChartParentThreeDTO.setPedigreeChartId(parent.getId());
                                    tPedigreeChartParentThreeDTO.setType(1);
                                    tPedigreeChartParentThreeDTO.setVaccinateId(loginUser.getUserId()+"");
                                    if (tPedigreeChartParentThreeDTO.getStatus()==null){
                                        tPedigreeChartParentThreeDTO.setStatus(1);
                                    }
                                    tPedigreeChartParentThreeDTO.setVaccinateId(loginUser.getUserId()+"");
                                    tPedigreeChartParentThreeDTO.setVaccinateSignature(tPedigreeChartParentTwoDTO.getVaccinateSignature());
                                    tPedigreeChartParentThreeDTO.setVaccinateTime(LocalDateTime.now());
                                    tPedigreeChartParentThreeDTO.setStorageTime(LocalDateTime.now());
                                    tPedigreeChartParentThreeDTO.setPedigreeChartId(parent.getId());
                                    tPedigreeChartParentThreeDTO.setId(tPedigreeChartParentThreeDTO.getId());
                                    if (tPedigreeChartParentThreeDTO.getId()==null){
                                        if (parent.getStatus()==1){
                                            tPedigreeChartParentThreeDTO.setAuditStatus(0);
                                            tPedigreeChartParentThreeDTO.setCodeStatus(parent.getStatus());
                                        }else{
                                            tPedigreeChartParentThreeDTO.setAuditStatus(1);
                                            tPedigreeChartParentThreeDTO.setCodeStatus(parent.getStatus());
                                        }
                                    }else{
                                        if (parent.getStatus()==2){
                                            switch (tPedigreeChartParentThreeDTO.getAuditStatus()){
                                                case 0:
                                                    tPedigreeChartParentThreeDTO.setAuditStatus(1);
                                                    tPedigreeChartParentThreeDTO.setCodeStatus(parent.getStatus());
                                                    break;
                                                case 1:
                                                    tPedigreeChartParentThreeDTO.setAuditStatus(1);
                                                    tPedigreeChartParentThreeDTO.setCodeStatus(parent.getStatus());
                                                    break;
                                                case 2:
                                                    tPedigreeChartParentThreeDTO.setAuditStatus(2);
                                                    tPedigreeChartParentThreeDTO.setCodeStatus(parent.getStatus());
                                            }
                                        }
                                    }
                                    pedigreeChartDetailService.saveOrUpdate(tPedigreeChartParentThreeDTO);
                                }
                            }
                        }
                    }
                }
            }
            String child = JSON.toJSONString(oneLevel);
            parent.setJson(child);
            parent.setStatus(null);
            pedigreeChartService.updateById(parent);
        }
        // 新增消息
        TNotice tNotice = new TNotice();
        List<String> allProjectIds = projectTeamStaffService.lambdaQuery().eq(TProjectTeamStaff::getTeamId,parent.getProjectId() )
                .eq(TProjectTeamStaff::getRoleType, 2)
                .list().stream().map(TProjectTeamStaff::getTeamId).collect(Collectors.toList());
        if (!allProjectIds.isEmpty()){
            TProjectTeam team = projectTeamService.lambdaQuery().in(TProjectTeam::getId, allProjectIds)
                    .eq(TProjectTeam::getStatus, 1)
                    .orderByDesc(BaseModel::getCreateTime).last("limit 1").one();
            TProjectTeamStaff projectTeamStaff = projectTeamStaffService.lambdaQuery()
                    .eq(TProjectTeamStaff::getTeamId, team.getId()).eq(TProjectTeamStaff::getRoleType, 1).one();
            tNotice.setCommitId(tokenService.getLoginUser().getUserId()+"");
            tNotice.setUserId(projectTeamStaff.getUserId());
            tNotice.setStatus(1);
            tNotice.setNoticeContent("菌种工程师新增【1】条【菌种传代生产谱系图】操作,等待您签字确认;");
            tNotice.setDataId(parent.getId());
            tNotice.setNoticeType(4);
            noticeService.save(tNotice);
        }
        return R.ok();
    }
    @Log(title = "谱系图-谱系图-删除谱系图", businessType = BusinessType.DELETE)
@@ -350,6 +577,7 @@
    @Log(title = "谱系图-祖代/母代新增菌种传代项", businessType = BusinessType.INSERT)
    @ApiOperation(value = "祖代/母代新增菌种传代项",response = TPedigreeChartDetailDTO.class)
    @PostMapping(value = "/api/t-pedigree-chart/addProgenitorChild")
    @Transactional
    public R<Boolean> addProgenitorChild(@RequestBody String param) {
        LoginUser loginUser = tokenService.getLoginUser();
        if (loginUser==null){
@@ -363,10 +591,20 @@
        }else{
            String parentId = dto.getParentId();
            TPedigreeChartDetail parent = pedigreeChartDetailService.getById(parentId);
            if (parent.getType()==2){
                if (parent.getAuditStatus()==1){
                    return R.fail("传代计划数未审核");
                }
                if (parent.getAuditStatus()==3){
                    return R.fail("传代计划数审核被驳回");
                }
            }
            Long count = pedigreeChartDetailService.lambdaQuery().eq(TPedigreeChartDetail::getParentId, parentId).count();
            if (count>=parent.getGenerationCount()){
                return R.fail("该谱系图已满");
            }
            String pedigreeChartId = pedigreeChartDetailService.getById(parentId).getPedigreeChartId();
            TPedigreeChart pedigreeChart = pedigreeChartService.getById(pedigreeChartId);
            TPedigreeChartDetail tPedigreeChartDetail = new TPedigreeChartDetail();
@@ -381,16 +619,42 @@
            tPedigreeChartDetail.setPedigreeChartId(pedigreeChart.getId());
            tPedigreeChartDetail.setVaccinateId(loginUser.getUserId()+"");
            tPedigreeChartDetail.setVaccinateTime(LocalDateTime.now());
            tPedigreeChartDetail.setCodeStatus(dto.getCodeStatus());
            if (dto.getStatus()  ==2){
                tPedigreeChartDetail.setDiscardTime(LocalDateTime.now());
            }
            if (dto.getCodeStatus()==2){
                tPedigreeChartDetail.setAuditStatus(1);
            }else{
                tPedigreeChartDetail.setAuditStatus(0);
            }
            tPedigreeChartDetail.setVaccinateSignature(dto.getVaccinateSignature());
            pedigreeChartDetailService.save(tPedigreeChartDetail);
        }
        return R.ok();
    }
    /**
     * 0获取谱系图详情待确认传代计划数分页列表
     */
    @ApiOperation(value = "谱系图-2.0获取谱系图详情待确认传代计划数分页列表",response = TPedigreeChartDetailQuery.class)
    @PostMapping(value = "/api/t-pedigree-chart/pageListCountDetail")
    public R<PageInfo<TPedigreeChartDetailVO>> pageListCountDetail(@RequestBody String param) {
        TPedigreeChartDetailQuery query = JSON.parseObject(param, TPedigreeChartDetailQuery.class);
        return R.ok(pedigreeChartService.pageListCountDetail(query));
    }
    @ApiOperation(value = "谱系图-2.0审批人确认传代计划数",response = TPedigreeChartDetailConfirmCountDTO.class)
    @PostMapping(value = "/api/t-pedigree-chart/confirmCount")
    public R confirmCount(@RequestBody String param) {
        TPedigreeChartDetailConfirmCountDTO query = JSON.parseObject(param, TPedigreeChartDetailConfirmCountDTO.class);
        TPedigreeChartDetail pedigreeChartDetailServiceById = pedigreeChartDetailService.getById(query.getId());
        pedigreeChartDetailServiceById.setAuditStatus(2);
        pedigreeChartDetailServiceById.setPreserveSignature(query.getPreserveSignature());
        pedigreeChartDetailService.updateById(pedigreeChartDetailServiceById);
        return R.ok();
    }
    /**
     * 获取谱系图详情待入库菌种分页列表
     */
@@ -487,6 +751,21 @@
    @PostMapping(value = "/api/t-pedigree-chart/updateCount")
    public R<Boolean> updateCount(@RequestBody String param) {
        TPedigreeChartDetailCountDTO dto = JSON.parseObject(param, TPedigreeChartDetailCountDTO.class);
        TPedigreeChartDetail count = pedigreeChartDetailService.getById(dto.getId());
        count.setGenerationCount(dto.getGenerationCount());
        // 待审核状态
        count.setAuditStatus(1);
        count.setVaccinateId(tokenService.getLoginUser().getUserId()+"");
        count.setVaccinateTime(LocalDateTime.now());
        count.setVaccinateSignature(dto.getVaccinateSignature());
        pedigreeChartDetailService.updateById(count);
        return R.ok();
    }
    @ApiOperation(value = "谱系图-设置传代数",response = TPedigreeChartDetailCountDTO.class)
    @PostMapping(value = "/api/t-pedigree-chart/addCount")
    public R<Boolean> addCount(@RequestBody String param) {
        TPedigreeChartDetailCountDTO dto = JSON.parseObject(param, TPedigreeChartDetailCountDTO.class);
        TPedigreeChartDetail pedigreeChartDetail1 = new TPedigreeChartDetail();
        pedigreeChartDetail1.setParentId(dto.getParentId());
        pedigreeChartDetail1.setVaccinateId(tokenService.getLoginUser().getUserId()+"");
@@ -496,6 +775,13 @@
        pedigreeChartDetail1.setGenerationCount(dto.getGenerationCount());
        pedigreeChartDetail1.setPedigreeChartId(tPedigreeChartDetail.getPedigreeChartId());
        pedigreeChartDetail1.setType(2);
        pedigreeChartDetail1.setCodeStatus(dto.getCodeStatus());
        if (dto.getCodeStatus()==1){
            pedigreeChartDetail1.setAuditStatus(0);
        }else{
            pedigreeChartDetail1.setAuditStatus(1);
        }
        pedigreeChartDetailService.save(pedigreeChartDetail1);
        return R.ok();
    }
@@ -516,6 +802,7 @@
        pedigreeChartDetail.setPreserveId(String.valueOf(tokenService.getLoginUser().getUserId()));
        pedigreeChartDetail.setPreserveSignature(dto.getPreserveSignature());
        pedigreeChartDetail.setConfirmTime(LocalDateTime.now());
        pedigreeChartDetail.setAuditStatus(2);
        pedigreeChartDetailService.updateById(pedigreeChartDetail);
        return R.ok();
    }
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTrainLibraryController.java
@@ -225,6 +225,9 @@
                case 3:
                    content.append("【生产细胞库】");
                    break;
                case 4:
                    content.append("【孙细胞库】");
                    break;
            }
            tNotice.setNoticeContent("您有【1】条"+content+"入库记录等待签字确认;");
@@ -292,6 +295,9 @@
                        break;
                    case 3:
                        content.append("【生产细胞库】");
                        break;
                    case 4:
                        content.append("【孙细胞库】");
                        break;
                }
@@ -499,6 +505,9 @@
            case 3:
                content.append("【生产细胞库】");
                break;
            case 4:
                content.append("【孙细胞库】");
                break;
        }
        switch (query.getType()){
            case 1:
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
@@ -1,21 +1,16 @@
package com.ruoyi.web.controller.system;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import com.alibaba.fastjson.JSON;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.dto.LoginDTO;
import com.ruoyi.system.query.TBreedingAndPreservationQuery;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.web.controller.tool.MsgUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@@ -55,8 +50,7 @@
    private TokenService tokenService;
    @Autowired
    private ISysRoleService roleService;
    @Autowired
    private MsgUtils msgUtils;
    /**
     * 账号密码登录
@@ -129,7 +123,7 @@
            String code = String.valueOf((int) (Math.random() * 1000000));
            redisCache.setCacheObject(phone, code,5*60,TimeUnit.SECONDS);
            try {
                msgUtils.sendMsg(phone, code);
//                msgUtils.sendMsg(phone, code);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
ruoyi-admin/src/main/resources/application-prod.yml
@@ -17,10 +17,10 @@
# 开发环境配置
server:
  # 服务器的HTTP端口,默认为8080
  port: 8080
  port: 8082
  servlet:
    # 应用的访问路径
    context-path: /
    context-path: /culture/
  tomcat:
    # tomcat的URI编码
    uri-encoding: UTF-8
@@ -69,20 +69,13 @@
  # redis 配置
  redis:
    # 地址
    #    host: 127.0.0.1
    #    # 端口,默认为6379
    #    port: 6379
    #    # 数据库索引
    #    database: 0
    #    # 密码
    #    password: 123456
    host: 127.0.0.1
    # 端口,默认为6379
    port: 16379
    port: 6379
    # 数据库索引
    database: 0
    # 密码
    password: 8f5z9g52gx4bg
    password: 123456
    # 连接超时时间
    timeout: 10s
    lettuce:
@@ -102,9 +95,9 @@
    druid:
      # 主库数据源
      master:
        url: jdbc:mysql://172.27.0.13:3306/xizang?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai
        username: xzgt
        password: changyun!6f2gshj6h3j
        url: jdbc:mysql://127.0.0.1:10633/strain_library?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=Asia/Shanghai
        username: root
        password: Laboratory@2025!
      # 从库数据源
      slave:
        # 从数据源开关/默认关闭
@@ -199,39 +192,6 @@
    accessPath: /file/
    allowExt: .jpg|.png|.gif|.jpeg|.doc|.docx|.apk|.MP4|.mp4|.pdf|.PDF|.xls|.xlsx|.rar|.zip|.rar
  url:
    #    prefix: http://localhost:${server.port}${server.servlet.context-path}
    prefix: https://xzgt.test.591taxi.cn:${server.port}${server.servlet.context-path}
wx:
  conf:
    appId: wxe91f1af7638aa5dd
    secretId: a787e1a462715604e0c9528b6d8960d1
#OSS及短信配置
code:
  config:
    templateCodeTest: "SMS_154950909"
    signNameTest: "阿里云短信测试"
    accessKeyId: LTAI5tAdba8HtT1C6UqtSxBt
    accessKeySecret: 0SRb6XGkciQDPWn2rYqbJtq2qRMDY8
    signName: "四川金达通信工程"
    templateCode: "SMS_293985284"
cos:
  client:
    accessKey: AKIDCF5EF2c0DE1e5JK8r4EGJF4mNsMgp26x
    secretKey: lLl184rUyFOOE0d5KNGC3kmfNsCWk4GU
    bucket: xzgttest-1305134071
    bucketAddr: ap-chengdu
    rootSrc: https://xzgttest-1305134071.cos.ap-chengdu.myqcloud.com/
    location: /xizang
sms:
  enable: true
  appId: 1400957506
  secretid: AKIDCF5EF2c0DE1e5JK8r4EGJF4mNsMgp26x
  secretkey: lLl184rUyFOOE0d5KNGC3kmfNsCWk4GU
  sign: 畅云出行
com:
  taxi591:
    bank:
      cer-path: /usr/local/bank/TrustPay.cer
      base-url: http://hello.enjoy.abchina.com
      enable: true
      keystore-password: gggs6666
      pfx-path: /usr/local/bank/103882597000441.pfx
ruoyi-admin/src/main/resources/application-test.yml
@@ -17,7 +17,7 @@
# 开发环境配置
server:
  # 服务器的HTTP端口,默认为8080
  port: 8081
  port: 8082
  servlet:
    # 应用的访问路径
    context-path: /
@@ -194,38 +194,4 @@
  url:
#    prefix: http://localhost:${server.port}${server.servlet.context-path}
    prefix: https://xzgt.test.591taxi.cn:${server.port}${server.servlet.context-path}
wx:
  conf:
    appId: wxe91f1af7638aa5dd
    secretId: a787e1a462715604e0c9528b6d8960d1
#OSS及短信配置
code:
  config:
    templateCodeTest: "SMS_154950909"
    signNameTest: "阿里云短信测试"
    accessKeyId: LTAI5tAdba8HtT1C6UqtSxBt
    accessKeySecret: 0SRb6XGkciQDPWn2rYqbJtq2qRMDY8
    signName: "四川金达通信工程"
    templateCode: "SMS_293985284"
cos:
  client:
    accessKey: AKIDCF5EF2c0DE1e5JK8r4EGJF4mNsMgp26x
    secretKey: lLl184rUyFOOE0d5KNGC3kmfNsCWk4GU
    bucket: xzgttest-1305134071
    bucketAddr: ap-chengdu
    rootSrc: https://xzgttest-1305134071.cos.ap-chengdu.myqcloud.com/
    location: /xizang
sms:
  enable: true
  appId: 1400957506
  secretid: AKIDCF5EF2c0DE1e5JK8r4EGJF4mNsMgp26x
  secretkey: lLl184rUyFOOE0d5KNGC3kmfNsCWk4GU
  sign: 畅云出行
com:
  taxi591:
    bank:
      cer-path: D:\workspaces\工作文件\畅云\农业银行\正式\TrustPay.cer
      base-url: http://hello.enjoy.abchina.com
      enable: true
      keystore-password: gggs6666
      pfx-path: D:\workspaces\工作文件\畅云\农业银行\正式\103882597000441.pfx
ruoyi-admin/src/main/resources/application.yml
@@ -1,4 +1,4 @@
# 项目相关配置
spring:
  profiles:
    active: test
    active: prod
ruoyi-common/src/main/java/com/ruoyi/common/core/controller/FileController.java
@@ -39,7 +39,8 @@
        }
        String TimeDir =new SimpleDateFormat("yyyy-MM-dd").format(new Date());
//        String realPath = fileUploadConfig.getLocation() + TimeDir;
        String realPath = "D:\\upload\\image\\" + TimeDir;
//        String realPath = "D:\\upload\\image\\" + TimeDir;
        String realPath = "F:\\file\\strainLibrary\\" + TimeDir;
        File file = new File(realPath);
        // 没有目录就创建
        if (!file.exists()) {
@@ -99,7 +100,7 @@
            return "请传入文件!";
        }
        String TimeDir =new SimpleDateFormat("yyyy-MM-dd").format(new Date());
        String realPath = "D:\\upload\\image" + TimeDir;
        String realPath = "F:\\file\\strainLibrary\\" + TimeDir;
        File file = new File(realPath);
        // 没有目录就创建
        if (!file.exists()) {
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
@@ -25,7 +25,9 @@
public class SysUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "ip地址")
    @TableField("allocateIp")
    private String allocateIp;
    /** 用户ID */
    //@Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
    @ApiModelProperty(value = "用户id")
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
@@ -118,6 +118,7 @@
        recordLoginInfo(loginUser.getUserId());
        SysUser user1 = loginUser.getUser();
        user1.setRoleType(user.getRoleType());
        user1.setAllocateIp(user.getAllocateIp());
        loginUser.setUser(user1);
        // 生成token
        return loginUser;
ruoyi-system/src/main/java/com/ruoyi/system/dto/TPedigreeChartDetailCountDTO.java
@@ -14,8 +14,12 @@
    @ApiModelProperty(value = "传代数量")
    private Integer generationCount;
    @ApiModelProperty(value = "节点id")
    private String id;
    @ApiModelProperty(value = "上级id")
    private String parentId;
    @ApiModelProperty(value = "签名")
    private String vaccinateSignature;
    @ApiModelProperty(value = "当前节点状态 1保存 2提交")
    private Integer codeStatus;
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TPedigreeChartMapper.java
@@ -28,4 +28,7 @@
    List<TPedigreeChartConfirmVO> listConfirm(@Param("query")TPedigreeChartConfirmQuery query,@Param("pageInfo") PageInfo<TPedigreeChartConfirmVO> pageInfo);
    List<TPedigreeChartDetailVO> pageListDetail(@Param("query")TPedigreeChartDetailQuery query, @Param("pageInfo")PageInfo<TPedigreeChartDetailVO> pageInfo);
    List<TPedigreeChartDetailVO> pageListCountDetail(@Param("query")TPedigreeChartDetailQuery query, @Param("pageInfo")PageInfo<TPedigreeChartDetailVO> pageInfo);
}
ruoyi-system/src/main/java/com/ruoyi/system/model/TPedigreeChart.java
@@ -66,5 +66,8 @@
    @ApiModelProperty(value = "项目组id")
    @TableField("project_id")
    private String projectId;
    @ApiModelProperty(value = "1保存 2提交 提交后不可再删除节点")
    @TableField("status")
    private Integer status;
}
ruoyi-system/src/main/java/com/ruoyi/system/model/TPedigreeChartDetail.java
@@ -121,6 +121,12 @@
    @ApiModelProperty(value = "类型 1菌种传代项 2设置传代数")
    @TableField("type")
    private Integer type;
    @ApiModelProperty(value = "审核状态0草稿状态 1待审核 2审核通过 3审核驳回 只有类型为传代数时存值")
    @TableField("audit_status")
    private Integer auditStatus;
    @ApiModelProperty(value = "节点当前状态 1保存 2提交")
    @TableField("code_status")
    private Integer codeStatus;
    @ApiModelProperty(value = "母代传代菌种编号/祖代菌种编号 回显使用")
    @TableField(exist = false)
    private String strainCodeTemp;
ruoyi-system/src/main/java/com/ruoyi/system/model/TTrainLibrary.java
@@ -76,7 +76,7 @@
    @TableField("status")
    private Integer status;
    @ApiModelProperty(value = "细胞库类型 1原始细胞库2主细胞库3生产细胞库")
    @ApiModelProperty(value = "细胞库类型 1原始细胞库2主细胞库3生产细胞库 4孙细胞库")
    @TableField("type")
    private Integer type;
    @ApiModelProperty(value = "是否草稿 0否1是")
ruoyi-system/src/main/java/com/ruoyi/system/query/TPedigreeChartDetailConfirmCountDTO.java
New file
@@ -0,0 +1,18 @@
package com.ruoyi.system.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "2.0新增谱系图确认传代计划数DTO")
public class TPedigreeChartDetailConfirmCountDTO {
    @ApiModelProperty(value = "待确认传代计划数id")
    private String id;
    @ApiModelProperty(value = "审批人签名url")
    private String preserveSignature;
}
ruoyi-system/src/main/java/com/ruoyi/system/query/TPedigreeChartQuery.java
@@ -22,4 +22,6 @@
    @ApiModelProperty(value = "项目组ids")
    private List<String> projectIds;
    @ApiModelProperty(value = "登陆人类型 1超管2审批 3工程师")
    private Integer roleType;
}
ruoyi-system/src/main/java/com/ruoyi/system/query/TTrainLibraryQuery.java
@@ -18,7 +18,7 @@
    private String strainName;
    @ApiModelProperty(value = "状态 1已出库2出库待确认3已入库4入库待确认")
    private Integer status;
    @ApiModelProperty(value = "细胞库类型 1原始细胞库2主细胞库3生产细胞库")
    @ApiModelProperty(value = "细胞库类型 1原始细胞库2主细胞库3生产细胞库 4孙细胞库")
    private Integer type;
    @ApiModelProperty(value = "是否草稿 0否1是")
    private Integer isDraft;
ruoyi-system/src/main/java/com/ruoyi/system/service/TPedigreeChartService.java
@@ -26,4 +26,6 @@
    PageInfo<TPedigreeChartDetailVO> pageListDetail(TPedigreeChartDetailQuery query);
    PageInfo<TPedigreeChartDetailVO> pageListCountDetail(TPedigreeChartDetailQuery query);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPedigreeChartServiceImpl.java
@@ -5,8 +5,10 @@
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.mapper.TPedigreeChartDetailMapper;
import com.ruoyi.system.mapper.TPedigreeChartMapper;
import com.ruoyi.system.model.TPedigreeChart;
import com.ruoyi.system.model.TPedigreeChartDetail;
import com.ruoyi.system.model.TProjectTeamStaff;
import com.ruoyi.system.query.TPedigreeChartConfirmQuery;
import com.ruoyi.system.query.TPedigreeChartDetailQuery;
@@ -36,6 +38,8 @@
    @Autowired
    private SysUserMapper sysUserMapper;
    @Autowired
    private TPedigreeChartDetailMapper pedigreeChartDetailMapper;
    @Override
    public PageInfo<TPedigreeChartVO> pageList(TPedigreeChartQuery query) {
        PageInfo<TPedigreeChartVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
@@ -72,4 +76,29 @@
        pageInfo.setRecords(list);
        return pageInfo;
    }
    @Override
    public PageInfo<TPedigreeChartDetailVO> pageListCountDetail(TPedigreeChartDetailQuery query) {
        TPedigreeChart tPedigreeChart = this.baseMapper.selectById(query.getId());
        PageInfo<TPedigreeChartDetailVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
        List<TPedigreeChartDetailVO> list = this.baseMapper.pageListCountDetail(query,pageInfo);
        List<SysUser> sysUsers = sysUserMapper.selectAllList();
        for (TPedigreeChartDetailVO tPedigreeChartDetailVO : list) {
            SysUser sysUser = sysUsers.stream().filter(e -> e.getUserId().equals(Long.valueOf(tPedigreeChartDetailVO.getVaccinateId())))
                    .findFirst().orElse(null);
            if (sysUser!=null){
                tPedigreeChartDetailVO.setExperimenter(sysUser.getNickName());
            }
            SysUser sysUser1 = sysUsers.stream().filter(e -> e.getUserId().equals(Long.valueOf(tPedigreeChartDetailVO.getVaccinateId())))
                    .findFirst().orElse(null);
            if (sysUser1!=null){
                tPedigreeChartDetailVO.setVaccinateName(sysUser.getNickName());
            }
            tPedigreeChartDetailVO.setStrainCode(tPedigreeChart.getStrainCode());
            tPedigreeChartDetailVO.setStrainName(tPedigreeChart.getStrainName());
            tPedigreeChartDetailVO.setConfirmTime(tPedigreeChart.getCreateTime());
        }
        pageInfo.setRecords(list);
        return pageInfo;
    }
}
ruoyi-system/src/main/java/com/ruoyi/system/vo/TPedigreeChartDetailVO.java
@@ -11,7 +11,7 @@
@ApiModel(value = "谱系图详情待入库菌种分页列表返回VO")
public class TPedigreeChartDetailVO extends TPedigreeChartDetail {
    @ApiModelProperty(value = "菌种实验员")
    @ApiModelProperty(value = "菌种工程师")
    private String experimenter;
}
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -25,6 +25,7 @@
        <result property="updateTime"   column="update_time"  />
        <result property="remark"       column="remark"       />
        <result property="ifBlack"       column="ifBlack"       />
        <result property="allocateIp"       column="allocateIp"       />
        <association property="dept"    javaType="SysDept"         resultMap="deptResult" />
        <collection  property="roles"   javaType="java.util.List"  resultMap="RoleResult" />
    </resultMap>
@@ -51,7 +52,7 @@
    <sql id="selectUserVo">
        select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password,
               u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
               u.roleType,
               u.roleType,u.allocateIp,
        d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
        r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
        from sys_user u
@@ -134,7 +135,7 @@
        select u.user_id AS userId, u.dept_id AS deptId, u.user_name AS userName, u.nick_name AS nickName, u.email AS email, u.avatar AS avatar,
               u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp,
               u.login_date AS loginDate, u.create_by AS createBy, u.create_time AS createTime, u.remark AS remark,u.ifBlack AS ifBlack,
               u.roleType,u.sign_picture as signPicture,
               u.roleType,u.sign_picture as signPicture,u.allocateIp,
               ur.role_id AS roleId,sr.role_name AS roleName,u.deptName as deptName
        from sys_user u
        left join sys_user_role ur on u.user_id = ur.user_id
@@ -163,7 +164,7 @@
    </select>
    <select id="selectList" resultType="com.ruoyi.common.core.domain.entity.SysUser">
        select u.user_id AS userId, u.dept_id AS deptId, u.user_name AS userName, u.nick_name AS nickName, u.email AS email, u.avatar AS avatar,
               u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp,
               u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp,u.allocateIp,
               u.login_date AS loginDate, u.create_by AS createBy, u.create_time AS createTime, u.remark AS remark,u.ifBlack AS ifBlack
        from sys_user u
        WHERE u.del_flag = 0
@@ -228,7 +229,7 @@
               u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp,u.operating_time AS operatingTime,u.operating_person AS operatingPerson,
               u.login_date AS loginDate, u.create_by AS createBy, u.create_time AS createTime, u.remark AS remark,u.ifBlack AS ifBlack,
               r.role_id AS roleId, r.role_name AS roleName, r.role_key AS roleKey, r.role_sort AS roleSort, r.data_scope AS dataScope, r.status as role_status,u.deptName as deptName
        ,u.roleType as roleType
        ,u.roleType as roleType,u.allocateIp
        from sys_user u
        left join sys_user_role ur on u.user_id = ur.user_id
        left join sys_role r on r.role_id = ur.role_id
@@ -307,6 +308,7 @@
             <if test="createBy != null and createBy != ''">create_by,</if>
             <if test="remark != null and remark != ''">remark,</if>
             <if test="ifBlack != null">ifBlack,</if>
             <if test="allocateIp != null">allocateIp,</if>
             create_time
         )values(
             <if test="userId != null and userId != ''">#{userId},</if>
@@ -324,6 +326,7 @@
             <if test="createBy != null and createBy != ''">#{createBy},</if>
             <if test="remark != null and remark != ''">#{remark},</if>
            <if test="ifBlack != null">#{ifBlack},</if>
            <if test="allocateIp != null">#{allocateIp},</if>
             sysdate()
         )
    </insert>
@@ -350,6 +353,7 @@
            <if test="operatingTime != null">operating_time = #{operatingTime},</if>
            <if test="operatingPerson != null">operating_person = #{operatingPerson},</if>
            <if test="roleType != null">roleType = #{roleType},</if>
            <if test="allocateIp != null">allocateIp = #{allocateIp},</if>
             update_time = sysdate()
         </set>
         where user_id = #{userId}
ruoyi-system/src/main/resources/mapper/system/TPedigreeChartMapper.xml
@@ -35,6 +35,15 @@
            <if test="query.generationType != null">
                and generation_type = #{query.generationType}
            </if>
            <if test="query.roleType == 1">
                and status = 2
            </if>
            <if test="query.roleType == 2">
                and status = 2
            </if>
            <if test="query.roleType == 3">
                and status = 2 or status = 1
            </if>
        <if test="query.projectIds != null and query.projectIds.size() > 0">
            and project_id in
            <foreach item="item" collection="query.projectIds" separator="," open="(" close=")" index="">
@@ -57,9 +66,18 @@
        where pedigree_chart_id = #{query.id}
          and status = 1
          and type = 1
          and vaccinate_id is not null
          and preserve_id is null
          and audit_status = 1
        and  disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        order by create_time desc
    </select>
    <select id="pageListCountDetail" resultType="com.ruoyi.system.vo.TPedigreeChartDetailVO">
        select  * from t_pedigree_chart_detail
        where pedigree_chart_id = #{query.id}
          and status = 1
          and type = 2
          and audit_status = 1
          and  disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        order by create_time desc
    </select>
sql/strain_library.sql
New file
Diff too large