| | |
| | | return Result.ok(twoMaintenancePlanList); |
| | | } |
| | | |
| | | /** |
| | | *首页 第四级 对应工区下,设备台账信息展示; |
| | | * qsw 2024-4-22 |
| | | */ |
| | | @GetMapping("getAreaEquipmentList") |
| | | public Result<?> getAreaEquipmentList(String equipmentNum) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | List<Map<String, Object>> list = null; |
| | | if(!USER_TYPE_1.equals(userType)){ |
| | | list = calibrationOrderService.getAreaEquipmentList(equipmentNum,"",null); |
| | | } |
| | | return Result.ok(list); |
| | | } |
| | | |
| | | /** |
| | | *首页 第四级 对应工区下,所有设备台账信息展示; |
| | | * qsw 2024-4-22 |
| | | */ |
| | | @GetMapping("getAllAreaEquipmentList") |
| | | public Result<?> getAllAreaEquipmentList(String productionCode) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | List<Map<String, Object>> list = null; |
| | | if(!USER_TYPE_1.equals(userType)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getAreaEquipmentList("",area.getId(),null); |
| | | } |
| | | }else{ |
| | | List<Map<String, Object>> operationCertificatelist = calibrationOrderService.getOperationCertificate(user.getUsername()); |
| | | if(operationCertificatelist.size()>0){ |
| | | String equipmentIds = (String)operationCertificatelist.get(0).get("equipmentIds"); |
| | | List<String> strings = Arrays.asList(equipmentIds.split(",")); |
| | | list = calibrationOrderService.getAreaEquipmentList("","",strings); |
| | | } |
| | | } |
| | | return Result.ok(list); |
| | | } |
| | | |
| | | /** |
| | | *首页 第四级 对应工区下,所有设备台账信息展示; |
| | | * qsw 2024-4-22 |
| | | */ |
| | | @GetMapping("getOperationCertificate") |
| | | public Result<?> getOperationCertificate() { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | List<Map<String, Object>> list = calibrationOrderService.getOperationCertificate(user.getUsername()); |
| | | return Result.ok(list); |
| | | } |
| | | |
| | | } |