bug修改

This commit is contained in:
guoshengxiong 2024-06-14 23:13:25 +08:00
parent 2aaacc75bc
commit 70cefcc887
3 changed files with 8 additions and 1 deletions

View File

@ -23,6 +23,7 @@ import com.zhgd.exception.CustomException;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.execption.OpenAlertException;
import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.jeecg.common.util.SpringContextUtils;
import com.zhgd.xmgl.async.AsyncHikvision;
import com.zhgd.xmgl.async.AsyncJiLianDa;
import com.zhgd.xmgl.async.AsyncWorker;
@ -2324,7 +2325,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
try {
for (WorkerInfo workerInfo : workerInfos) {
workerInfo.setFieldAcquisitionUrl(saveName);
editWorkerInfo(workerInfo);
this.editWorkerInfo(workerInfo);
sucSb.append(workerName + ",");
}
} catch (Exception e) {
@ -2419,6 +2420,10 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
@Override
public void editWorkerAndAuthForHikvision(WorkerInfo workerInfo, WorkerInfo oldWorkerInfo) {
SpringContextUtils.getBean(XzHikvisionSyncMapper.class).delete(new LambdaQueryWrapper<XzHikvisionSync>()
.eq(XzHikvisionSync::getBigType, 1)
.eq(XzHikvisionSync::getWhoId, workerInfo.getId())
);
this.addHkSyncRecordIf(workerInfo, 2);
projectUfaceConfigService.editHkSyncRecordAndResetStatusForDev(workerInfo);
asyncHikvision.editWorkerAndAuthAsync(workerInfo, true, true);

View File

@ -20,5 +20,6 @@
) t2 on
t1.create_date=t2.create_date and t1.who_id=t2.who_id
left join uface_dev ud on t1.device_sn = ud.dev_sn
order by t1.id
</select>
</mapper>

View File

@ -155,6 +155,7 @@ public class HikvisionTask {
@Scheduled(cron = "0 0 3 * * ?")
@RequestMapping("compareData")
public void compareData() throws Exception {
log.info("数据校验同步任务开始");
List<Project> projects = projectMapper.selectList(new LambdaQueryWrapper<Project>().eq(Project::getSyncHikvision, 1));
for (Project project : projects) {
try {