车辆调整

This commit is contained in:
pengjie 2024-05-27 13:28:32 +08:00
parent 9a51dad438
commit 7f5e9aaa1e
4 changed files with 8 additions and 2 deletions

View File

@ -1086,11 +1086,12 @@ public class HikvisionCall {
} }
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) { if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), msg, title, "24"); noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), msg, title, "24");
} } else if (carInfo.getUserIds() != null && carInfo.getUserIds().size() > 0) {
if (carInfo.getUserIds() != null && carInfo.getUserIds().size() > 0) {
for (String userId : carInfo.getUserIds()) { for (String userId : carInfo.getUserIds()) {
noticeService.addUserNotice(Long.valueOf(userId), msg, title, "24"); noticeService.addUserNotice(Long.valueOf(userId), msg, title, "24");
} }
} else if (carInfo.getCreateBy() != null) {
noticeService.addUserNotice(carInfo.getCreateBy(), msg, title, "24");
} }
} }

View File

@ -109,6 +109,7 @@ public class CarInfoController {
carInfo.setAlarmPushWorkerId(alarmPushWorkerIds.get(0).toString()); carInfo.setAlarmPushWorkerId(alarmPushWorkerIds.get(0).toString());
} }
if (userId != null) { if (userId != null) {
carInfo.setCreateBy(Long.valueOf(userId));
Long workerId = systemUserService.getOne(Wrappers.<SystemUser>lambdaQuery().eq(SystemUser::getUserId, userId)).getWorkerId(); Long workerId = systemUserService.getOne(Wrappers.<SystemUser>lambdaQuery().eq(SystemUser::getUserId, userId)).getWorkerId();
carInfo.setEnterpriseId(workerInfoService.getById(workerId).getEnterpriseId()); carInfo.setEnterpriseId(workerInfoService.getById(workerId).getEnterpriseId());
} }

View File

@ -117,6 +117,8 @@ public class CarInfo implements Serializable {
private Integer entryAndExitPermit; private Integer entryAndExitPermit;
@ApiModelProperty(value = "企业id") @ApiModelProperty(value = "企业id")
private Long enterpriseId; private Long enterpriseId;
@ApiModelProperty(value = "创建人ID")
private Long createBy;
@ApiModelProperty(value = "驾驶证") @ApiModelProperty(value = "驾驶证")
private java.lang.String jsz; private java.lang.String jsz;

View File

@ -17,6 +17,7 @@ import com.zhgd.xmgl.modules.car.mapper.*;
import com.zhgd.xmgl.modules.car.service.ICarInfoService; import com.zhgd.xmgl.modules.car.service.ICarInfoService;
import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper; import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper;
import com.zhgd.xmgl.modules.worker.service.impl.EnterpriseInfoServiceImpl; import com.zhgd.xmgl.modules.worker.service.impl.EnterpriseInfoServiceImpl;
import com.zhgd.xmgl.security.util.SecurityUtils;
import com.zhgd.xmgl.util.MessageUtil; import com.zhgd.xmgl.util.MessageUtil;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -110,6 +111,7 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl
return Result.ok("车辆已存在,预约时间已覆盖更新"); return Result.ok("车辆已存在,预约时间已覆盖更新");
} }
} else { } else {
c.setCreateBy(SecurityUtils.getUser().getUserId());
carInfoMapper.insert(c); carInfoMapper.insert(c);
//同步海康 //同步海康
asyncHikvision.addCarInfoForHikvision(c); asyncHikvision.addCarInfoForHikvision(c);