| | |
| | | import com.zy.acs.manager.manager.mapper.MapMapper; |
| | | import com.zy.acs.manager.manager.service.*; |
| | | import com.zy.acs.manager.system.controller.BaseController; |
| | | import com.zy.acs.manager.system.service.ConfigService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private SnowflakeIdWorker snowflakeIdWorker; |
| | | @Autowired |
| | | private LocService locService; |
| | | @Autowired |
| | | private ConfigService configService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:loc:update')") |
| | | @PostMapping("/startupOrShutdown") |
| | | public synchronized R startupOrShutdown() { |
| | | Boolean taskAssignMode = configService.getVal("TaskAssignMode", Boolean.class); |
| | | return configService.setVal("TaskAssignMode", !taskAssignMode) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:loc:list')") |
| | | @PostMapping("/data/fetch") |
| | |
| | | // common |
| | | Map activeMap = mapMapper.selectActive(zoneId, floor); |
| | | return R.ok().add(Cools |
| | | .add("rcsStatus", configService.getVal("TaskAssignMode", Boolean.class)) |
| | | .add("point", GsonUtils.toJson(mapCodeItems)) |
| | | .add("common", activeMap.getData()) |
| | | ); |