Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

tags/24080901
CMM 1 rok temu
rodzic
commit
39b0dd7be8
4 zmienionych plików z 88 dodań i 1 usunięć
  1. +61
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java
  2. +16
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java
  3. +8
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/ProjectStatusFlowTask.java
  4. +3
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/handle/WithDrawHandle.java

+ 61
- 0
pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java Wyświetl plik

@@ -133,6 +133,12 @@ public class OrganizationManage {
public List<KeyTreeVO> treeRubbishVOList(ReqSynthesizePO request) {
String organizationCode = request.getOrganizationCode();
String organizationName = request.getOrganizationName();
String employeeName = request.getEmployeeName();

// 用户搜索为特殊逻辑
if (StringUtils.isNotBlank(employeeName)) {
return treeEmployeeQuery(employeeName, organizationCode);
}

List<DingOrganization> dingOrganizationList = new ArrayList<>();
List<String> organizationCodeList = new ArrayList<>();
@@ -164,6 +170,61 @@ public class OrganizationManage {
return orgKeyTreeVOList;
}

public List<KeyTreeVO> treeEmployeeQuery(String employeeName, String organizationCode) {
List<String> organizationCodeList = CollUtil.toList(organizationCode).stream()
.filter(StringUtils::isNotBlank)
.collect(Collectors.toList());
List<DingEmployeeInfo> dingEmployeeInfoList = iDingEmployeeInfoService
.list(Wrappers.lambdaQuery(DingEmployeeInfo.class)
.like(DingEmployeeInfo::getEmployeeName, employeeName)
.eq(DingEmployeeInfo::getMainJob, "true")
.in(CollUtil.isNotEmpty(organizationCodeList), DingEmployeeInfo::getOrganizationCode, organizationCodeList)
);
List<String> resultOrganizationCodeList = dingEmployeeInfoList.stream()
.filter(r -> StringUtils.isNotBlank(r.getOrganizationCode()))
.map(DingEmployeeInfo::getOrganizationCode)
.distinct().collect(Collectors.toList());

if (CollectionUtil.isEmpty(resultOrganizationCodeList)) {
return new ArrayList<>();
}

List<DingOrganization> dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class)
.in(DingOrganization::getOrganizationCode, resultOrganizationCodeList));

List<KeyTreeVO> orgKeyTreeVOList = dingOrganizationList.stream().map(r -> {
KeyTreeVO keyTreeVO = new KeyTreeVO();
keyTreeVO.setTitle(r.getOrganizationName());
keyTreeVO.setKey(r.getOrganizationCode());
keyTreeVO.setType("ORGANIZATION");
return keyTreeVO;
}).collect(Collectors.toList());

employeeNameSearcheTreeVOList(orgKeyTreeVOList, dingEmployeeInfoList);
return orgKeyTreeVOList;
}

private void employeeNameSearcheTreeVOList(List<KeyTreeVO> basicOrgKeyTreeVOList, List<DingEmployeeInfo> allDingEmployeeInfoList) {
Map<String, List<DingEmployeeInfo>> orgCodeEmployeeMap = allDingEmployeeInfoList.stream()
.filter(r -> StringUtils.isNotBlank(r.getOrganizationCode()))
.collect(Collectors.groupingBy(DingEmployeeInfo::getOrganizationCode));

for (KeyTreeVO basicOrgKeyTreeVO : basicOrgKeyTreeVOList) {
String parentCode = basicOrgKeyTreeVO.getKey();

List<DingEmployeeInfo> dingEmployeeInfoList = orgCodeEmployeeMap.get(parentCode);
List<KeyTreeVO> memberChildren = dingEmployeeInfoList.stream().map(r -> {
KeyTreeVO child = new KeyTreeVO();
child.setKey(r.getEmployeeCode());
child.setTitle(r.getEmployeeName());
child.setType("MEMBER");
return child;
}).collect(Collectors.toList());
basicOrgKeyTreeVO.setChildren(memberChildren);
}
}


public void treeVOList(Boolean needMember, List<KeyTreeVO> basicOrgKeyTreeVOList) {
for (KeyTreeVO basicOrgKeyTreeVO : basicOrgKeyTreeVOList) {
String parentCode = basicOrgKeyTreeVO.getKey();


+ 16
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java Wyświetl plik

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.pmapi.common.constant.RegionConst;
import com.ningdatech.pmapi.common.helper.UserInfoHelper;
import com.ningdatech.pmapi.organization.model.entity.DingOrganization;
import com.ningdatech.pmapi.organization.service.IDingOrganizationService;
@@ -164,6 +165,21 @@ public class DefaultDeclaredProjectManage {
orgInfoDTO.setOrgModelMap(orgModelsList.stream()
.collect(Collectors.toMap(WflowOrgModels::getProcessDefId, v -> v)));
orgMap.put(OrgTypeEnum.TARGET_LABEL.name(),orgInfoDTO);

//如果有上级条线主管单位 并且 不是市本级
if(!RegionConst.RC_LS.equals(userFullInfo.getRegionCode())){
OrgInfoDTO parentLineOrgInfoDto = new OrgInfoDTO();
parentLineOrgInfoDto.setOrganizationCode(project.getHigherSuperOrgCode());
parentLineOrgInfoDto.setOrganizationName(project.getHigherSuperOrg());
parentLineOrgInfoDto.setOrgModelMap(orgModelsList.stream()
.filter(v -> v.getOrgCode().equals(project.getHigherSuperOrgCode())
&& Boolean.FALSE.equals(v.getIsDelete())
&& (ProcessDefTypeEnum.SEAL.name().equals(v.getType()) ||
ProcessDefTypeEnum.DEFAULT.name().equals(v.getType())))
.collect(Collectors.toMap(WflowOrgModels::getType, v -> v)));

orgMap.put(OrgTypeEnum.TARGET_LINE_MANAGEMENT.name(),parentLineOrgInfoDto);
}
return orgMap;
}



+ 8
- 0
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/ProjectStatusFlowTask.java Wyświetl plik

@@ -90,4 +90,12 @@ public class ProjectStatusFlowTask {
}
}
}

// @Scheduled(cron = "0 */1 * * * ?")
public void nonUserFinishFlowToNext() throws UnknownHostException {
//测试暂时用自己HOST
if (TaskContant.Host.HOST_ZPF.equals(InetAddress.getLocalHost().getHostName())) {

}
}
}

+ 3
- 1
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/handle/WithDrawHandle.java Wyświetl plik

@@ -52,7 +52,7 @@ public class WithDrawHandle {
.processInstanceId(instanceId).singleResult();
UserInfoDetails userInfoDetails = LoginUserUtil.loginUserDetail();
String employeeCode = userInfoDetails.getEmployeeCode();
//如果不是当前登录人
//如果不是审核中
if(!ProcessStatusEnum.UNDER_REVIEW.getDesc()
.equals(progressInstanceDetail.getStatus())){
return Boolean.FALSE;
@@ -187,6 +187,8 @@ public class WithDrawHandle {
if(beforeAndOr.isEmpty()){
//放入假设的那个点
beforeAndOr.add(beforeAndOrNode);
//如果 上个节点也是 会签|或签 那么就置为null
beforeNode = null;
}
beforeAndOr.add(progressNodes.get(i));
}


Ładowanie…
Anuluj
Zapisz