zhuhaiwen 3 years ago
parent
commit
292f1cab1b

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

18
    */
18
    */
19
    @Modifying
19
    @Modifying
20
    @Transactional
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
    List<Unit> getUnitBy(@Param("unit_id") String unit_id);
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
    @Column(name = "UUID")
21
    @Column(name = "UUID")
22
    public String uuid;
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
        List<Unit> unitList = unitRepository.getUnitBy(adminUnitId);
37
        List<Unit> unitList = unitRepository.getUnitBy(adminUnitId);
38
        if (unitList.size() > 0) {
38
        if (unitList.size() > 0) {
39
            Unit unit = unitList.get(0);
39
            Unit unit = unitList.get(0);
40
            String parent_unit_id = unit.getParent_unit_id();
40
            String parent_unit_id = unit.getP_id();
41
            if (!TextUtils.isEmpty(parent_unit_id)) {
41
            if (!TextUtils.isEmpty(parent_unit_id)) {
42
                throw new Exception(msg);
42
                throw new Exception(msg);
43
            }
43
            }

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

37
        List<Unit> unitList = unitRepository.getUnitBy(adminUnitId);
37
        List<Unit> unitList = unitRepository.getUnitBy(adminUnitId);
38
        if (unitList.size() > 0) {
38
        if (unitList.size() > 0) {
39
            Unit unit = unitList.get(0);
39
            Unit unit = unitList.get(0);
40
            String parent_unit_id = unit.getParent_unit_id();
40
            String parent_unit_id = unit.getP_id();
41
            if (!TextUtils.isEmpty(parent_unit_id)) {
41
            if (!TextUtils.isEmpty(parent_unit_id)) {
42
                throw new Exception(msg);
42
                throw new Exception(msg);
43
            }
43
            }