医院废弃物信息化管理平台
“mitao”
2025-12-24 3763145f34d7706923d55edc32f5cfbc8bc08b92
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package cn.besteam.modules.system.biz;
 
import cn.besteam.modules.system.entity.SysDepartment;
import cn.besteam.modules.system.service.ISysDepartmentService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.apache.commons.lang3.StringUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
 
import java.util.List;
 
@RunWith(SpringRunner.class)
@SpringBootTest
public class SysDepartmentBizTest {
 
 
    @Autowired
    private ISysDepartmentService sysDepartmentService;
    @Test
    public void calculateOrgCode(){
 
//        List<SysDepartment> departmentList = sysDepartmentService.list(new QueryWrapper<>());
//        for (SysDepartment sysDepartment : departmentList) {
//            if(StringUtils.isEmpty(sysDepartment.getOrgCode())){
//                sysDepartment.setOrgCode(sysDepartmentService.getOrgCode(sysDepartment.getParentId(),sysDepartment.getOrgType()));
//                sysDepartmentService.updateById(sysDepartment);
//            }
//        }
    }
}