zhuhaiwen 3 gadi atpakaļ
vecāks
revīzija
292f1cab1b

+ 1 - 1
oa-app/src/main/java/com/css/oa/exam/admin/repository/IUnitRepository.java

@ -18,7 +18,7 @@ public interface IUnitRepository extends JpaRepository<Unit, String>, JpaSpecifi
18 18
    */
19 19
    @Modifying
20 20
    @Transactional
21
    @Query(nativeQuery = true, value = "select * from OP_EXAM_UNIT where MY_UNIT_ID = :unit_id")
21
    @Query(nativeQuery = true, value = "select * from OP_EXAM_UNIT where UUID = :unit_id")
22 22
    List<Unit> getUnitBy(@Param("unit_id") String unit_id);
23 23
24 24
}

+ 6 - 6
oa-app/src/main/java/com/css/oa/exam/admin/repository/Unit.java

@ -21,14 +21,14 @@ public class Unit implements Serializable {
21 21
    @Column(name = "UUID")
22 22
    public String uuid;
23 23
24
    @Column(name = "PARENT_UNIT_ID")
25
    public String parent_unit_id;
24
    @Column(name = "P_ID")
25
    public String p_id;
26 26
27
    @Column(name = "MY_UNIT_ID")
28
    public String my_unit_id;
27
//    @Column(name = "MY_UNIT_ID")
28
//    public String my_unit_id;
29 29
30
    @Column(name = "MY_UNIT_NAME")
31
    public String my_unit_name;
30
    @Column(name = "NAME")
31
    public String name;
32 32
33 33
34 34
}

+ 1 - 1
oa-app/src/main/java/com/css/oa/exam/exam/service/ExamService.java

@ -37,7 +37,7 @@ public class ExamService extends BaseService implements IExamService {
37 37
        List<Unit> unitList = unitRepository.getUnitBy(adminUnitId);
38 38
        if (unitList.size() > 0) {
39 39
            Unit unit = unitList.get(0);
40
            String parent_unit_id = unit.getParent_unit_id();
40
            String parent_unit_id = unit.getP_id();
41 41
            if (!TextUtils.isEmpty(parent_unit_id)) {
42 42
                throw new Exception(msg);
43 43
            }

+ 1 - 1
oa-app/src/main/java/com/css/oa/exam/subject/service/SubjectService.java

@ -37,7 +37,7 @@ public class SubjectService extends BaseService implements ISubjectService {
37 37
        List<Unit> unitList = unitRepository.getUnitBy(adminUnitId);
38 38
        if (unitList.size() > 0) {
39 39
            Unit unit = unitList.get(0);
40
            String parent_unit_id = unit.getParent_unit_id();
40
            String parent_unit_id = unit.getP_id();
41 41
            if (!TextUtils.isEmpty(parent_unit_id)) {
42 42
                throw new Exception(msg);
43 43
            }