Merge remote-tracking branch 'origin/guoshengxiong' into guoshengxiong
# Conflicts: # src/main/java/com/zhgd/mybatis/DataScopeInterceptor.java
This commit is contained in:
commit
988880265c
@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -77,6 +77,7 @@ public class CarInfoController {
|
|||||||
@ApiOperation(value = "添加车辆黑白名单管理信息", notes = "添加车辆黑白名单管理信息", httpMethod = "POST")
|
@ApiOperation(value = "添加车辆黑白名单管理信息", notes = "添加车辆黑白名单管理信息", httpMethod = "POST")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result add(@RequestBody CarInfo carInfo) {
|
public Result add(@RequestBody CarInfo carInfo) {
|
||||||
|
carInfo.setCreateBy(SecurityUtils.getUser().getUserId());
|
||||||
return carInfoService.addCarInfo(carInfo);
|
return carInfoService.addCarInfo(carInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,6 +110,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());
|
||||||
}
|
}
|
||||||
@ -171,6 +173,9 @@ public class CarInfoController {
|
|||||||
otherProveList.add(teMap);
|
otherProveList.add(teMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (userIds != null && userIds.size() > 0) {
|
||||||
|
carInfo.setUserIds(userIds);
|
||||||
|
}
|
||||||
carInfo.setCarPhotosUrl(JSON.toJSONString(carPhotosUrls));
|
carInfo.setCarPhotosUrl(JSON.toJSONString(carPhotosUrls));
|
||||||
carInfo.setJsz(JSON.toJSONString(jszList));
|
carInfo.setJsz(JSON.toJSONString(jszList));
|
||||||
carInfo.setXsz(JSON.toJSONString(xszList));
|
carInfo.setXsz(JSON.toJSONString(xszList));
|
||||||
@ -178,7 +183,6 @@ public class CarInfoController {
|
|||||||
carInfo.setOtherProve(JSON.toJSONString(otherProveList));
|
carInfo.setOtherProve(JSON.toJSONString(otherProveList));
|
||||||
carInfo.setProjectSn(map.get("projectSn").toString());
|
carInfo.setProjectSn(map.get("projectSn").toString());
|
||||||
carInfo.setIsBlack(MapUtils.getInteger(map, "isBlack"));
|
carInfo.setIsBlack(MapUtils.getInteger(map, "isBlack"));
|
||||||
carInfo.setUserIds(userIds);
|
|
||||||
Object outsideDriverIdCard = map.get("outsideDriverIdCard");
|
Object outsideDriverIdCard = map.get("outsideDriverIdCard");
|
||||||
if (outsideDriverIdCard != null) {
|
if (outsideDriverIdCard != null) {
|
||||||
carInfo.setOutsideDriverIdCard(outsideDriverIdCard.toString());
|
carInfo.setOutsideDriverIdCard(outsideDriverIdCard.toString());
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -16,7 +16,6 @@
|
|||||||
from xz_checking_route as t
|
from xz_checking_route as t
|
||||||
join enterprise_info ei on find_in_set(ei.id, t.enterprise_id)
|
join enterprise_info ei on find_in_set(ei.id, t.enterprise_id)
|
||||||
group by t.id) as t
|
group by t.id) as t
|
||||||
join xz_checking_route t1 on t1.id = t.id
|
|
||||||
</sql>
|
</sql>
|
||||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.checking.entity.XzCheckingRoute">
|
<select id="queryList" resultType="com.zhgd.xmgl.modules.checking.entity.XzCheckingRoute">
|
||||||
<include refid="selectTable">
|
<include refid="selectTable">
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.zhgd.xmgl.async.AsyncHikvision;
|
||||||
import com.zhgd.xmgl.modules.car.entity.CarInfo;
|
import com.zhgd.xmgl.modules.car.entity.CarInfo;
|
||||||
import com.zhgd.xmgl.modules.car.service.ICarInfoService;
|
import com.zhgd.xmgl.modules.car.service.ICarInfoService;
|
||||||
import com.zhgd.xmgl.modules.exam.entity.*;
|
import com.zhgd.xmgl.modules.exam.entity.*;
|
||||||
@ -68,22 +69,29 @@ public class ExamTask {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ICarInfoService carInfoService;
|
private ICarInfoService carInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AsyncHikvision asyncHikvision;
|
||||||
|
|
||||||
@Scheduled(cron = "0 0/1 * * * ?")
|
@Scheduled(cron = "0 0/1 * * * ?")
|
||||||
public void xzMaterial() {
|
public void xzMaterial() {
|
||||||
List<XzMaterial> list = xzMaterialService.list();
|
List<XzMaterial> list = xzMaterialService.list();
|
||||||
List<String> carNumber = new ArrayList<>();
|
List<String> carNumber = new ArrayList<>();
|
||||||
for (XzMaterial xzMaterial : list) {
|
for (XzMaterial xzMaterial : list) {
|
||||||
if (xzMaterial.getEntryEndTime().compareTo(new Date()) < 0) {
|
if (xzMaterial.getEntryEndTime() != null && xzMaterial.getEntryEndTime().compareTo(new Date()) < 0) {
|
||||||
if (StringUtils.isNotBlank(xzMaterial.getCarNumber())) {
|
if (StringUtils.isNotBlank(xzMaterial.getCarNumber())) {
|
||||||
carNumber.add(xzMaterial.getCarNumber());
|
carNumber.add(xzMaterial.getCarNumber());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<CarInfo> carInfos = carInfoService.list(Wrappers.<CarInfo>lambdaQuery().ne(CarInfo::getCarType, 1));
|
List<CarInfo> carInfos = carInfoService.list(Wrappers.<CarInfo>lambdaQuery().eq(CarInfo::getCarModuleType, 3));
|
||||||
if (carInfos.size() > 0) {
|
if (carInfos.size() > 0) {
|
||||||
carInfos = carInfos.stream().filter(c -> carNumber.contains(c.getCarNumber())).collect(Collectors.toList());
|
carInfos = carInfos.stream().filter(c -> carNumber.contains(c.getCarNumber())).collect(Collectors.toList());
|
||||||
if (carInfos.size() > 0) {
|
if (carInfos.size() > 0) {
|
||||||
carInfoService.removeByIds(carInfos.stream().map(c -> c.getId()).collect(Collectors.toSet()));
|
carInfoService.removeByIds(carInfos.stream().map(c -> c.getId()).collect(Collectors.toSet()));
|
||||||
|
for (CarInfo carInfo : carInfos) {
|
||||||
|
//同步海康
|
||||||
|
asyncHikvision.deleteCarInfoForHikvision(carInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user