| | |
| | | |
| | | import com.example.springboot.mapper.HomeMapper; |
| | | import com.example.springboot.service.HomeService; |
| | | import com.example.springboot.service.SpianService; |
| | | import com.example.springboot.common.Result; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.alarmmg; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | HomeService storageRackService; |
| | | |
| | | @Autowired |
| | | SpianService spianService; |
| | | |
| | | @GetMapping("/load") |
| | | public Result selectAll(){ |
| | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/loadinout") |
| | | public Result selectinout(Integer types){ |
| | | List<StorageCage> storageCageinout=homeMapper.selectinout(types); |
| | |
| | | } |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @GetMapping("/Addglassid") |
| | | public Result Addglassid(short glassid){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | short taskno=homeMapper.SelectOutTask(); |
| | | if(taskno>0){ |
| | | map.put("message2","500"); |
| | | }else{ |
| | | map.put("message2","200"); |
| | | //调用伍上片函数 |
| | | spianService.selectAll(glassid); |
| | | } |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @GetMapping("/UpdateTask") |
| | | public Result UpdateTask(Integer types,Integer shelfrack){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | homeMapper.UpdateTask(types,shelfrack); |
| | | if(types==0){ |
| | | homeMapper.UpdateCageTask1(shelfrack); |
| | | }else{ |
| | | homeMapper.UpdateCageTask2(shelfrack); |
| | | } |
| | | map.put("message3","200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @GetMapping("/SelectAlarmmgInfo") |
| | | public Result SelectAlarmmgInfo(){ |
| | | List<alarmmg> alarmmg=homeMapper.SelectAlarmmgInfo(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("alarmmg",alarmmg); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | } |