青海中水北方修改

This commit is contained in:
pengjie 2025-08-25 11:44:27 +08:00
parent 9495b5cb45
commit 6eb8ccdd72
2 changed files with 5 additions and 0 deletions

View File

@ -113,6 +113,7 @@ public class UfaceDevController {
@ApiImplicitParam(name = "personType", value = "人员类型 1、劳务人员 2、管理人员", paramType = "body", required = false, dataType = "String"),
@ApiImplicitParam(name = "userId", value = "通知的人员ID", paramType = "body", required = true, dataType = "String"),
@ApiImplicitParam(name = "workerIds", value = "下发的劳务人员IDs多个逗号分割", paramType = "body", required = false, dataType = "String"),
@ApiImplicitParam(name = "ufaceDevId", value = "门禁设备id多个,分割)", paramType = "body", required = true, dataType = "String"),
})
@PostMapping(value = "/sendBatchWokerDev")
public Result< Map<String, Object>> sendBatchWokerDev(@RequestBody Map<String, Object> map) {

View File

@ -205,11 +205,15 @@ public class UfaceDevServiceImpl extends ServiceImpl<UfaceDevMapper, UfaceDev> i
public void sendBatchWokerDev(Map<String, Object> map) {
QueryWrapper<ProjectUfaceConfig> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ProjectUfaceConfig::getProjectSn, MapUtils.getString(map, "projectSn"));
String ufaceDevId = MapUtils.getString(map, "ufaceDevId");
ProjectUfaceConfig ufaceConfig = projectUfaceConfigService.getOne(queryWrapper);
ThreadLocalUtil.addInKey("now", new Date());
if (ufaceConfig != null && ufaceConfig.getIssueDev() == 1) {
QueryWrapper<UfaceDev> qw = new QueryWrapper<>();
qw.lambda().eq(UfaceDev::getProjectSn, MapUtils.getString(map, "projectSn"));
if (StringUtils.isNotBlank(ufaceDevId)) {
qw.lambda().in(UfaceDev::getDeviceId, Arrays.asList(ufaceDevId.split(",")));
}
List<UfaceDev> list = ufaceDevMapper.selectList(qw);
if (list == null || list.size() == 0) {
throw new OpenAlertException("请先添加设备");