Merge branch 'dyf-device' into 6170

This commit is contained in:
2025-11-11 10:51:57 +08:00
10 changed files with 770 additions and 1 deletions

View File

@ -0,0 +1,155 @@
package com.fuyuanshen.app.controller.device.bjq;
import com.fuyuanshen.app.domain.bo.AppPersonnelInfoBo;
import com.fuyuanshen.app.domain.dto.AppDeviceLogoUploadDto;
import com.fuyuanshen.app.domain.dto.DeviceInstructDto;
import com.fuyuanshen.app.domain.vo.AppDevice6075DetailVo;
import com.fuyuanshen.common.core.domain.R;
import com.fuyuanshen.common.core.validate.AddGroup;
import com.fuyuanshen.common.ratelimiter.annotation.FunctionAccessAnnotation;
import com.fuyuanshen.common.ratelimiter.annotation.FunctionAccessBatcAnnotation;
import com.fuyuanshen.common.web.core.BaseController;
import com.fuyuanshen.equipment.domain.dto.AppDeviceSendMsgBo;
import com.fuyuanshen.web.service.device.DeviceBJQ6075BizService;
import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
/**
* BJQ6331便携式工作灯
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/app/BJQ6331/device")
public class AppDeviceBJQ6331Controller extends BaseController {
private final DeviceBJQ6075BizService appDeviceService6075;
/**
* 获取设备详细信息
*
* @param id 主键
*/
@GetMapping("/{id}")
public R<AppDevice6075DetailVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
return R.ok(appDeviceService6075.getInfo(id));
}
/**
* 人员信息登记 1
*/
@PostMapping(value = "/registerPersonInfo")
public R<Void> registerPersonInfo(@Validated(AddGroup.class) @RequestBody AppPersonnelInfoBo bo) {
return toAjax(appDeviceService6075.registerPersonInfo(bo));
}
/**
* 发送信息 2
*/
@PostMapping(value = "/sendMessage")
@FunctionAccessBatcAnnotation(value = "sendMessage", timeOut = 30, batchMaxTimeOut = 40)
public R<Void> sendMessage(@RequestBody AppDeviceSendMsgBo bo) {
return toAjax(appDeviceService6075.sendMessage(bo));
}
/**
* 发送报警信息 3
*/
@PostMapping(value = "/sendAlarmMessage")
@FunctionAccessBatcAnnotation(value = "sendAlarmMessage", timeOut = 5, batchMaxTimeOut = 10)
public R<Void> sendAlarmMessage(@RequestBody AppDeviceSendMsgBo bo) {
return toAjax(appDeviceService6075.sendAlarmMessage(bo));
}
/**
* 上传设备logo图片 4
*/
@PostMapping("/uploadLogo")
@FunctionAccessAnnotation("uploadLogo")
public R<Void> upload(@Validated @ModelAttribute AppDeviceLogoUploadDto bo) {
MultipartFile file = bo.getFile();
if (file.getSize() > 1024 * 1024 * 2) {
return R.warn("图片不能大于2M");
}
appDeviceService6075.uploadDeviceLogo(bo);
return R.ok();
}
/**
* 灯光模式 5
* (主光模式)
* 0关闭灯光1强光2超强光, 3工作光, 4节能光5爆闪6SOS
*/
@PostMapping("/lightModeSettings")
public R<Void> lightModeSettings(@RequestBody DeviceInstructDto params) {
appDeviceService6075.lightModeSettings(params);
return R.ok();
}
/**
* 灯光模式 6
* (辅光模式)
* 0关闭灯光1泛光2泛光爆闪, 3警示灯, 4警示灯/泛光)
*/
@PostMapping("/auxiliaryLightModeSettings")
public R<Void> auxiliaryLightModeSettings(@RequestBody DeviceInstructDto params) {
appDeviceService6075.lightModeSettings(params);
return R.ok();
}
/**
* 灯光亮度设置 7
*/
@PostMapping("/lightBrightnessSettings")
public R<Void> lightBrightnessSettings(@RequestBody DeviceInstructDto params) {
appDeviceService6075.lightBrightnessSettings(params);
return R.ok();
}
/**
* 激光模式设置 8
*/
@PostMapping("/laserModeSettings")
public R<Void> laserModeSettings(@RequestBody DeviceInstructDto params) {
appDeviceService6075.laserModeSettings(params);
return R.ok();
}
/**
* 声光报警模式设置 9
* Sound and light alarm
*/
@PostMapping("/salaModeSettings")
public R<Void> salaModeSettings(@RequestBody DeviceInstructDto params) {
appDeviceService6075.laserModeSettings(params);
return R.ok();
}
/**
* 获取设备分享详细信息
*
* @param id 主键
*/
@GetMapping("/getShareInfo/{id}")
public R<AppDevice6075DetailVo> getShareInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) {
return R.ok(appDeviceService6075.getInfo(id));
}
}

View File

@ -0,0 +1,156 @@
package com.fuyuanshen.app.controller.device.bjq;
import com.fuyuanshen.app.domain.bo.AppPersonnelInfoBo;
import com.fuyuanshen.app.domain.dto.AppDeviceLogoUploadDto;
import com.fuyuanshen.app.domain.dto.DeviceInstructDto;
import com.fuyuanshen.app.domain.vo.AppDevice6075DetailVo;
import com.fuyuanshen.common.core.domain.R;
import com.fuyuanshen.common.core.validate.AddGroup;
import com.fuyuanshen.common.ratelimiter.annotation.FunctionAccessAnnotation;
import com.fuyuanshen.common.ratelimiter.annotation.FunctionAccessBatcAnnotation;
import com.fuyuanshen.common.web.core.BaseController;
import com.fuyuanshen.equipment.domain.dto.AppDeviceSendMsgBo;
import com.fuyuanshen.web.service.device.DeviceBJQ6075BizService;
import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
/**
* HBY335LED救生照明线
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/app/HBY335/device")
public class AppDeviceHBY335Controller extends BaseController {
private final DeviceBJQ6075BizService appDeviceService6075;
/**
* 获取设备详细信息
*
* @param id 主键
*/
@GetMapping("/{id}")
public R<AppDevice6075DetailVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) {
return R.ok(appDeviceService6075.getInfo(id));
}
/**
* 人员信息登记 1
*/
@PostMapping(value = "/registerPersonInfo")
public R<Void> registerPersonInfo(@Validated(AddGroup.class) @RequestBody AppPersonnelInfoBo bo) {
return toAjax(appDeviceService6075.registerPersonInfo(bo));
}
/**
* 发送信息 2
*/
@PostMapping(value = "/sendMessage")
@FunctionAccessBatcAnnotation(value = "sendMessage", timeOut = 30, batchMaxTimeOut = 40)
public R<Void> sendMessage(@RequestBody AppDeviceSendMsgBo bo) {
return toAjax(appDeviceService6075.sendMessage(bo));
}
/**
* 发送报警信息 3
*/
@PostMapping(value = "/sendAlarmMessage")
@FunctionAccessBatcAnnotation(value = "sendAlarmMessage", timeOut = 5, batchMaxTimeOut = 10)
public R<Void> sendAlarmMessage(@RequestBody AppDeviceSendMsgBo bo) {
return toAjax(appDeviceService6075.sendAlarmMessage(bo));
}
/**
* 上传设备logo图片 4
*/
@PostMapping("/uploadLogo")
@FunctionAccessAnnotation("uploadLogo")
public R<Void> upload(@Validated @ModelAttribute AppDeviceLogoUploadDto bo) {
MultipartFile file = bo.getFile();
if (file.getSize() > 1024 * 1024 * 2) {
return R.warn("图片不能大于2M");
}
appDeviceService6075.uploadDeviceLogo(bo);
return R.ok();
}
/**
* 灯光模式 5
* (主光模式)
* 0关闭灯光1强光2超强光, 3工作光, 4节能光5爆闪6SOS
*/
@PostMapping("/lightModeSettings")
public R<Void> lightModeSettings(@RequestBody DeviceInstructDto params) {
appDeviceService6075.lightModeSettings(params);
return R.ok();
}
/**
* 灯光模式 6
* (辅光模式)
* 0关闭灯光1泛光2泛光爆闪, 3警示灯, 4警示灯/泛光)
*/
@PostMapping("/auxiliaryLightModeSettings")
public R<Void> auxiliaryLightModeSettings(@RequestBody DeviceInstructDto params) {
appDeviceService6075.lightModeSettings(params);
return R.ok();
}
/**
* 灯光亮度设置 7
*/
@PostMapping("/lightBrightnessSettings")
public R<Void> lightBrightnessSettings(@RequestBody DeviceInstructDto params) {
appDeviceService6075.lightBrightnessSettings(params);
return R.ok();
}
/**
* 激光模式设置 8
*/
@PostMapping("/laserModeSettings")
public R<Void> laserModeSettings(@RequestBody DeviceInstructDto params) {
appDeviceService6075.laserModeSettings(params);
return R.ok();
}
/**
* 声光报警模式设置 9
* Sound and light alarm
*/
@PostMapping("/salaModeSettings")
public R<Void> salaModeSettings(@RequestBody DeviceInstructDto params) {
appDeviceService6075.laserModeSettings(params);
return R.ok();
}
/**
* 获取设备分享详细信息
*
* @param id 主键
*/
@GetMapping("/getShareInfo/{id}")
public R<AppDevice6075DetailVo> getShareInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) {
return R.ok(appDeviceService6075.getInfo(id));
}
}

View File

@ -69,7 +69,6 @@ public interface DeviceBJQ6075BizService {
*/
public void recordDeviceLog(Long deviceId, String deviceName, String deviceAction, String content, Long operator);
public boolean registerPersonInfo(AppPersonnelInfoBo bo);
public void uploadDeviceLogo2(AppDeviceLogoUploadDto bo);