|
|
|
@ -10,6 +10,7 @@ import com.engine.organization.mapper.staff.StaffMapper;
|
|
|
|
|
import com.engine.organization.mapper.staff.StaffPlanMapper;
|
|
|
|
|
import com.engine.organization.util.db.MapperProxyFactory;
|
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.List;
|
|
|
|
@ -47,7 +48,7 @@ public class RefreshIsUsedUtil {
|
|
|
|
|
*/
|
|
|
|
|
public static void RefreshLevel(String tableName) {
|
|
|
|
|
List<String> usedIds = MapperProxyFactory.getProxy(LevelMapper.class).listUsedId();
|
|
|
|
|
usedIds.removeIf(Objects::isNull);
|
|
|
|
|
usedIds.removeIf(StringUtils::isBlank);
|
|
|
|
|
RefreshIsUsedStatus(tableName, usedIds);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -58,7 +59,8 @@ public class RefreshIsUsedUtil {
|
|
|
|
|
*/
|
|
|
|
|
public static void RefreshGrade(String tableName) {
|
|
|
|
|
List<String> usedIds = MapperProxyFactory.getProxy(GradeMapper.class).listUsedId();
|
|
|
|
|
usedIds.removeIf(Objects::isNull);
|
|
|
|
|
//usedIds.forEach(System.out ::println);
|
|
|
|
|
usedIds.removeIf(StringUtils::isBlank);
|
|
|
|
|
RefreshIsUsedStatus(tableName, usedIds);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -69,7 +71,7 @@ public class RefreshIsUsedUtil {
|
|
|
|
|
*/
|
|
|
|
|
public static void RefreshSequence(String tableName) {
|
|
|
|
|
List<String> usedIds = MapperProxyFactory.getProxy(SequenceMapper.class).listUsedId();
|
|
|
|
|
usedIds.removeIf(Objects::isNull);
|
|
|
|
|
usedIds.removeIf(StringUtils::isBlank);
|
|
|
|
|
RefreshIsUsedStatus(tableName, usedIds);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -80,7 +82,7 @@ public class RefreshIsUsedUtil {
|
|
|
|
|
*/
|
|
|
|
|
public static void RefreshStaffPlan(String tableName) {
|
|
|
|
|
List<String> usedIds = MapperProxyFactory.getProxy(StaffPlanMapper.class).listUsedId();
|
|
|
|
|
usedIds.removeIf(Objects::isNull);
|
|
|
|
|
usedIds.removeIf(StringUtils::isBlank);
|
|
|
|
|
RefreshIsUsedStatus(tableName, usedIds);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -91,7 +93,7 @@ public class RefreshIsUsedUtil {
|
|
|
|
|
*/
|
|
|
|
|
public static void RefreshStaff(String tableName) {
|
|
|
|
|
List<String> usedIds = MapperProxyFactory.getProxy(StaffMapper.class).listUsedId();
|
|
|
|
|
usedIds.removeIf(Objects::isNull);
|
|
|
|
|
usedIds.removeIf(StringUtils::isBlank);
|
|
|
|
|
RefreshIsUsedStatus(tableName, usedIds);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -103,7 +105,7 @@ public class RefreshIsUsedUtil {
|
|
|
|
|
*/
|
|
|
|
|
public static void RefreshPostInfo(String tableName) {
|
|
|
|
|
List<String> usedIds = MapperProxyFactory.getProxy(PostInfoMapper.class).listUsedId();
|
|
|
|
|
usedIds.removeIf(Objects::isNull);
|
|
|
|
|
usedIds.removeIf(StringUtils::isBlank);
|
|
|
|
|
RefreshIsUsedStatus(tableName, usedIds);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -118,7 +120,7 @@ public class RefreshIsUsedUtil {
|
|
|
|
|
List<String> collect = Arrays.stream(String.join(",", usedIds).split(",")).collect(Collectors.toList());
|
|
|
|
|
getRefreshUseMapper().updateIsUsedByIds(tableName, collect, 0);
|
|
|
|
|
getRefreshUseMapper().updateIsUsedByIds(tableName, collect, 1);
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
getRefreshUseMapper().initIsUseStatus(tableName);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|