包头bug修复

This commit is contained in:
guoshengxiong 2025-02-18 20:15:06 +08:00
parent 17d43bf689
commit c56b4d7949
4 changed files with 41 additions and 5 deletions

View File

@ -57,6 +57,7 @@ import com.zhgd.xmgl.modules.worker.mapper.EnterpriseInfoMapper;
import com.zhgd.xmgl.modules.worker.mapper.UfaceDevMapper;
import com.zhgd.xmgl.modules.worker.mapper.WorkerAttendanceMapper;
import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper;
import com.zhgd.xmgl.modules.worker.service.ITeamInfoService;
import com.zhgd.xmgl.modules.worker.service.IUfaceDevService;
import com.zhgd.xmgl.modules.worker.service.IWorkerAttendancePresenceService;
import com.zhgd.xmgl.modules.worker.service.IWorkerAttendanceService;
@ -92,7 +93,6 @@ import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource;
import java.nio.file.Path;
import java.util.*;
import java.util.stream.Collectors;
@ -231,6 +231,9 @@ public class HikvisionCall {
@Lazy
@Autowired
private ISystemUserService systemUserService;
@Lazy
@Autowired
private ITeamInfoService teamInfoService;
/**
* 获取图片
@ -1018,6 +1021,10 @@ public class HikvisionCall {
if (project == null || !Objects.equals(project.getSyncHikvision(), 1)) {
return;
}
//劳务就要判断班组不存在就要添加组织
if (workerInfo.getPersonType() == 1) {
saveIfNotExistTeam(workerInfo, project);
}
//idcard
// 存在
// person一样更新
@ -1046,6 +1053,22 @@ public class HikvisionCall {
}
}
/**
* 劳务就要判断班组不存在就要添加组织
*
* @param workerInfo
* @param project
* @throws Exception
*/
private void saveIfNotExistTeam(WorkerInfo workerInfo, Project project) throws Exception {
boolean existOrg = hikvisionCall.existOrg(project, workerInfo.getTeamId() + "", workerInfo.getEnterpriseId() + "");
if (!existOrg) {
TeamInfo teamInfo = teamInfoService.getById(workerInfo.getTeamId());
HikvisionOrganization hikvisionOrganization = getHikvisionOrganization(teamInfo, project);
addOrgNoticeFromHttp(project, hikvisionOrganization);
}
}
/**
* 更新人员
*
@ -1057,6 +1080,7 @@ public class HikvisionCall {
String rs = HikvisionUtil.editWorker(workerInfo, project);
sendNoticeAndSetStatusForWorker("更新人员到海康isc", rs, workerInfo, 1, 2, true);
}
/**
* 添加人脸
*
@ -1297,9 +1321,9 @@ public class HikvisionCall {
if (Objects.equals(msg1, orgIndexCodeNotExists)) {
String pN = "";
if (Objects.equals(workerInfo.getPersonType(), WorkerInfoPersonTypeEnum.LW.getValue())) {
pN = "班组";
pN = "工种";
} else if (Objects.equals(workerInfo.getPersonType(), WorkerInfoPersonTypeEnum.GL.getValue())) {
pN = "部门";
pN = "岗位";
}
msg = "同步失败,人员名称:" + workerInfo.getWorkerName() + ",身份证号:" + workerInfo.getIdCard() + "。失败原因:" + pN + "未同步成功";
title += FAIL;

View File

@ -516,6 +516,14 @@ public class PlanRecordServiceImpl extends ServiceImpl<PlanRecordMapper, PlanRec
Integer isImportantMilestone = MapUtils.getInteger(param, "isImportantMilestone");
Long childCategoryId = MapUtils.getLong(param, "childCategoryId");
List<PlanWorkCategory> categories = planWorkCategoryService.queryList(param);
//查询所有上级
List<Long> ids = categories.stream().map(PlanWorkCategory::getId).collect(Collectors.toList());
Set<String> parentIds = categories.stream().flatMap(o -> StrUtil.split(o.getAncestors(), ",").stream()).filter(o -> !ids.contains(Long.valueOf(o)) && !"0".equals(o)).collect(Collectors.toSet());
if (CollUtil.isNotEmpty(parentIds)) {
List<PlanWorkCategory> list = planWorkCategoryService.list(new LambdaQueryWrapper<PlanWorkCategory>()
.in(PlanWorkCategory::getId, parentIds));
categories.addAll(list);
}
Map<Long, List<PlanChooseCategory>> cidMap = planChooseCategoryService.queryList(param).stream().collect(Collectors.groupingBy(PlanChooseCategory::getCategoryId));
List<PlanRecord> records = planRecordService.list(new LambdaQueryWrapper<PlanRecord>().eq(PlanRecord::getProjectSn, projectSn)
.eq(isImportantMilestone != null, PlanRecord::getIsImportantMilestone, isImportantMilestone));

View File

@ -23,6 +23,12 @@
left join video_nvr vn on vi.nvr_id = vn.id
left join enterprise_info ei on find_in_set(ei.id,vi.enterprise_ids)
WHERE vi.video_id = #{videoId}
<if test="serialNumber != null and serialNumber != ''">
and vi.serial_number like concat('%', #{serialNumber}, '%')
</if>
<if test="videoName != null and videoName != ''">
and vi.video_name like concat('%', #{videoName}, '%')
</if>
<if test="groupId != null and groupId != ''">
and vi.group_id = #{groupId}
</if>

View File

@ -158,8 +158,6 @@ public class FlowSeviceUtil {
WflowSubProcess subProcess = subProcessMapper.selectOne(new LambdaQueryWrapper<>(WflowSubProcess.builder()
.procDefId(instance.getProcessDefinitionId()).build()));
nodeMap = nodeCatchService.reloadProcessByStr(subProcess.getProcess());
HistoricVariableInstance formsVar = historyService.createHistoricVariableInstanceQuery()
.processInstanceId(mainInst.getId()).variableName(WflowGlobalVarDef.WFLOW_FORMS).singleResult();
}
//搜索当前版本流程的配置
WflowModelHistorys modelHistory = modelHistorysMapper.selectOne(new LambdaQueryWrapper<>(WflowModelHistorys.builder()