| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.modules.dnc.entity.DeviceInfo; |
| | | import org.jeecg.modules.dnc.entity.DocRelative; |
| | | import org.jeecg.modules.dnc.response.CommonCode; |
| | | import org.jeecg.modules.dnc.response.QueryListResponseResult; |
| | | import org.jeecg.modules.dnc.response.ResponseResult; |
| | | import org.jeecg.modules.dnc.service.IDocRelativeService; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipment; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @ApiOperation(value = "设备关联文档表-删除设备下的文档接口", notes = "设备关联文档表-删除设备下的文档接口") |
| | | @DeleteMapping("/delete/device/{docId}/{deviceId}") |
| | | public ResponseResult deleteDocByDeviceId(@PathVariable("docId") String docId, @PathVariable("deviceId") String deviceId) { |
| | | boolean b = relativeService.deleteDocByAttr(docId, 4, deviceId); |
| | | boolean b = relativeService.deleteDocByAttr(docId, 7, deviceId); |
| | | if(b) |
| | | return new ResponseResult(CommonCode.SUCCESS); |
| | | return new ResponseResult(CommonCode.FAIL); |
| | |
| | | @AutoLog(value = "设备关联文档表-查询文档下的所有关联设备信息") |
| | | @ApiOperation(value = "设备关联文档表-查询文档下的所有关联设备信息", notes = "设备关联文档表-查询文档下的所有关联设备信息") |
| | | @GetMapping("/get/device/{docId}") |
| | | public QueryListResponseResult<DeviceInfo> findDeviceByDocId(@PathVariable("docId") String docId) { |
| | | List<DeviceInfo> list = relativeService.findDeviceByDocId(docId); |
| | | public QueryListResponseResult<MdcEquipment> findDeviceByDocId(@PathVariable("docId") String docId) { |
| | | List<MdcEquipment> list = relativeService.findDeviceByDocId(docId); |
| | | if(list == null) |
| | | list = Collections.emptyList(); |
| | | return new QueryListResponseResult<>(CommonCode.SUCCESS, list); |