| | |
| | | import com.yuanchu.mom.dto.DataConfigDto; |
| | | import com.yuanchu.mom.dto.DeviceDto; |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import com.yuanchu.mom.pojo.PkMaster; |
| | | import com.yuanchu.mom.service.DataConfigService; |
| | | import com.yuanchu.mom.service.DeviceService; |
| | | import com.yuanchu.mom.service.PkMasterService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | |
| | | @Autowired |
| | | private DataConfigService dataConfigService; |
| | | |
| | | @Autowired |
| | | private PkMasterService pkMasterService; |
| | | /** |
| | | * 获取人员信息 |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @ValueAuth |
| | | @GetMapping("/selectUserList") |
| | | public Result selectUserList() { |
| | | return Result.success(deviceService.selectUserList()); |
| | | } |
| | | |
| | | @ValueClassify("设备") |
| | | @ApiOperation(value = "查询设备详情列表") |
| | | @PostMapping("/selectDeviceParameter") |
| | | public Result selectDeviceParameter(@RequestBody Map<String, Object> data) throws Exception { |
| | | public Result selectDeviceParameter(@RequestBody Map<String, Object> data,@RequestParam(value = "laboratoryNameIsNull", required = false) Boolean laboratoryNameIsNull) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceDto itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceDto.class); |
| | | return Result.success(deviceService.selectDeviceParameter(page, itemParameter)); |
| | | return Result.success(deviceService.selectDeviceParameter(page, itemParameter,laboratoryNameIsNull)); |
| | | } |
| | | |
| | | @ValueClassify("设备") |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "通过设备编号获取设备列表") |
| | | @PostMapping("/selectDeviceByCode") |
| | | @GetMapping("/selectDeviceByCode") |
| | | @ValueAuth |
| | | public Result selectDeviceByCode(String code) { |
| | | return Result.success(deviceService.selectDeviceByCode(code)); |
| | |
| | | } |
| | | |
| | | |
| | | @ValueClassify("设备") |
| | | @ApiOperation(value = "温度循环数采") |
| | | @PostMapping("/temDataAcquisition") |
| | | public Result<?> temDataAcquisition(@RequestBody PkMaster pkMaster) { |
| | | return Result.success(pkMasterService.temDataAcquisition(pkMaster)); |
| | | } |
| | | |
| | | @ApiOperation(value = "左侧设备树形栏") |
| | | @GetMapping("/treeDevice") |
| | | @ValueAuth |
| | |
| | | return Result.success(deviceService.treeDevice(deviceName)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "温度循环数采总体") |
| | | @PostMapping("/temDataAcquisition2") |
| | | @ApiOperation(value = "设备档案导出") |
| | | @GetMapping("/exportDeviceFile") |
| | | @ValueAuth |
| | | public Result<?> temDataAcquisition2(@RequestBody PkMaster pkMaster) { |
| | | return Result.success(pkMasterService.temDataAcquisition2(pkMaster)); |
| | | public void exportDeviceFile(@RequestParam Integer deviceId, HttpServletResponse response) throws Exception { |
| | | deviceService.exportDeviceFile(deviceId,response); |
| | | } |
| | | |
| | | @ApiOperation(value = "数采-公式计算") |
| | | @PostMapping("/formulaCalculation") |
| | | @ApiOperation(value = "仪器设备一览表导出") |
| | | @GetMapping("/exportEquipmentDetails") |
| | | @ValueAuth |
| | | public Result<?> formulaCalculation(@RequestBody Map<String, Object> map) { |
| | | return Result.success(deviceService.formulaCalculation(map)); |
| | | public void exportEquipmentDetails(HttpServletResponse response) throws Exception { |
| | | deviceService.exportEquipmentDetails(response); |
| | | } |
| | | |
| | | } |
| | | |