|
|
@@ -1,10 +1,14 @@ |
|
|
|
package com.ningdatech.pmapi.projectdeclared.manage; |
|
|
|
|
|
|
|
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.helper.UserInfoHelper; |
|
|
|
import com.ningdatech.pmapi.organization.model.entity.DingOrganization; |
|
|
|
import com.ningdatech.pmapi.organization.service.IDingOrganizationService; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.model.dto.ProjectConditionDTO; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.model.po.DeclaredProjectStatisticsPO; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.service.IDeclaredStatisticsService; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; |
|
|
@@ -18,8 +22,10 @@ import com.wflow.enums.ProcessDefTypeEnum; |
|
|
|
import com.wflow.service.OrgProcdefService; |
|
|
|
import com.wflow.workflow.bean.dto.OrgInfoDTO; |
|
|
|
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; |
|
|
|
import com.wflow.workflow.bean.vo.ProcessStartParamsVo; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.*; |
|
|
@@ -174,4 +180,33 @@ public class DefaultDeclaredProjectManage { |
|
|
|
//查此人建设单位的项目 |
|
|
|
return statisticsService.getRegionStatistics(user.getRegionCode(),year); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 把条件值放入工作流 用于判断条件 根据dto |
|
|
|
* @param params |
|
|
|
* @param dto |
|
|
|
*/ |
|
|
|
public void buildCondition(ProcessStartParamsVo params, DefaultDeclaredDTO dto) { |
|
|
|
//放入条件判断的项目字段 |
|
|
|
ProjectConditionDTO conditionDto = new ProjectConditionDTO(); |
|
|
|
BeanUtils.copyProperties(dto.getProjectInfo(), conditionDto); |
|
|
|
dto.getFormData().putAll( |
|
|
|
JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference<Map<String, Object>>() { |
|
|
|
}) |
|
|
|
); |
|
|
|
params.setFormData(dto.getFormData()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 把条件值放入工作流 用于判断条件 根据d项目实体 |
|
|
|
* @param params |
|
|
|
* @param projectInfo |
|
|
|
*/ |
|
|
|
public void buildCondition(ProcessStartParamsVo params, Project projectInfo) { |
|
|
|
//放入条件判断的项目字段 |
|
|
|
ProjectConditionDTO conditionDto = new ProjectConditionDTO(); |
|
|
|
BeanUtils.copyProperties(projectInfo, conditionDto); |
|
|
|
params.setFormData(JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference<Map<String, Object>>() { |
|
|
|
})); |
|
|
|
} |
|
|
|
} |