青海中水北方修改
This commit is contained in:
parent
9495b5cb45
commit
6eb8ccdd72
@ -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) {
|
||||
|
||||
@ -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("请先添加设备");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user